simtools.diagram.test
Class TestComponent.TestShape

java.lang.Object
  extended by java.awt.geom.RectangularShape
      extended by java.awt.geom.Rectangle2D
          extended by java.awt.Rectangle
              extended by simtools.diagram.test.TestComponent.TestShape
All Implemented Interfaces:
java.awt.Shape, java.io.Serializable, java.lang.Cloneable, DiagramConnector
Enclosing class:
TestComponent

public class TestComponent.TestShape
extends java.awt.Rectangle
implements DiagramConnector

See Also:
Serialized Form

Nested Class Summary
 
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
 
Constructor Summary
TestComponent.TestShape(int x, int y, int w, int h)
           
TestComponent.TestShape(TestComponent.TestShape ts)
           
 
Method Summary
 void addConnection(DiagramConnection dc)
           
 boolean allowsInputConnection(DiagramConnector in)
          Checks if this connector can be connected with an output connector
 boolean allowsOutputConnection(DiagramConnector out)
          Checks if this connector can be connected with an input connector
 DiagramConnector connectorOwner()
          Returns the connector owner of this connector if any
 java.util.Enumeration getConnections()
          Gets the list of DiagramConnection connected with this connector
 void removeAllConnections()
           
 void removeConnection(DiagramConnection dc)
           
 
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, isEmpty, 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
 

Constructor Detail

TestComponent.TestShape

public TestComponent.TestShape(int x,
                               int y,
                               int w,
                               int h)

TestComponent.TestShape

public TestComponent.TestShape(TestComponent.TestShape ts)
Method Detail

getConnections

public java.util.Enumeration getConnections()
Description copied from interface: DiagramConnector
Gets the list of DiagramConnection connected with this connector

Specified by:
getConnections in interface DiagramConnector
Returns:
the list of DiagramConnection

allowsInputConnection

public boolean allowsInputConnection(DiagramConnector in)
Description copied from interface: DiagramConnector
Checks if this connector can be connected with an output connector

Specified by:
allowsInputConnection in interface DiagramConnector
Parameters:
in - the output connector
Returns:
true if it can

allowsOutputConnection

public boolean allowsOutputConnection(DiagramConnector out)
Description copied from interface: DiagramConnector
Checks if this connector can be connected with an input connector

Specified by:
allowsOutputConnection in interface DiagramConnector
Parameters:
out - the input connector
Returns:
true if it can

connectorOwner

public DiagramConnector connectorOwner()
Description copied from interface: DiagramConnector
Returns the connector owner of this connector if any

Specified by:
connectorOwner in interface DiagramConnector
Returns:
the owner or null if the owner is not a connector

addConnection

public void addConnection(DiagramConnection dc)

removeConnection

public void removeConnection(DiagramConnection dc)

removeAllConnections

public void removeAllConnections()