diff --git a/src/main/java/ui/avatarmethodology/AvatarMethodologyDiagramName.java b/src/main/java/ui/avatarmethodology/AvatarMethodologyDiagramName.java index 55aa1604e51e54fef3a8d734c1c69aab84296675..9eb79ed2b7ed1d4099cd00e33e676f139fc54c58 100755 --- a/src/main/java/ui/avatarmethodology/AvatarMethodologyDiagramName.java +++ b/src/main/java/ui/avatarmethodology/AvatarMethodologyDiagramName.java @@ -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() { diff --git a/src/main/java/ui/avatarmethodology/AvatarMethodologyDiagramReference.java b/src/main/java/ui/avatarmethodology/AvatarMethodologyDiagramReference.java index ff9d7e0f54a469fb3130f57d3a5f2f56988ac846..0f4941a87b85e97a3499af0c7dcd9657081a1e85 100755 --- a/src/main/java/ui/avatarmethodology/AvatarMethodologyDiagramReference.java +++ b/src/main/java/ui/avatarmethodology/AvatarMethodologyDiagramReference.java @@ -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); }