Skip to content
Snippets Groups Projects
Commit b2823d05 authored by Moemoea Fierin's avatar Moemoea Fierin
Browse files

[CLEANING] Missing overrides and removing unused function in avatar

Methodology
parent 085cad25
No related branches found
No related tags found
1 merge request!287Resolve "Zoom on all diagrams"
......@@ -111,13 +111,13 @@ public class AvatarMethodologyDiagramName extends TGCScalableWithoutInternalComp
myImageIcon = IconManager.imgic302;
}
/*Issue #31 Was used in the previous internalDrawing refactoring that was done, now its useless
private boolean canTextGoIntoTheFatherBox(Graphics g)
{
int widthText = g.getFontMetrics().stringWidth(value);
int widthFather = getFather().getWidth();
return widthFather >= widthText + (2 * X_MARGIN);
}
}*/
/**
* Set the font style to "fontStyle" when the boolean "pointerOnMe" is true and indexOnMe is equal to the index
* @param g
......@@ -183,9 +183,6 @@ public class AvatarMethodologyDiagramName extends TGCScalableWithoutInternalComp
if (pointerIsOnMe) //Issue #31: The rectangle was not around the text when zoom: with scale it works better
//g.drawRect(x - 2, y - 12, curWidth + 5, 15);
g.drawRect(x - 2, y - scale(15), curWidth + 5, scale(15));
return;
}
/** Issue #31: Refactored internalDrawing for more comprehension
* Draws the text of the diagram references and the eventual validations
......@@ -357,6 +354,7 @@ public class AvatarMethodologyDiagramName extends TGCScalableWithoutInternalComp
return;
}
*/
private void makeScale(Graphics g, int _size)
{
//TraceManager.addDev("----- Make SCale ----");
......@@ -367,7 +365,7 @@ public class AvatarMethodologyDiagramName extends TGCScalableWithoutInternalComp
}
}
@Override
public TGComponent isOnMe(int _x, int _y) {
int oldIndex = indexOnMe;
if (GraphicLib.isInRectangle(_x, _y, x, y - height, Math.max(myWidth, minWidth), myHeight))
......@@ -397,6 +395,7 @@ public class AvatarMethodologyDiagramName extends TGCScalableWithoutInternalComp
}
return null;
}
@Override
public boolean editOndoubleClick(JFrame frame)
{
......@@ -416,11 +415,13 @@ public class AvatarMethodologyDiagramName extends TGCScalableWithoutInternalComp
}
return true;
}
@Override
public int getType()
{
return TGComponentManager.AVATARMETHODOLOGY_DIAGRAM_NAME;
}
@Override
public int getDefaultConnector()
{
......
......@@ -64,8 +64,8 @@ import java.util.Vector;
*/
public abstract class AvatarMethodologyDiagramReference extends TGCScalableWithInternalComponent implements SwallowTGComponent {
public String oldValue;
//protected int textX = 5; //FIXME already extended from TGScalableComponent, should be textX = 5
// protected int textY = 22; //FIXME already extended from TGScalableComponent, should be textY = 22
//protected int textX = 5;
// protected int textY = 22;
// protected int lineHeight = 30;
// protected double dlineHeight = 0.0;
// protected int reqType = 0;
......@@ -307,6 +307,7 @@ public abstract class AvatarMethodologyDiagramReference extends TGCScalableWithI
* @param x
* @param y
* */
@Override
public void addActionToPopupMenu(JPopupMenu componentMenu, ActionListener menuAL, int x, int y) {
componentMenu.addSeparator();
......@@ -322,6 +323,7 @@ public abstract class AvatarMethodologyDiagramReference extends TGCScalableWithI
* @param e
* @return boolean true
* */
@Override
public boolean eventOnPopup(ActionEvent e) {
// String s = e.getActionCommand();
......@@ -482,6 +484,7 @@ public abstract class AvatarMethodologyDiagramReference extends TGCScalableWithI
* @param tgc
* @return boolean
* */
@Override
public boolean acceptSwallowedTGComponent(TGComponent tgc) {
return tgc instanceof AvatarMethodologyDiagramName;
}
......@@ -493,6 +496,7 @@ public abstract class AvatarMethodologyDiagramReference extends TGCScalableWithI
* @param y
* @return boolean
* */
@Override
public boolean addSwallowedTGComponent(TGComponent tgc, int x, int y) {
tgc.setFather(this);
addInternalComponent(tgc, 0);
......@@ -504,6 +508,7 @@ public abstract class AvatarMethodologyDiagramReference extends TGCScalableWithI
* removeSwallowedTGComponent
* @param tgc
* */
@Override
public void removeSwallowedTGComponent(TGComponent tgc) {
removeInternalComponent(tgc);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment