Update of /cvsroot/tcotool/TCO-Tool/src/org/tcotool/standard/drawing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17670 Modified Files: DependencyLineConnection.java DependencyView.java EdgeFigure.java Layout.java NodeFigure.java PackageFigure.java ServiceFigure.java Log Message: Refactoring Index: NodeFigure.java =================================================================== RCS file: /cvsroot/tcotool/TCO-Tool/src/org/tcotool/standard/drawing/NodeFigure.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NodeFigure.java 16 Sep 2005 14:54:37 -0000 1.2 --- NodeFigure.java 17 Sep 2005 17:19:44 -0000 1.3 *************** *** 51,56 **** // Composites ! protected TextFigure nameFigure; ! protected TextFigure costFigure; /** * NodeFigure constructor. --- 51,56 ---- // Composites ! protected TextFigure nameFigure = null; ! protected TextFigure costFigure = null; /** * NodeFigure constructor. *************** *** 102,106 **** protected void addFormatMenu(javax.swing.JPopupMenu popupMenu) { JMenu formatMenu = new JMenu(CommonUserAccess.getMnuFormatText()); ! formatMenu.add(new AbstractAction(CommonUserAccess.getMniFormatLineColorText()) { public void actionPerformed(ActionEvent event) { --- 102,106 ---- protected void addFormatMenu(javax.swing.JPopupMenu popupMenu) { JMenu formatMenu = new JMenu(CommonUserAccess.getMnuFormatText()); ! /* formatMenu.add(new AbstractAction(CommonUserAccess.getMniFormatLineColorText()) { public void actionPerformed(ActionEvent event) { *************** *** 108,111 **** --- 108,112 ---- } }); + */ formatMenu.add(new AbstractAction(CommonUserAccess.getMniFormatFillColorText()) { public void actionPerformed(ActionEvent event) { *************** *** 116,119 **** --- 117,145 ---- popupMenu.add(formatMenu); } + /** + * Overwrites (JHotDraw mechanism). + * Keep presentation model coordinates. + * + public void basicDisplayBox(Point origin, Point corner) { + super.basicDisplayBox(origin, corner); + + if ((node.getEast() == null) || (node.getEast().longValue() != origin.x)) { + node.setEast(new Long((long)origin.x)); + } + if ((node.getSouth() == null) || (node.getSouth().longValue() != origin.y)) { + node.setSouth(new Long((long)origin.y)); + } + } + */ + /** + * Overwrites (JHotDraw mechanism). + * Keep presentation model coordinates. + */ + protected void basicMoveBy(int dx, int dy) { + super.basicMoveBy(dx, dy); + + node.setEast(new Long(node.getEast().longValue() + dx)); + node.setSouth(new Long(node.getSouth().longValue() + dy)); + } protected void defineComposite(int gap) { // start with an empty Composite *************** *** 179,192 **** } } protected abstract Color getDefaultFillColor(); /** * Return the DependencyDiagram where this Figure is shown. */ ! protected DependencyView getDiagram() { return view; } ! public final int getEast() { ! return (int)getPresentationFigure().displayBox().getX(); ! } /** * Return the nodes Fill-Color. --- 205,221 ---- } } + /** + * @deprecated + */ protected abstract Color getDefaultFillColor(); /** * Return the DependencyDiagram where this Figure is shown. */ ! private DependencyView getDiagram() { return view; } ! public final int getEast() { ! return (int)getPresentationFigure().displayBox().getX(); ! } /** * Return the nodes Fill-Color. *************** *** 232,236 **** return node.getSubject(); } ! protected PresentationNode getNode() { return node; } --- 261,269 ---- return node.getSubject(); } ! /** ! * Return the model of PresentationElement. ! * @return ! */ ! protected final PresentationNode getNode() { return node; } *************** *** 279,285 **** setAttribute(FigureAttributeConstant.FRAME_COLOR, Color.black); } ! public final boolean isMoveable() { ! return true; ! } /** * Figure's FillColor Action. --- 312,322 ---- setAttribute(FigureAttributeConstant.FRAME_COLOR, Color.black); } ! /** ! * NodeFigure's are moveable by default. ! * @return ! */ ! public final boolean isMoveable() { ! return true; ! } /** * Figure's FillColor Action. *************** *** 295,298 **** --- 332,336 ---- * Line-Color Action. * @see addEditMenu(..) + * @deprecated */ private void mniLineColor() { *************** *** 321,345 **** LauncherView.getInstance().getPnlNavigation().selectElement(getModelElement()); } public final void setEast(int value) { ! if (value != getEast()) { ! //Tracer.getInstance().debug(((TcoObject)getModelElement()).getName() + "->move east=" + value); ! Rectangle rectangle = getPresentationFigure().displayBox(); ! getPresentationFigure().displayBox(new Rectangle(value, (int)rectangle.getY(), (int)rectangle.getWidth(), (int)rectangle.getHeight())); ! updateView(); ! } ! } /** * Set the Fill Color. * @see EdgeFigure ! * @see setAttribute(..) */ protected void setFillColor(java.awt.Color color) { setAttribute(FigureAttributeConstant.FILL_COLOR, color); ! /* ! if ((getNode() != null) && (!ColorConverter.isSame(getNode().getBackground(), color))) { ! // prevent ping-pong with MetaModelChange ! getNode().setBackground(ColorConverter.createColor(color)); ! } ! */ updateView(); } --- 359,387 ---- LauncherView.getInstance().getPnlNavigation().selectElement(getModelElement()); } + /** + * Set new east-Position for Figure. + * @param value + */ public final void setEast(int value) { ! if (value != getEast()) { ! //Tracer.getInstance().debug(((TcoObject)getModelElement()).getName() + "->NEW east=" + value); ! Rectangle rectangle = getPresentationFigure().displayBox(); ! getPresentationFigure().displayBox(new Rectangle(value, (int)rectangle.getY(), (int)rectangle.getWidth(), (int)rectangle.getHeight())); ! // if ((node.getEast() == null) || (node.getEast().longValue() != value)) { ! node.setEast(new Long((long)value)); ! // } ! updateView(); ! } ! } /** * Set the Fill Color. * @see EdgeFigure ! * @see #setAttribute(..) */ protected void setFillColor(java.awt.Color color) { setAttribute(FigureAttributeConstant.FILL_COLOR, color); ! ! getNode().setBackground(new Long((long)color.getRGB())); ! updateView(); } *************** *** 358,372 **** */ } ! public final void setSouth(int value) { ! if (value != getSouth()) { ! //Tracer.getInstance().debug(((TcoObject)getModelElement()).getName() + "->move south=" + value); ! Rectangle rectangle = getPresentationFigure().displayBox(); ! getPresentationFigure().displayBox(new Rectangle((int)rectangle.getX(), value, (int)rectangle.getWidth(), (int)rectangle.getHeight())); ! updateView(); ! } ! } /** * Update Attribute name of ModelElement. - * @see updateModel() */ protected boolean updateName(String newName) { --- 400,420 ---- */ } ! /** ! * Set new south-Position for Figure. ! * @param value ! */ ! public final void setSouth(int value) { ! if (value != getSouth()) { ! //Tracer.getInstance().debug(((TcoObject)getModelElement()).getName() + "->NEW south=" + value); ! Rectangle rectangle = getPresentationFigure().displayBox(); ! getPresentationFigure().displayBox(new Rectangle((int)rectangle.getX(), value, (int)rectangle.getWidth(), (int)rectangle.getHeight())); ! // if ((node.getSouth() == null) || (node.getSouth().longValue() != origin.y)) { ! node.setSouth(new Long((long)value)); ! // } ! updateView(); ! } ! } /** * Update Attribute name of ModelElement. */ protected boolean updateName(String newName) { *************** *** 384,396 **** // TUNE!!! - // update coordinates - Rectangle rectangle = getPresentationFigure().displayBox(); - if ((getNode().getEast() == null) || (getNode().getEast().longValue() != (long)rectangle.getX())) { - getNode().setEast(new Long((long)rectangle.getX())); - } - if ((getNode().getSouth() == null) || (getNode().getSouth().longValue() != (long)rectangle.getY())) { - getNode().setSouth(new Long((long)rectangle.getY())); - } - // show the saved colors -> should precede setNode(node) ! // if (getNode().getBackground() != null) { --- 432,435 ---- Index: DependencyLineConnection.java =================================================================== RCS file: /cvsroot/tcotool/TCO-Tool/src/org/tcotool/standard/drawing/DependencyLineConnection.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DependencyLineConnection.java 16 Sep 2005 14:54:37 -0000 1.2 --- DependencyLineConnection.java 17 Sep 2005 17:19:44 -0000 1.3 *************** *** 35,39 **** * @version $Revision$ $Date$ */ ! public class DependencyLineConnection extends EdgeFigure { /** --- 35,39 ---- * @version $Revision$ $Date$ */ ! class DependencyLineConnection extends EdgeFigure { /** Index: PackageFigure.java =================================================================== RCS file: /cvsroot/tcotool/TCO-Tool/src/org/tcotool/standard/drawing/PackageFigure.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PackageFigure.java 16 Sep 2005 14:54:37 -0000 1.2 --- PackageFigure.java 17 Sep 2005 17:19:44 -0000 1.3 *************** *** 27,31 **** * @version $Revision$ $Date$ */ ! public class PackageFigure extends NodeFigure { /** * Create a new instance of PackageFigure with a RectangleFigure as presentation figure. --- 27,31 ---- * @version $Revision$ $Date$ */ ! class PackageFigure extends NodeFigure { /** * Create a new instance of PackageFigure with a RectangleFigure as presentation figure. *************** *** 86,89 **** --- 86,90 ---- /* (non-Javadoc) * @see org.tcotool.drawing.NodeFigure#getDefaultFillColor() + * @deprecated */ protected Color getDefaultFillColor() { Index: Layout.java =================================================================== RCS file: /cvsroot/tcotool/TCO-Tool/src/org/tcotool/standard/drawing/Layout.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Layout.java 16 Sep 2005 14:54:37 -0000 1.2 --- Layout.java 17 Sep 2005 17:19:44 -0000 1.3 *************** *** 12,17 **** import ch.softenvironment.util.Tracer; ! public class Layout { private static double delta1 = 1.0;// node_distribution private static double delta2 = 0.01;// borderline --- 12,22 ---- import ch.softenvironment.util.Tracer; ! /** ! * Layout algorithm to auto-layout several nodes in 2D space. ! * @author ce ! * @author Peter Hirzel <i>soft</i>Environment ! */ public class Layout { + //TODO make this class reusable for other similar graphic-tasks private static double delta1 = 1.0;// node_distribution private static double delta2 = 0.01;// borderline *************** *** 64,73 **** return sum; } ! private double cost() ! { // node distribution double a = 0.0; if(delta1>0.0){ ! a=node_distribution(); } // borderline --- 69,77 ---- return sum; } ! private double cost() { // node distribution double a = 0.0; if(delta1>0.0){ ! a=nodeDistribution(); } // borderline *************** *** 92,100 **** return a + b + c + d; } ! private void doit() ! { double temp = 1.0; ! //ch.softenvironment.util.Tracer.getInstance().debug(dumpNodes()); maxdist = getdist(min_x, min_y, max_x, max_y); --- 96,103 ---- return a + b + c + d; } ! private void doit() { double temp = 1.0; ! //ch.softenvironment.util.Tracer.getInstance().debug(dumpNodes()); maxdist = getdist(min_x, min_y, max_x, max_y); *************** *** 133,147 **** temp = temp * delta10; } - return; } ! public static void doLayout(DependencyView diagView) { ! // run it java.util.Vector edgev=new java.util.Vector(30); java.util.Vector nodev=new java.util.Vector(30); // collect nodes and edges from current diagram ! if(diagView!=null){ ! //ch.softenvironment.util.Tracer.getInstance().debug("current ClassDiagramView found"); ! ! /* org.tcotool.presentation.Diagram diag=diagView.getDiagram(); java.util.Iterator elei=diag.getPresentationElement().iterator(); while(elei.hasNext()){ --- 136,151 ---- temp = temp * delta10; } } ! /** ! * Layout the Figures within the given view. ! * @param diagView ! */ ! public static void doLayout(DependencyView view) { java.util.Vector edgev=new java.util.Vector(30); java.util.Vector nodev=new java.util.Vector(30); // collect nodes and edges from current diagram ! /* ! // Var. I: collect by model ! org.tcotool.presentation.Diagram diag=view.getDiagram(); java.util.Iterator elei=diag.getPresentationElement().iterator(); while(elei.hasNext()){ *************** *** 154,158 **** } */ ! FigureEnumeration enum = diagView.drawing().figures(); while (enum.hasNextFigure()) { Figure figure = enum.nextFigure(); --- 158,163 ---- } */ ! // Var.II: collect by Figure's ! FigureEnumeration enum = view.drawing().figures(); while (enum.hasNextFigure()) { Figure figure = enum.nextFigure(); *************** *** 165,182 **** //dumpNodes(nodev.iterator()); // before Layout model=new Layout(); ! // Tracer.getInstance().debug("layout diagram","H "+diagView.getMaximumSize().getHeight()+", W"+diagView.getMaximumSize().getWidth()); model.layout(nodev, edgev, 0, 0, ! diagView.getWidth(), diagView.getHeight()); //dumpNodes(nodev.iterator()); // after ! ! diagView.refresh(); ! }else{ ! Tracer.getInstance().developerWarning(Layout.class, "Layout", "Failed"); ! } ! return; ! // -end- 3CDA3DB3002F body3CDA3DA10173 "layoutCurrentDiagram" ! } /** * Test-Method. --- 170,180 ---- //dumpNodes(nodev.iterator()); // before Layout model=new Layout(); ! // Tracer.getInstance().debug("layout diagram","H "+view.getMaximumSize().getHeight()+", W"+view().getWidth()); model.layout(nodev, edgev, 0, 0, ! view.getWidth(), view.getHeight()); //dumpNodes(nodev.iterator()); // after ! } /** * Test-Method. *************** *** 286,295 **** return Math.sqrt(d1 * d1 + d2 * d2); } ! private EdgeFigure getEdge(int i) ! { return (EdgeFigure)edgev.get(i); } ! private NodeFigure getEndNode(int edgeIdx) ! { /* PresentationEdge edge=getEdge(edgeIdx); java.util.Iterator it=edge.iteratorEndpoint(); --- 284,291 ---- return Math.sqrt(d1 * d1 + d2 * d2); } ! private EdgeFigure getEdge(int i) { return (EdgeFigure)edgev.get(i); } ! private NodeFigure getEndNode(int edgeIdx) { /* PresentationEdge edge=getEdge(edgeIdx); java.util.Iterator it=edge.iteratorEndpoint(); *************** *** 300,309 **** return (NodeFigure)edge.endFigure(); } ! private NodeFigure getNode(int i) ! { return (NodeFigure)nodev.get(i); } ! private void layout(java.util.List nodev,java.util.List edgev, double min_x1, double min_y1, double max_x1, double max_y1) ! { Layout utility=new Layout(); utility.nodev=nodev; --- 296,303 ---- return (NodeFigure)edge.endFigure(); } ! private NodeFigure getNode(int i) { return (NodeFigure)nodev.get(i); } ! private void layout(java.util.List nodev,java.util.List edgev, double min_x1, double min_y1, double max_x1, double max_y1) { Layout utility=new Layout(); utility.nodev=nodev; *************** *** 322,334 **** utility.doit(); } ! private void moveback() ! { int i = oldpos_i; ! getNode(i).setEast((int)( oldpos_x)); getNode(i).setSouth((int)(oldpos_y)); - return; } ! private void neighborhood(double radius) ! { int new_x; int new_y; --- 316,325 ---- utility.doit(); } ! private void moveback() { int i = oldpos_i; ! getNode(i).setEast((int)(oldpos_x)); getNode(i).setSouth((int)(oldpos_y)); } ! private void neighborhood(double radius) { int new_x; int new_y; *************** *** 352,361 **** if(new_y > max_y) new_y=((int)(max_y)); }while(new_x==oldpos_x && new_y==oldpos_y); ! node.setEast(new_x); ! node.setSouth(new_y); ! return; } ! private double node_distribution() ! { double sum = 0.0; for(int i = 0;i<nodev.size();i++){ --- 343,350 ---- if(new_y > max_y) new_y=((int)(max_y)); }while(new_x==oldpos_x && new_y==oldpos_y); ! node.setEast(new_x); ! node.setSouth(new_y); } ! private double nodeDistribution() { double sum = 0.0; for(int i = 0;i<nodev.size();i++){ *************** *** 377,382 **** return sum; } ! private double nodeedgedistances() ! { double sum = 0; for(int j = 0;j<nodev.size();j++){ --- 366,370 ---- return sum; } ! private double nodeEdgeDistances() { double sum = 0; for(int j = 0;j<nodev.size();j++){ *************** *** 395,400 **** return sum; } ! private double pt2line(double x1,double y1,double xa, double ya, double xb, double yb) ! { double dx=xb-xa; if(dx==0){ --- 383,387 ---- return sum; } ! private double pt2line(double x1,double y1,double xa, double ya, double xb, double yb) { double dx=xb-xa; if(dx==0){ *************** *** 409,416 **** return getdist(x1,y1,xs,ys); } ! private int random(int lb, int ub) ! { double d=ub - lb + 1; return (int)(Math.random()*d) + lb; } ! } --- 396,402 ---- return getdist(x1,y1,xs,ys); } ! private int random(int lb, int ub) { double d=ub - lb + 1; return (int)(Math.random()*d) + lb; } ! } \ No newline at end of file Index: EdgeFigure.java =================================================================== RCS file: /cvsroot/tcotool/TCO-Tool/src/org/tcotool/standard/drawing/EdgeFigure.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EdgeFigure.java 16 Sep 2005 14:54:37 -0000 1.2 --- EdgeFigure.java 17 Sep 2005 17:19:44 -0000 1.3 *************** *** 98,106 **** } }); - formatMenu.add(new AbstractAction(CommonUserAccess.getMniFormatFillColorText()) { - public void actionPerformed(ActionEvent event) { - mniFillColor(); - } - }); popupMenu.add(formatMenu); --- 98,101 ---- *************** *** 178,182 **** * Return the classDiagram where this Figure is shown. */ ! protected DependencyView getDiagram() { return view; } --- 173,177 ---- * Return the classDiagram where this Figure is shown. */ ! private DependencyView getDiagram() { return view; } *************** *** 250,261 **** } /** - * FillColor Action. - * @see addEditMenu(..) - */ - private void mniFillColor() { - // makes no sense here - mniLineColor(); - } - /** * LineColor Action. * @see addEditMenu(..) --- 245,248 ---- Index: DependencyView.java =================================================================== RCS file: /cvsroot/tcotool/TCO-Tool/src/org/tcotool/standard/drawing/DependencyView.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DependencyView.java 16 Sep 2005 14:54:37 -0000 1.2 --- DependencyView.java 17 Sep 2005 17:19:44 -0000 1.3 *************** *** 1,4 **** package org.tcotool.standard.drawing; - /* * This library is free software; you can redistribute it and/or --- 1,3 ---- *************** *** 17,20 **** --- 16,20 ---- */ import java.util.*; + import java.awt.Color; import java.awt.event.*; *************** *** 25,28 **** --- 25,29 ---- import org.tcotool.model.TcoPackage; import org.tcotool.presentation.Diagram; + import org.tcotool.presentation.PresentationNode; import org.tcotool.tools.Calculator; *************** *** 43,47 **** */ public class DependencyView extends org.jhotdraw.contrib.zoom.ZoomDrawingView implements DrawingEditor { ! // private ToolButton defaultToolButton = null; // private ToolButton selectedToolButton = null; private Tool tool = null; --- 44,48 ---- */ public class DependencyView extends org.jhotdraw.contrib.zoom.ZoomDrawingView implements DrawingEditor { ! // private ToolButton defaultToolButton = null; // private ToolButton selectedToolButton = null; private Tool tool = null; *************** *** 49,55 **** private Calculator calculator = new Calculator(LauncherView.getInstance().getUtility()); private Diagram diagram = null; ! // private Element parentElement = null; // Menu Checkboxes ! private boolean showDependencyDistribution = false; private boolean showCosts = true; /** --- 50,56 ---- private Calculator calculator = new Calculator(LauncherView.getInstance().getUtility()); private Diagram diagram = null; ! // Menu Checkboxes ! private boolean showDependencyDistribution = true; private boolean showCosts = true; /** *************** *** 70,73 **** --- 71,76 ---- addDependency((Dependency)iterator.next()); } + + refresh(); } /** *************** *** 81,92 **** super.add(figure); if (figure instanceof NodeFigure) { ! if (!diagram.getPresentationElement().contains(((NodeFigure)figure).getNode())) { List elements = new ArrayList(diagram.getPresentationElement()); elements.add(((NodeFigure)figure).getNode()); diagram.setPresentationElement(elements); } ((NodeFigure)figure).updateView(); } ! } catch(Throwable e) { BaseDialog.showError(LauncherView.getInstance(), "error", "CEFigureNotCreated", e); //$NON-NLS-1$ } --- 84,105 ---- super.add(figure); if (figure instanceof NodeFigure) { ! int index = diagram.getPresentationElement().indexOf(((NodeFigure)figure).getNode()); ! if (index < 0) { List elements = new ArrayList(diagram.getPresentationElement()); elements.add(((NodeFigure)figure).getNode()); diagram.setPresentationElement(elements); + } else { + // reuse layout from previously showing diagram + PresentationNode node = (PresentationNode)diagram.getPresentationElement().get(index); + ((NodeFigure)figure).setEast(node.getEast().intValue()); + ((NodeFigure)figure).setSouth(node.getSouth().intValue()); + if (node.getBackground() != null) { + ((NodeFigure)figure).setFillColor(new Color(node.getBackground().intValue())); + } + //TODO Font; Width x Height } ((NodeFigure)figure).updateView(); } ! } catch(Throwable e) { BaseDialog.showError(LauncherView.getInstance(), "error", "CEFigureNotCreated", e); //$NON-NLS-1$ } *************** *** 111,118 **** return add(new PackageFigure(this, element)); } else { ! throw new DeveloperException( ! this, ! "add(Element)",//$NON-NLS-1$ ! "wrong type", element.toString()); } } --- 124,128 ---- return add(new PackageFigure(this, element)); } else { ! throw new DeveloperException(this, "add(TcoObject)", "wrong type", element.toString()); } } *************** *** 142,152 **** public void figureSelectionChanged(DrawingView view) { - } /** ! * Find the ClassFigure in this DrawingView at the given coordinates. ! * @return ClassFigure */ ! protected ServiceFigure findClassFigure(int x, int y) { FigureEnumeration enum = drawing().figures(); while (enum.hasNextFigure()) { --- 152,162 ---- public void figureSelectionChanged(DrawingView view) { } /** ! * Find the ServiceFigure in this DrawingView at the given coordinates. ! * @return ServiceFigure ! * @deprecated */ ! protected ServiceFigure findServiceFigure(int x, int y) { FigureEnumeration enum = drawing().figures(); while (enum.hasNextFigure()) { *************** *** 254,257 **** --- 264,268 ---- */ protected boolean isShowDependencyDistribution() { + //TODO return showDependencyDistribution; } *************** *** 293,314 **** } /** - * Draw a node out of Model on this Diagram. - */ - private NodeFigure loadNode(Figure figure) { - // set model - // ((NodeFigure)figure).setDiagram(this); - // ((NodeFigure)figure).setNode(node); - - // show Figure - super.add(figure); - - // move the figure to the last saved coordinates - // java.awt.Point origin = new java.awt.Point(node.getEast(), node.getSouth()); - // java.awt.Point corner = new java.awt.Point(node.getEast() + node.getWidth(), node.getSouth() + node.getHeight()); - // figure.displayBox(origin, corner); - - return (NodeFigure)figure; - } - /** * Show a simple Edge by means plain EdgeFigure as Dependency or Generalization. */ --- 304,307 ---- *************** *** 366,370 **** public void removeViewChangeListener(ViewChangeListener vsl) { // TODO Auto-generated method stub - } /** --- 359,362 ---- Index: ServiceFigure.java =================================================================== RCS file: /cvsroot/tcotool/TCO-Tool/src/org/tcotool/standard/drawing/ServiceFigure.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ServiceFigure.java 16 Sep 2005 14:54:37 -0000 1.2 --- ServiceFigure.java 17 Sep 2005 17:19:44 -0000 1.3 *************** *** 29,33 **** * @version $Revision$ $Date$ */ ! public class ServiceFigure extends NodeFigure implements ActionListener { // PopupMenu private static String SUPPRESS_ATTRIBUTES_ACTION_COMMAND = "SUPPRESS_ATTRIBUTES";//$NON-NLS-1$ --- 29,33 ---- * @version $Revision$ $Date$ */ ! class ServiceFigure extends NodeFigure implements ActionListener { // PopupMenu private static String SUPPRESS_ATTRIBUTES_ACTION_COMMAND = "SUPPRESS_ATTRIBUTES";//$NON-NLS-1$ *************** *** 66,87 **** /** * Add individual PopupMenu items for this class. ! * @see #createPopupMenu() */ protected void addSpecialMenu(javax.swing.JPopupMenu popupMenu) { // popupMenu.add(new JSeparator()); ! //TODO NLS chxSuppressAttributes = new javax.swing.JCheckBoxMenuItem("Kosten unterdrücken"); //$NON-NLS-1$ chxSuppressAttributes.setActionCommand(SUPPRESS_ATTRIBUTES_ACTION_COMMAND); chxSuppressAttributes.addActionListener(this); - chxSuppressAttributes.setSelected(false); - popupMenu.add(chxSuppressAttributes); - } /* (non-Javadoc) * @see org.tcotool.drawing.NodeFigure#getDefaultFillColor() */ protected Color getDefaultFillColor() { --- 66,85 ---- /** * Add individual PopupMenu items for this class. ! * @see NodeFigure#adaptPopupMenu() */ protected void addSpecialMenu(javax.swing.JPopupMenu popupMenu) { // popupMenu.add(new JSeparator()); ! //TODO NYI chxSuppressAttributes = new javax.swing.JCheckBoxMenuItem("Kosten unterdrücken"); //$NON-NLS-1$ chxSuppressAttributes.setActionCommand(SUPPRESS_ATTRIBUTES_ACTION_COMMAND); chxSuppressAttributes.addActionListener(this); chxSuppressAttributes.setSelected(false); popupMenu.add(chxSuppressAttributes); } /* (non-Javadoc) * @see org.tcotool.drawing.NodeFigure#getDefaultFillColor() + * @deprecated */ protected Color getDefaultFillColor() { |