simtools.shapes
Class ShapesContainer.GraphicSelection

java.lang.Object
  extended by java.awt.geom.RectangularShape
      extended by java.awt.geom.Rectangle2D
          extended by java.awt.Rectangle
              extended by simtools.diagram.DiagramSelection
                  extended by simtools.shapes.ShapesContainer.GraphicSelection
All Implemented Interfaces:
java.awt.Shape, java.io.Serializable, java.lang.Cloneable
Enclosing class:
ShapesContainer

public class ShapesContainer.GraphicSelection
extends DiagramSelection

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class simtools.diagram.DiagramSelection
DiagramSelection.ShapeHorizontalPositionComparator, DiagramSelection.ShapeVerticalPositionComparator
 
Nested classes/interfaces inherited from class java.awt.geom.Rectangle2D
java.awt.geom.Rectangle2D.Double, java.awt.geom.Rectangle2D.Float
 
Field Summary
 
Fields inherited from class java.awt.Rectangle
height, width, x, y
 
Fields inherited from class java.awt.geom.Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
 
Method Summary
protected  boolean addAllShapes()
          Add all the shapes to the selection By overriding this method, one can use an other iterator on the shapes.
protected  boolean addShapeAt(int ox, int oy)
          The first shape which contains the given coordinates is added to the selected shapes list.
protected  void addShapes(java.util.Vector v)
           
 java.awt.Shape copyShape(java.awt.Shape s)
          To copy a shape only Rectangle shapes are copied By overriding this method, specif shapes can be managed
 DiagramComponent getComponent()
          Gets the component using this diagram selection.
 java.awt.Point getShapeOrigin(java.awt.Shape s, java.awt.Point p)
          Computes shape origin before its move for a rectangle the top-left point coordinate is returned for a default shape the top-left point coordinate of its bounds is returned By overriding this method, specif shapes can be managed
protected  void replaceShapes(java.util.Vector v, AbstractShape as)
          Replace a list of shapes by a new one
protected  void setToShape(AbstractShape as)
           
protected  void setToShapes(java.util.Vector v)
           
 void translateShape(java.awt.Shape s, int dx, int dy)
          Translates a shape only Rectangle shapes are translated By overriding this method, specif shapes can be managed
 
Methods inherited from class simtools.diagram.DiagramSelection
add, addListener, addPoint, addShapesInside, alignSelection, alignSelectionHCenter, alignSelectionToBottom, alignSelectionToLeft, alignSelectionToRight, alignSelectionToTop, alignSelectionVCenter, bringSelectionForward, bringSelectionToFront, checkResizeWay, clear, copyConnectionShape, copySelection, deleteSelection, deleteShape, distributeSelectionHorizontally, distributeSelectionVertically, getGrid, getSelectedShape, getSelectedShape, getSelectedShapeAt, getSelection, getShape, getShapeCount, gridPosition, isEmpty, isSelected, isSelected, isSizing, propagate, removeAllListeners, removeListener, removeShapeAt, resizeSelection, resizeShape, selectAll, selectArea, selectAreaEnd, selectPoint, sendSelectionBackward, sendSelectionToBack, setGrid, setShapes, translateConnectionShape, translateSelection, unselect
 
Methods inherited from class java.awt.Rectangle
add, add, add, contains, contains, contains, contains, createIntersection, createUnion, equals, getBounds, getBounds2D, getHeight, getLocation, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, toString, translate, union
 
Methods inherited from class java.awt.geom.Rectangle2D
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union
 
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.Shape
contains, contains, contains, contains, getPathIterator, getPathIterator, intersects, intersects
 

Method Detail

getComponent

public DiagramComponent getComponent()
Description copied from class: DiagramSelection
Gets the component using this diagram selection. Its an optional feture depending on the implementation

Overrides:
getComponent in class DiagramSelection
Returns:
the component or null if not available

getShapeOrigin

public java.awt.Point getShapeOrigin(java.awt.Shape s,
                                     java.awt.Point p)
Description copied from class: DiagramSelection
Computes shape origin before its move for a rectangle the top-left point coordinate is returned for a default shape the top-left point coordinate of its bounds is returned By overriding this method, specif shapes can be managed

Overrides:
getShapeOrigin in class DiagramSelection
Parameters:
s - the shape
p - a Point to put coordinates into (if null then a new Point is returned)
Returns:
a Point with coordinates

copyShape

public java.awt.Shape copyShape(java.awt.Shape s)
Description copied from class: DiagramSelection
To copy a shape only Rectangle shapes are copied By overriding this method, specif shapes can be managed

Overrides:
copyShape in class DiagramSelection
Parameters:
s - the shape
Returns:
a copy

translateShape

public void translateShape(java.awt.Shape s,
                           int dx,
                           int dy)
Description copied from class: DiagramSelection
Translates a shape only Rectangle shapes are translated By overriding this method, specif shapes can be managed

Overrides:
translateShape in class DiagramSelection
Parameters:
s - the shape
dx - x translation
dy - y translation

addAllShapes

protected boolean addAllShapes()
Description copied from class: DiagramSelection
Add all the shapes to the selection By overriding this method, one can use an other iterator on the shapes.

Overrides:
addAllShapes in class DiagramSelection

addShapeAt

protected boolean addShapeAt(int ox,
                             int oy)
Description copied from class: DiagramSelection
The first shape which contains the given coordinates is added to the selected shapes list. By overriding this method, one can use an other iterator on the shapes.

Overrides:
addShapeAt in class DiagramSelection
Parameters:
ox - the x coordinate
oy - the y coordinate

setToShape

protected void setToShape(AbstractShape as)

setToShapes

protected void setToShapes(java.util.Vector v)

addShapes

protected void addShapes(java.util.Vector v)

replaceShapes

protected void replaceShapes(java.util.Vector v,
                             AbstractShape as)
Replace a list of shapes by a new one

Parameters:
v - the shapes to delete
as - the shape to add