|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjsky.timeline.BlockTimeLineNode
public class BlockTimeLineNode
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.geom.Rectangle2D.Float |
fThumb
|
| 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 | |
|---|---|
BlockTimeLineNode(Time start,
Time end)
constructor |
|
BlockTimeLineNode(Time startTime,
Time endTime,
java.lang.String name)
|
|
| 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 |
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 java.beans.VetoableChangeSupport fChangeSupport
protected java.awt.geom.Rectangle2D.Float fThumb
| Constructor Detail |
|---|
public BlockTimeLineNode(Time start,
Time end)
public BlockTimeLineNode(Time startTime,
Time endTime,
java.lang.String name)
| Method Detail |
|---|
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 paintTimeLineNode(java.awt.Graphics2D graphics)
paintTimeLineNode in interface TimeLineNodegraphics - the graphics component to paintpublic void handleMouseEvent(java.awt.event.MouseEvent evt)
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 void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
addVetoableChangeListener in interface TimeLineNodepublic void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
removeVetoableChangeListener 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 | ||||||||