|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.tree.DefaultMutableTreeNode com.dlsc.flexgantt.model.treetable.DefaultMutableTreeTableNode<T> com.dlsc.flexgantt.model.gantt.DefaultGanttChartNode<T,S> com.dlsc.flexgantt.model.gantt.DefaultResourceNode<T,S>
T
- the type of the wrapped user / business objectS
- the type of the timeline objects returned by the nodepublic class DefaultResourceNode<T,S extends ITimelineObject>
The default implementation of a Gantt chart node that represents a resource (e.g. a machine with a minimum and a maximum capacity). It is up to the application to decide whether the values for the minimum and the maximum capacity represent the minimum and maximum capacity used over the entire time horizon or whether these are the the minimum and maximum capacity supported by the machine.
The default configuration of the node is:
Field Summary |
---|
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
Constructor Summary | |
---|---|
DefaultResourceNode()
Constructs a new resource node. |
|
DefaultResourceNode(boolean allowsChildren)
Constructs a new resource node. |
|
DefaultResourceNode(T userObject)
Constructs a new resource node. |
|
DefaultResourceNode(T userObject,
boolean allowsChildren)
Constructs a new resource node. |
Method Summary | |
---|---|
void |
addMajorCapacityLine(CapacityLine line)
Adds the given major capacity line to the resource node. |
void |
addMinorCapacityLine(CapacityLine line)
Adds the given minor capacity line to the resource node. |
void |
clearMajorCapacityLines()
Removes all major capacity lines from the resource node. |
void |
clearMinorCapacityLines()
Removes all minor capacity lines from the resource node. |
double |
getCapacityAt(int rowHeight,
int y)
Returns the capacity value for the given y coordinate. |
java.util.List<CapacityLine> |
getCapacityLines(int rowHeight,
boolean major)
Returns a list of capacity lines that can be picked up by row renderers to draw a nice scale in the background of the resource row. |
int |
getCapacityLocation(int rowHeight,
double capacity)
Returns the location / y-coordinate of a given capacity for a given row height. |
double |
getMaximumCapacity()
Returns the maximum capacity of the resource node. |
double |
getMinimumCapacity()
Returns the minimum capacity of the resource node. |
void |
removeMajorCapacityLine(CapacityLine line)
Removes the given major capacity line from the resource node. |
void |
removeMinorCapacityLine(CapacityLine line)
Removes the given minor capacity line from the resource node. |
void |
setMaximumCapacity(double capacity)
Sets the minimum capacity of the resource node. |
void |
setMinimumCapacity(double capacity)
Sets the minimum capacity of the resource node. |
Methods inherited from class com.dlsc.flexgantt.model.treetable.DefaultMutableTreeTableNode |
---|
add, compare, compare, getColumnValue, getComparator, getDragActions, getDropActions, getKey, getKeyComparator, getRowHeaderValue, getRowHeight, getRowHeightMaximum, getRowHeightMinimum, getToolTipText, getTypedUserObject, getUserObject, insert, isDeletable, isKeyEditable, isResizable, isRowLineVisible, isSelectable, isSorting, isValueEditable, setColumnValue, setComparator, setDeletable, setDragActions, setKey, setKeyComparator, setKeyEditable, setResizable, setRowHeaderValue, setRowHeight, setRowHeightMaximum, setRowHeightMinimum, setRowLineVisible, setSelectable, setToolTipText, setTypedUserObject, setUserObject, setValueEditable, sort |
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObjectPath, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.dlsc.flexgantt.model.gantt.IGanttChartNode |
---|
addTimelineObjects, clearTimelineObjects, getDropActions, getLineCount, getLineHeight, getLineLocation, getTimelineObjects, getTimelineObjects, getTimelineObjectsIterator, isSelectable, removeTimelineObjects |
Methods inherited from interface com.dlsc.flexgantt.model.treetable.ITreeTableNode |
---|
getColumnValue, getDragActions, getDropActions, getKey, getRowHeaderValue, getRowHeight, getRowHeightMaximum, getRowHeightMinimum, getToolTipText, isDeletable, isKeyEditable, isResizable, isRowLineVisible, isSelectable, isValueEditable, setColumnValue, setKey, setRowHeaderValue, setRowHeight, sort |
Methods inherited from interface javax.swing.tree.TreeNode |
---|
children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf |
Methods inherited from interface javax.swing.tree.MutableTreeNode |
---|
remove, remove, removeFromParent, setParent |
Methods inherited from interface java.util.Comparator |
---|
equals |
Constructor Detail |
---|
public DefaultResourceNode(T userObject, boolean allowsChildren)
userObject
- the wrapped user / business objectallowsChildren
- a flag signalling whether the node allows child nodes at allpublic DefaultResourceNode(T userObject)
userObject
- the wrapped user / business objectpublic DefaultResourceNode(boolean allowsChildren)
allowsChildren
- a flag signalling whether the node allows child nodes at allpublic DefaultResourceNode()
Method Detail |
---|
public java.util.List<CapacityLine> getCapacityLines(int rowHeight, boolean major)
IResourceNode
getCapacityLines
in interface IResourceNode<S extends ITimelineObject>
rowHeight
- the height of the row in which the resource gets displayedmajor
- a flag signalling whether the application queries the major or
the minor capacity lines
public int getCapacityLocation(int rowHeight, double capacity)
IResourceNode
getCapacityLocation
in interface IResourceNode<S extends ITimelineObject>
rowHeight
- the current height of the row in which the resource node gets
displayedcapacity
- the capacity for which to return a location
public double getCapacityAt(int rowHeight, int y)
IResourceNode
getCapacityAt
in interface IResourceNode<S extends ITimelineObject>
rowHeight
- the height of the rowy
- the location for which to return a capacity
public void addMajorCapacityLine(CapacityLine line)
line
- the capacity line to addpublic void removeMajorCapacityLine(CapacityLine line)
line
- the capacity line to removepublic void addMinorCapacityLine(CapacityLine line)
line
- the capacity line to addpublic void removeMinorCapacityLine(CapacityLine line)
line
- the capacity line to removepublic void clearMajorCapacityLines()
public void clearMinorCapacityLines()
public double getMaximumCapacity()
getMaximumCapacity
in interface IResourceNode<S extends ITimelineObject>
public void setMaximumCapacity(double capacity)
capacity
- the maximum capacity of the resource nodepublic double getMinimumCapacity()
getMinimumCapacity
in interface IResourceNode<S extends ITimelineObject>
public void setMinimumCapacity(double capacity)
capacity
- the minimum capacity of the resource node
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |