com.sas.graphics.components.ganttchart
Class GanttChartBreakTimeTableDataModel

com.sas.graphics.components.ganttchart.GanttChartBreakTimeTableDataModel

public class GanttChartBreakTimeTableDataModel

A GanttChartBreaktimeTableDataModel sets breaktimes on a Gantt chart. The breaks can be different for individual task bars and the calendar variable found here is mapped to the GanttChartTableDataModel.setCalendarVariable() set on the schedule table.

Since:
SAS 9.2
See Also:
GanttChartDataModel, GanttChart

Constructor Summary
GanttChartBreakTimeTableDataModel()
          Default Constructor
GanttChartBreakTimeTableDataModel(javax.swing.table.TableModel newModel)
          Constructor with assigned model
 
Method Summary
 void apply(GanttChartBreakTimeTableDataModel theOtherModel)
          Utility method to convey properties contained in "theOtherModel" to this object.
 boolean equals(java.lang.Object obj)
          Determines whether another object is equal to this GanttChartBreaktimeTableDataModel.
 Variable getCalendarVariable()
          Returns the data column that was most recently set in the calendar role by the setCalendarVariable() method.
 Variable getDurationVariable()
          Returns the data column that was most recently set in the Duration role by the setDurationVariable() method.
 Variable getFinishVariable()
          Returns the data column that was most recently set in the finish role by the setStartVariable() method.
 javax.swing.table.TableModel getModel()
          Returns the Swing TableModel containing chart data.
 Variable getStartVariable()
          Returns the data column that was most recently set in the start role by the setStartVariable() method.
 int hashCode()
          Computes the hash code for this GanttChartAnnotateTableDataModel.
 void setCalendarVariable(Variable newVariable)
          Specifies a variable containing the calendar variable value in which to draw breaks in schedule.
 void setDurationVariable(Variable newVariable)
          Duration of a break.
 void setFinishVariable(Variable newVariable)
          Specifies a variable containing the finish variable value in which to draw breaks in schedule.
 void setModel(javax.swing.table.TableModel newModel)
          Sets Swing TableModel containing chart data.
 void setStartVariable(Variable newVariable)
          Specifies a variable containing the start variable value in which to draw breaks in schedule.
 
Methods inherited from class com.sas.graphics.components.DataModel
apply, getLocale, getRulesContext, getSortStrategy, setLocale, setRulesContext, setSortStrategy
 
Methods inherited from class com.sas.graphics.components.ModelBase
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setContainedModel
 

Constructor Detail

GanttChartBreakTimeTableDataModel

public GanttChartBreakTimeTableDataModel()
Default Constructor


GanttChartBreakTimeTableDataModel

public GanttChartBreakTimeTableDataModel(javax.swing.table.TableModel newModel)
Constructor with assigned model

Method Detail

apply

public void apply(GanttChartBreakTimeTableDataModel theOtherModel)
Utility method to convey properties contained in "theOtherModel" to this object.
Note: Contained "models" (i.e. properties that are subclasses of ModelBase) will in turn be called on to convey their properties to the like contained models in the other object. In that respect this can be considered a "tree" type copy.
Also Note: This is a deep copy. Thus after the copy, mutable properties will not be shared by the two instances.

Parameters:
theOtherModel - properties applied to this instance

equals

public boolean equals(java.lang.Object obj)
Determines whether another object is equal to this GanttChartBreaktimeTableDataModel.

The result is true if and only if the argument is not null and is a GanttChartBreaktimeTableDataModel object that has the same property values as this object.

Overrides:
equals in class DataModel
Parameters:
obj - the object to test for equality with this GanttChartBreaktimeTableDataModel
Returns:
true if the objects are the same; false otherwise.

hashCode

public int hashCode()
Computes the hash code for this GanttChartAnnotateTableDataModel.

Overrides:
hashCode in class DataModel
Returns:
a hash code value for this object.

setModel

public void setModel(javax.swing.table.TableModel newModel)
Sets Swing TableModel containing chart data.

Parameters:
newModel - containing chart data
See Also:
getModel()

getModel

public javax.swing.table.TableModel getModel()
Returns the Swing TableModel containing chart data.

Returns:
TableModel of chart data
See Also:
setModel(javax.swing.table.TableModel)

setStartVariable

public void setStartVariable(Variable newVariable)
Specifies a variable containing the start variable value in which to draw breaks in schedule.

Note: This variable must be the same format as the chart's schedule EarlyStart and EarlyFinish Variables and have a valid date format specifed on the newVariable.
Examples of valid date formats are:

Parameters:
newVariable - contains the date position to start a break time.
Throws:
java.lang.IllegalArgumentException - if format is null, needs a valid date format specifed.
See Also:
getStartVariable()

getStartVariable

public Variable getStartVariable()
Returns the data column that was most recently set in the start role by the setStartVariable() method.

Returns:
variable for start postision of a break in the schedule
See Also:
setStartVariable(com.sas.graphics.components.Variable)

setFinishVariable

public void setFinishVariable(Variable newVariable)
Specifies a variable containing the finish variable value in which to draw breaks in schedule.

Note: This variable must be the same format as the chart's schedule EarlyStart and EarlyFinish Variables and have a valid date format specifed on the newVariable.
Examples of valid date formats are:

Parameters:
newVariable - contains the date position to finish a break time.
Throws:
java.lang.IllegalArgumentException - if format is null, needs a valid date format specifed.
See Also:
getFinishVariable()

getFinishVariable

public Variable getFinishVariable()
Returns the data column that was most recently set in the finish role by the setStartVariable() method.

Returns:
variable for finish postision of a break in the schedule
See Also:
setFinishVariable(com.sas.graphics.components.Variable)

setDurationVariable

public void setDurationVariable(Variable newVariable)
Duration of a break. When the Finish variable has not been set or has a missing value, the duration is used to calculate the finish value from the start variable value.

Parameters:
newVariable - duration value for a break.
See Also:
getDurationVariable()

getDurationVariable

public Variable getDurationVariable()
Returns the data column that was most recently set in the Duration role by the setDurationVariable() method. Returns a null if the variable role has not been set.

Returns:
variable containing duration values
See Also:
setDurationVariable(com.sas.graphics.components.Variable)

setCalendarVariable

public void setCalendarVariable(Variable newVariable)
Specifies a variable containing the calendar variable value in which to draw breaks in schedule. This is matched with the GanttChartTableDataModel.getCalendarVariable() values and used to determine which breaktime calendar is applied to each task.

Parameters:
newVariable - contains the calendar for a break time.
See Also:
getCalendarVariable()

getCalendarVariable

public Variable getCalendarVariable()
Returns the data column that was most recently set in the calendar role by the setCalendarVariable() method.

Returns:
variable for calendar of a break in the schedule of a task
See Also:
setCalendarVariable(com.sas.graphics.components.Variable)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.