com.jrefinery.data
Class GanttTask

java.lang.Object
  extended by com.jrefinery.data.GanttTask
All Implemented Interfaces:
ChartPanelConstants, java.io.Serializable

public class GanttTask
extends java.lang.Object
implements java.io.Serializable, ChartPanelConstants

A representation of a task id and assocated list of time allocations.

This class is used as a building block for the GanttSeriesCollection class that implements the IntervalCategoryDataset that, in turn, can be used to construct Gantt charts.

Time allocations for any given task should be non-overlapping. This is not verified in this version...

See Also:
Serialized Form

Field Summary
protected  java.lang.String defaultPropertyType
           
protected  java.lang.Object id
          Arbitrary identifier for this task
protected  java.util.List times
          A list of time allocations for the above task
 
Fields inherited from interface com.jrefinery.chart.ChartPanelConstants
ADDTASK_ACTION_COMMAND, AUTO_RANGE_BOTH_ACTION_COMMAND, AUTO_RANGE_HORIZONTAL_ACTION_COMMAND, AUTO_RANGE_VERTICAL_ACTION_COMMAND, COPY_ACTION_COMMAND, CUT_ACTION_COMMAND, DEFAULT_BUFFER_USED, DEFAULT_HEIGHT, DEFAULT_MAXIMUM_DRAW_HEIGHT, DEFAULT_MAXIMUM_DRAW_WIDTH, DEFAULT_MINIMUM_DRAW_HEIGHT, DEFAULT_MINIMUM_DRAW_WIDTH, DEFAULT_WIDTH, INJECT_TASK_PROPERTIES, INSERT_ACTION_COMMAND, LOAD_MISSION_COMMAND, MINIMUM_DRAG_ZOOM_SIZE, PASTE_ACTION_COMMAND, PASTE_CHAMBER_1_COMMAND, PASTE_CHAMBER_2_COMMAND, PASTE_CHAMBER_3_COMMAND, PASTE_CHAMBER_4_COMMAND, PRINT_ACTION_COMMAND, PROPERTIES_ACTION_COMMAND, SAMPLE_TASK_PROPERTIES, SAVE_ACTION_COMMAND, SAVE_MISSION_COMMAND, SELECT_ALL_COMMAND, SELECT_CHAMBER_1_COMMAND, SELECT_CHAMBER_2_COMMAND, SELECT_CHAMBER_3_COMMAND, SELECT_CHAMBER_4_COMMAND, STIRRER_TASK_PROPERTIES, TASK_PROPERTIES_ACTION_COMMAND, UNDO_CUT_COMMAND, ZOOM_IN_BOTH_ACTION_COMMAND, ZOOM_IN_HORIZONTAL_ACTION_COMMAND, ZOOM_IN_VERTICAL_ACTION_COMMAND, ZOOM_OUT_BOTH_ACTION_COMMAND, ZOOM_OUT_HORIZONTAL_ACTION_COMMAND, ZOOM_OUT_VERTICAL_ACTION_COMMAND
 
Constructor Summary
GanttTask(java.lang.Object name)
          Constructs a new task with the specified name.
GanttTask(java.lang.Object name, java.lang.String propertyType)
           
 
Method Summary
 GanttTask add(TimeAllocation allocation)
          Adds a time allocation for the task.
 TaskProperties getDefaultProperty()
           
 java.lang.String getDefaultPropertyType()
           
 java.lang.Object getId()
          Returns the id associated with this task
 int getItemCount()
          Returns the number of time allocations associated with this task.
 java.util.Iterator iterator()
          Returns the time allocation iterator for task.
 void remove(TimeAllocation allocation)
           
 TimeAllocation span()
          Returns shortest time allocation spanning the task
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected java.lang.Object id
Arbitrary identifier for this task


times

protected java.util.List times
A list of time allocations for the above task


defaultPropertyType

protected java.lang.String defaultPropertyType
Constructor Detail

GanttTask

public GanttTask(java.lang.Object name)
Constructs a new task with the specified name.

Parameters:
name - The series name.

GanttTask

public GanttTask(java.lang.Object name,
                 java.lang.String propertyType)
Method Detail

getItemCount

public int getItemCount()
Returns the number of time allocations associated with this task.

Returns:
The item count.

getId

public java.lang.Object getId()
Returns the id associated with this task

Returns:
the task's identifier

iterator

public java.util.Iterator iterator()
Returns the time allocation iterator for task.

Returns:
interator over task's list of TimeAllocations

add

public GanttTask add(TimeAllocation allocation)
Adds a time allocation for the task.

Parameters:
allocation - The time allocation.
Returns:
this

span

public TimeAllocation span()
Returns shortest time allocation spanning the task


remove

public void remove(TimeAllocation allocation)

getDefaultProperty

public TaskProperties getDefaultProperty()

getDefaultPropertyType

public java.lang.String getDefaultPropertyType()


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.