|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjsky.timeline.DefaultTimeLineNode
public class DefaultTimeLineNode
An interface for a single node on the time line.
This code was developed by NASA, Goddard Space Flight Center, Code 588 for the Scientist's Expert Assistant (SEA) project.
| Field Summary | |
|---|---|
protected java.beans.VetoableChangeSupport |
fChangeSupport
|
protected java.awt.BasicStroke |
fDefaultStroke
|
protected int |
fDragMode
|
protected boolean |
fForceRecalculation
|
protected float |
fHandleHeight
|
protected float |
fHandleWidth
|
protected java.awt.geom.Rectangle2D.Float |
fLeftHandle
|
protected java.awt.geom.Line2D.Float |
fLHandleBottomShadowLine
|
protected java.awt.geom.Line2D.Float |
fLHandleLeftShadowLine
|
protected java.awt.geom.Line2D.Float |
fLHandleRightShadowLine
|
protected java.awt.geom.Line2D.Float |
fLHandleTopShadowLine
|
protected int |
fMode
|
protected VetoableTimeLineNodeModel |
fModel
|
protected java.beans.VetoableChangeListener |
fMyVetoListener
|
protected java.awt.geom.Line2D.Float |
fRHandleBottomShadowLine
|
protected java.awt.geom.Line2D.Float |
fRHandleLeftShadowLine
|
protected java.awt.geom.Line2D.Float |
fRHandleRightShadowLine
|
protected java.awt.geom.Line2D.Float |
fRHandleTopShadowLine
|
protected java.awt.geom.Rectangle2D.Float |
fRightHandle
|
protected java.awt.Color |
fSelectedColor
|
protected java.awt.BasicStroke |
fShadowStroke
|
protected java.awt.geom.Rectangle2D.Float |
fThumb
|
protected float |
fThumbBegin
|
protected float |
fThumbEnd
|
protected float |
fThumbHeight
|
protected java.awt.geom.Line2D.Float |
fThumbShadowLine
|
protected java.awt.geom.Line2D.Float |
fThumbTopShadowLine
|
protected TimeLine |
fTimeLine
|
protected java.awt.Color |
fUnselectedColor
|
| Fields inherited from interface jsky.timeline.TimeLineNode |
|---|
BIC, DEFAULT_FONT, DEFAULT_LABEL_SPACE, END_TIME, HIT_LEFT_EDGE, HIT_RIGHT_EDGE, LEFT_HANDLE_SELECTED, MODE, MOVE_CURSOR, NAME, NODE, NODE_MAX_SIZE_EXCEEDED, NODE_MIN_SIZE_EXCEEDED, NODE_OVERLAP, NODE_SELECTED, REVERSE_ROTATED_FONT, RIGHT_HANDLE_SELECTED, ROTATED_FONT, SELECTED_COLOR, START_TIME, UNSELECTED, UNSELECTED_COLOR |
| Constructor Summary | |
|---|---|
DefaultTimeLineNode()
constructor |
|
DefaultTimeLineNode(Time start,
Time end)
|
|
DefaultTimeLineNode(Time startTime,
Time endTime,
java.lang.String name)
|
|
DefaultTimeLineNode(VetoableTimeLineNodeModel model)
|
|
| Method Summary | |
|---|---|
void |
addVetoableChangeListener(java.beans.VetoableChangeListener listener)
add a property change listener to the node |
protected void |
calculateNodeDimensions()
calculate thumb's dimensions in pixels |
boolean |
containsPoint(java.awt.Point pt)
returns whether the specified point is in the node |
int |
getAreaForPoint(java.awt.Point pt)
returns what area of a time line node a point exists in |
java.awt.Point |
getCenterPoint()
returns the center point for the time line node |
java.awt.Cursor |
getCursor(java.awt.event.MouseEvent evt)
get the cursor for the specified point |
java.lang.String |
getDescription(java.awt.Point pt)
returns a description for the area at the specified point |
Time |
getDuration()
get the duration of the time line node |
Time |
getEndTime()
get the time on the time line that this node ends |
TimeLineNodeModel |
getModel()
get the node's underlying model |
TimeLine |
getParent()
get the parent time line |
java.awt.Color |
getSelectedColor()
get the the selected color the time line node |
int |
getSelectionMode()
get the selection mode of the time line node |
Time |
getStartTime()
get the time on the time line that this node starts |
java.lang.String |
getTimeLineNodeName()
get the name of the time line node |
java.awt.Color |
getUnselectedColor()
get the the unselected color the time line node |
void |
handleKeyEvent(java.awt.event.KeyEvent evt)
handle key event |
void |
handleMouseDragEvent(java.awt.event.MouseEvent evt)
handle mouse events |
void |
handleMouseEvent(java.awt.event.MouseEvent evt)
handle mouse events |
void |
handleMouseMoveEvent(java.awt.event.MouseEvent evt)
handle mouse events |
protected void |
init()
initializes the object. |
boolean |
intersects(TimeLineNode node)
returns whether the node intersects the passed in node |
boolean |
isDragging()
returns whether the node is currently being dragged |
boolean |
isSelected()
returns whther the node is currently selected. |
void |
moveTimeLineNodeBy(Time time)
move node by specified amount |
void |
paintTimeLineNode(java.awt.Graphics2D graphics)
paint the time line node |
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
remove a propertyChangeListener to the node |
void |
revertToPrevious()
revert the time line node to its previous position |
void |
setDuration(Time durationLength)
set the duration of the time line node |
void |
setEndTime(Time time)
set the time on the time line that this node ends |
void |
setModel(TimeLineNodeModel model)
set the time line node's underlying model |
void |
setParent(TimeLine timeLine)
set the parent time line |
void |
setSelectedColor(java.awt.Color color)
set the selected color for the time line node |
void |
setSelectionMode(int mode)
set the selection mode of the time linenode |
void |
setStartTime(Time time)
set the time that this node starts |
void |
setTimeLineNode(Time start,
Time end)
move node to a specified location |
void |
setTimeLineNodeName(java.lang.String name)
give the time line node a name |
void |
setUnselectedColor(java.awt.Color color)
set the unselected color for the time line node |
java.lang.String |
toString()
|
void |
vetoableChange(java.beans.PropertyChangeEvent evt)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected float fThumbHeight
protected float fHandleHeight
protected float fHandleWidth
protected java.awt.Color fSelectedColor
protected java.awt.Color fUnselectedColor
protected VetoableTimeLineNodeModel fModel
protected int fMode
protected int fDragMode
protected java.beans.VetoableChangeSupport fChangeSupport
protected float fThumbBegin
protected float fThumbEnd
protected java.awt.BasicStroke fDefaultStroke
protected java.awt.BasicStroke fShadowStroke
protected java.awt.geom.Line2D.Float fThumbShadowLine
protected java.awt.geom.Line2D.Float fThumbTopShadowLine
protected java.awt.geom.Line2D.Float fLHandleTopShadowLine
protected java.awt.geom.Line2D.Float fLHandleBottomShadowLine
protected java.awt.geom.Line2D.Float fLHandleRightShadowLine
protected java.awt.geom.Line2D.Float fLHandleLeftShadowLine
protected java.awt.geom.Line2D.Float fRHandleTopShadowLine
protected java.awt.geom.Line2D.Float fRHandleBottomShadowLine
protected java.awt.geom.Line2D.Float fRHandleRightShadowLine
protected java.awt.geom.Line2D.Float fRHandleLeftShadowLine
protected java.awt.geom.Rectangle2D.Float fThumb
protected java.awt.geom.Rectangle2D.Float fLeftHandle
protected java.awt.geom.Rectangle2D.Float fRightHandle
protected TimeLine fTimeLine
protected boolean fForceRecalculation
protected java.beans.VetoableChangeListener fMyVetoListener
| Constructor Detail |
|---|
public DefaultTimeLineNode()
public DefaultTimeLineNode(Time start,
Time end)
public DefaultTimeLineNode(Time startTime,
Time endTime,
java.lang.String name)
public DefaultTimeLineNode(VetoableTimeLineNodeModel model)
| Method Detail |
|---|
protected void init()
public void setSelectionMode(int mode)
setSelectionMode in interface TimeLineNodepublic int getSelectionMode()
getSelectionMode in interface TimeLineNodepublic void setUnselectedColor(java.awt.Color color)
setUnselectedColor in interface TimeLineNodepublic java.awt.Color getUnselectedColor()
getUnselectedColor in interface TimeLineNodepublic void setSelectedColor(java.awt.Color color)
setSelectedColor in interface TimeLineNodepublic java.awt.Color getSelectedColor()
getSelectedColor in interface TimeLineNodepublic Time getStartTime()
getStartTime in interface TimeLineNode
public void setStartTime(Time time)
throws DetailedPropertyVetoException
setStartTime in interface TimeLineNodeDetailedPropertyVetoException
public void moveTimeLineNodeBy(Time time)
throws DetailedPropertyVetoException
moveTimeLineNodeBy in interface TimeLineNodeDetailedPropertyVetoExceptionpublic Time getEndTime()
getEndTime in interface TimeLineNode
public void setEndTime(Time time)
throws DetailedPropertyVetoException
setEndTime in interface TimeLineNodeDetailedPropertyVetoExceptionpublic Time getDuration()
getDuration in interface TimeLineNode
public void setDuration(Time durationLength)
throws DetailedPropertyVetoException
setDuration in interface TimeLineNodeDetailedPropertyVetoExceptionpublic void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
addVetoableChangeListener in interface TimeLineNodepublic void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
removeVetoableChangeListener in interface TimeLineNodepublic void paintTimeLineNode(java.awt.Graphics2D graphics)
paintTimeLineNode in interface TimeLineNodegraphics - the graphics component to paintpublic void handleMouseEvent(java.awt.event.MouseEvent evt)
TimeLineNode
handleMouseEvent in interface TimeLineNodepublic void handleMouseDragEvent(java.awt.event.MouseEvent evt)
handleMouseDragEvent in interface TimeLineNodepublic void handleMouseMoveEvent(java.awt.event.MouseEvent evt)
handleMouseMoveEvent in interface TimeLineNode
public void handleKeyEvent(java.awt.event.KeyEvent evt)
throws DetailedPropertyVetoException
handleKeyEvent in interface TimeLineNodeDetailedPropertyVetoExceptionpublic void setTimeLineNodeName(java.lang.String name)
setTimeLineNodeName in interface TimeLineNodepublic java.lang.String getTimeLineNodeName()
getTimeLineNodeName in interface TimeLineNodepublic void setParent(TimeLine timeLine)
setParent in interface TimeLineNodepublic TimeLine getParent()
getParent in interface TimeLineNodeprotected void calculateNodeDimensions()
public boolean isDragging()
isDragging in interface TimeLineNodepublic boolean isSelected()
isSelected in interface TimeLineNodepublic void revertToPrevious()
revertToPrevious in interface TimeLineNode
public void vetoableChange(java.beans.PropertyChangeEvent evt)
throws DetailedPropertyVetoException
vetoableChange in interface java.beans.VetoableChangeListenerDetailedPropertyVetoExceptionpublic int getAreaForPoint(java.awt.Point pt)
getAreaForPoint in interface TimeLineNodepublic boolean intersects(TimeLineNode node)
intersects in interface TimeLineNodepublic java.awt.Point getCenterPoint()
getCenterPoint in interface TimeLineNode
public void setTimeLineNode(Time start,
Time end)
throws DetailedPropertyVetoException
setTimeLineNode in interface TimeLineNodeDetailedPropertyVetoExceptionpublic boolean containsPoint(java.awt.Point pt)
containsPoint in interface TimeLineNodepublic java.lang.String getDescription(java.awt.Point pt)
getDescription in interface TimeLineNodepublic TimeLineNodeModel getModel()
getModel in interface TimeLineNodepublic void setModel(TimeLineNodeModel model)
setModel in interface TimeLineNodepublic java.awt.Cursor getCursor(java.awt.event.MouseEvent evt)
getCursor in interface TimeLineNodepublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||