Package simtools.diagram

Examples of simtools.diagram.Element.translate()


        // Implementation of the abstract methods
        protected void translate(int x, int y) {
            for (int i = 0; i < TestShapesContainer.this.size(); i++) {
                Element s = (Element) TestShapesContainer.this.get(i);
                s.translate(x, y);
            }
        }


        // Overridden to store undo info
View Full Code Here


                        for(int j=0;j<oldGates.size(); j++){
                            clonedGates.put(oldGates.get(j), newGates.get(j));
                        }
                    }

                    as.translate(x,y);
                    TestShapesContainer.this.add(as);
                }
            }

            // Now Copy the connectors
View Full Code Here

        Element element = shapeCreator.create();
       
        if (element instanceof AbstractShape){
            ((AbstractShape)element).setAnchor(0,0);
        }
      element.translate((int)actionX, (int)actionY);
      invoker.addElement(element);
      invoker.getComponent().repaint();
    }
    super.actionPerformed(e);
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.