jsky.timeline
Interface TimeLineNode

All Superinterfaces:
java.util.EventListener, java.beans.VetoableChangeListener
All Known Implementing Classes:
BlockTimeLineNode, DefaultTimeLineNode

public interface TimeLineNode
extends java.beans.VetoableChangeListener

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.

Version:
04/27/99
Author:
M. Fishman

Field Summary
static java.lang.String BIC
           
static java.awt.Font DEFAULT_FONT
           
static double DEFAULT_LABEL_SPACE
           
static java.lang.String END_TIME
           
static java.lang.String HIT_LEFT_EDGE
           
static java.lang.String HIT_RIGHT_EDGE
           
static int LEFT_HANDLE_SELECTED
           
static java.lang.String MODE
           
static java.awt.Cursor MOVE_CURSOR
           
static java.lang.String NAME
           
static java.lang.String NODE
           
static java.lang.String NODE_MAX_SIZE_EXCEEDED
           
static java.lang.String NODE_MIN_SIZE_EXCEEDED
           
static java.lang.String NODE_OVERLAP
           
static int NODE_SELECTED
           
static java.awt.Font REVERSE_ROTATED_FONT
           
static int RIGHT_HANDLE_SELECTED
           
static java.awt.Font ROTATED_FONT
           
static java.lang.String SELECTED_COLOR
           
static java.lang.String START_TIME
           
static int UNSELECTED
           
static java.lang.String UNSELECTED_COLOR
           
 
Method Summary
 void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
          add a property change listener to the node
 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 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 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 time
 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 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 point on the time line 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
 
Methods inherited from interface java.beans.VetoableChangeListener
vetoableChange
 

Field Detail

UNSELECTED

static final int UNSELECTED
See Also:
Constant Field Values

LEFT_HANDLE_SELECTED

static final int LEFT_HANDLE_SELECTED
See Also:
Constant Field Values

NODE_SELECTED

static final int NODE_SELECTED
See Also:
Constant Field Values

RIGHT_HANDLE_SELECTED

static final int RIGHT_HANDLE_SELECTED
See Also:
Constant Field Values

DEFAULT_FONT

static final java.awt.Font DEFAULT_FONT

ROTATED_FONT

static final java.awt.Font ROTATED_FONT

REVERSE_ROTATED_FONT

static final java.awt.Font REVERSE_ROTATED_FONT

MOVE_CURSOR

static final java.awt.Cursor MOVE_CURSOR

DEFAULT_LABEL_SPACE

static final double DEFAULT_LABEL_SPACE
See Also:
Constant Field Values

NODE_OVERLAP

static final java.lang.String NODE_OVERLAP
See Also:
Constant Field Values

NODE_MIN_SIZE_EXCEEDED

static final java.lang.String NODE_MIN_SIZE_EXCEEDED
See Also:
Constant Field Values

NODE_MAX_SIZE_EXCEEDED

static final java.lang.String NODE_MAX_SIZE_EXCEEDED
See Also:
Constant Field Values

HIT_LEFT_EDGE

static final java.lang.String HIT_LEFT_EDGE
See Also:
Constant Field Values

HIT_RIGHT_EDGE

static final java.lang.String HIT_RIGHT_EDGE
See Also:
Constant Field Values

BIC

static final java.lang.String BIC
See Also:
Constant Field Values

MODE

static final java.lang.String MODE
See Also:
Constant Field Values

SELECTED_COLOR

static final java.lang.String SELECTED_COLOR
See Also:
Constant Field Values

UNSELECTED_COLOR

static final java.lang.String UNSELECTED_COLOR
See Also:
Constant Field Values

START_TIME

static final java.lang.String START_TIME
See Also:
Constant Field Values

END_TIME

static final java.lang.String END_TIME
See Also:
Constant Field Values

NODE

static final java.lang.String NODE
See Also:
Constant Field Values

NAME

static final java.lang.String NAME
See Also:
Constant Field Values
Method Detail

setSelectionMode

void setSelectionMode(int mode)
set the selection mode of the time linenode


getSelectionMode

int getSelectionMode()
get the selection mode of the time line node


setUnselectedColor

void setUnselectedColor(java.awt.Color color)
set the unselected color for the time line node


getUnselectedColor

java.awt.Color getUnselectedColor()
get the the unselected color the time line node


setSelectedColor

void setSelectedColor(java.awt.Color color)
set the selected color for the time line node


getSelectedColor

java.awt.Color getSelectedColor()
get the the selected color the time line node


getStartTime

Time getStartTime()
get the time that this node starts


setStartTime

void setStartTime(Time time)
                  throws DetailedPropertyVetoException
set the point on the time line that this node starts

Throws:
DetailedPropertyVetoException

getEndTime

Time getEndTime()
get the time that this node ends


setEndTime

void setEndTime(Time time)
                throws DetailedPropertyVetoException
set the time that this node ends

Throws:
DetailedPropertyVetoException

moveTimeLineNodeBy

void moveTimeLineNodeBy(Time time)
                        throws DetailedPropertyVetoException
move node by specified time

Throws:
DetailedPropertyVetoException

getDuration

Time getDuration()
get the duration of the time line node


setDuration

void setDuration(Time durationLength)
                 throws DetailedPropertyVetoException
set the duration of the time line node

Throws:
DetailedPropertyVetoException

setTimeLineNodeName

void setTimeLineNodeName(java.lang.String name)
give the time line node a name


getTimeLineNodeName

java.lang.String getTimeLineNodeName()
get the name of the time line node


paintTimeLineNode

void paintTimeLineNode(java.awt.Graphics2D graphics)
paint the time line node

Parameters:
graphics - the graphics component to paint

addVetoableChangeListener

void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
add a property change listener to the node


removeVetoableChangeListener

void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
remove a propertyChangeListener to the node


handleMouseEvent

void handleMouseEvent(java.awt.event.MouseEvent evt)
handle mouse events


handleMouseDragEvent

void handleMouseDragEvent(java.awt.event.MouseEvent evt)
handle mouse events


handleMouseMoveEvent

void handleMouseMoveEvent(java.awt.event.MouseEvent evt)
handle mouse events


handleKeyEvent

void handleKeyEvent(java.awt.event.KeyEvent evt)
                    throws DetailedPropertyVetoException
handle key event

Throws:
DetailedPropertyVetoException

setParent

void setParent(TimeLine timeLine)
set the parent time line


getParent

TimeLine getParent()
get the parent time line


isDragging

boolean isDragging()
returns whether the node is currently being dragged


isSelected

boolean isSelected()
returns whther the node is currently selected


revertToPrevious

void revertToPrevious()
revert the time line node to its previous position


intersects

boolean intersects(TimeLineNode node)
returns whether the node intersects the passed in node


getAreaForPoint

int getAreaForPoint(java.awt.Point pt)
returns what area of a time line node a point exists in


getCenterPoint

java.awt.Point getCenterPoint()
returns the center point for the time line node


setTimeLineNode

void setTimeLineNode(Time start,
                     Time end)
                     throws DetailedPropertyVetoException
move node to a specified location

Throws:
DetailedPropertyVetoException

containsPoint

boolean containsPoint(java.awt.Point pt)
returns whether the specified point is in the node


getDescription

java.lang.String getDescription(java.awt.Point pt)
returns a description for the area at the specified point


getModel

TimeLineNodeModel getModel()
get the node's underlying model


setModel

void setModel(TimeLineNodeModel model)
set the time line node's underlying model


getCursor

java.awt.Cursor getCursor(java.awt.event.MouseEvent evt)
get the cursor for the specified point