com.dlsc.flexgantt.swing
Class ObjectBounds

java.lang.Object
  extended by java.awt.geom.RectangularShape
      extended by java.awt.geom.Rectangle2D
          extended by java.awt.Rectangle
              extended by com.dlsc.flexgantt.swing.ObjectBounds
All Implemented Interfaces:
java.awt.Shape, java.io.Serializable, java.lang.Cloneable

public class ObjectBounds
extends java.awt.Rectangle

An object used to store the rectangle bounds of a timeline object. Additional properties such as the object's owning tree node and timeline layer are also available as a convenience.

Since:
1.0
Author:
Dirk Lemmermann
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
ObjectBounds(java.lang.Object node, java.lang.Object obj, IGanttChartModel model, int x, int y, int width, int height, TreeTableNode treeTableNode, TimelineObjectLayer layer)
          Constructs a new bounds object.
 
Method Summary
 boolean equals(java.lang.Object otherObject)
           
 ILayer getLayer()
          Returns the layer for which the timeline object was returned from the data model.
 TimelineObjectLayer getLayerUI()
          Returns the layer user interface component on which the timeline object was rendered.
 IGanttChartModel getModel()
          Returns the model from which the timeline object originated.
 java.lang.Object getNode()
          Returns the tree table node to which the timeline object belongs.
 java.lang.Object getObject()
          Returns the timeline object.
 TimelineObjectPath getPath()
          Returns a timeline object path based on the tree path, model layer, and object stored inside the object bounds.
 ITimeSpan getTimeSpan()
          Returns the time span of the timeline object.
 TreeTableNode getTreeTableNode()
          Returns the (tree table internal) representation of the tree node.
 
Methods inherited from class java.awt.Rectangle
add, add, add, contains, contains, contains, contains, createIntersection, createUnion, 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

ObjectBounds

public ObjectBounds(java.lang.Object node,
                    java.lang.Object obj,
                    IGanttChartModel model,
                    int x,
                    int y,
                    int width,
                    int height,
                    TreeTableNode treeTableNode,
                    TimelineObjectLayer layer)
Constructs a new bounds object.

Parameters:
node - the tree table node that owns the timeline object
obj - the actual timeline object
model - the data source that returned the object
x - the x-coordinate of the bounds
y - the y-coordinate of the bounds
width - the width of the bounds
height - the height of the bounds
treeTableNode - the (tree table internal) representation of the tree node object
layer - the timeline layer that rendered the timeline object
Since:
1.0
Method Detail

getModel

public IGanttChartModel getModel()
Returns the model from which the timeline object originated.

Returns:
the data source that delivered the timeline object
Since:
1.0

getLayer

public ILayer getLayer()
Returns the layer for which the timeline object was returned from the data model.

Returns:
the object's timeline layer
Since:
1.0

getLayerUI

public TimelineObjectLayer getLayerUI()
Returns the layer user interface component on which the timeline object was rendered.

Returns:
the timeline layer
Since:
1.0

getNode

public java.lang.Object getNode()
Returns the tree table node to which the timeline object belongs.

Returns:
the owner tree node of the timeline object
Since:
1.0

getObject

public java.lang.Object getObject()
Returns the timeline object.

Returns:
the timeline object
Since:
1.0

getTimeSpan

public ITimeSpan getTimeSpan()
Returns the time span of the timeline object.

Returns:
the timeline object's time span
Since:
1.0

getTreeTableNode

public TreeTableNode getTreeTableNode()
Returns the (tree table internal) representation of the tree node.

Returns:
the tree table's node
Since:
1.0

getPath

public TimelineObjectPath getPath()
Returns a timeline object path based on the tree path, model layer, and object stored inside the object bounds.

Returns:
a timeline object path pointing to the object references by the object bounds
Since:
1.0

equals

public boolean equals(java.lang.Object otherObject)
Overrides:
equals in class java.awt.Rectangle