com.sas.graphics.components
Class TableAxisZone

com.sas.graphics.components.TableAxisZone

public class TableAxisZone

The TableAxisZone class stores zone attributes for a table axis. Zoning can be done based a Variable displayed in the TableAxis or by specifying a level in the tree of a Hierarchical TreeTable.

Usage

An array of TableAxisColumn is used to set the columns of a TableAxis with the TableAxisModel.setColumns method. The Variables used in a visible column of this table can be used to zone by. In a hierarchical tree table version of the table, you can also specify a level in the tree to zone by. These zoning Variables and level's will be applied in the order they appear in the array order they occur in TableAxisModel.setZones() method.
You can access a TableAxisModel in the chart by calling the getTableAxisModel() on the GraphModel. From there you can specify the TableAxisZones you wish to see in the table and chart.
Ex.
 GanttChart ganttChart = new GanttChart();
 GanttChartModel ganttChartModel = ganttChart.getGraphModel();
 TableAxisModel tableAxisModel = ganttChartModel.getTableAxisModel();
 TableAxisColumn column[] = tableAxisModel.getColumns();
 
 TableAxisZone taz[] = new TableAxisZone[2];
 taz[0] = new TableAxisZone(column[0].getVariable()); 
 taz[1] = new TableAxisZone(2);  // level 2 of a hierarchical tree table
 tableAxisModel.setZones(taz);
 
 

Behavior

All variables specified as a zone must also be specified as a visible TableAxisColumn. Variables specified as zones that are not also a visible TableAxisColumn will be ignored.

Since:
SAS 9.1.2
See Also:
ModelBase, TableAxisModel, TableAxisColumn, Variable

Constructor Summary
TableAxisZone(int treeLevel)
          Constructor designating the level in the tree to zone on.
TableAxisZone(Variable var)
          Constructor designating variable to create a zone on in the table and chart.
 
Method Summary
 void apply(TableAxisZone theOtherObject)
          Utility method to convey properties contained in "theOtherObject" to this object.
 boolean equals(java.lang.Object obj)
          Determines whether another object is equal to this TableAxisColumn.
 int getTreeLevel()
          Returns the Level used for this zone.
 Variable getVariable()
          Returns the Variable used for this zone.
 int hashCode()
          Computes the hash code for this TableAxisZone.
 
Methods inherited from class com.sas.graphics.components.ModelBase
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setContainedModel
 

Constructor Detail

TableAxisZone

public TableAxisZone(Variable var)
Constructor designating variable to create a zone on in the table and chart. The variable must be a variable also used in a TableAxisColumn and be visible in the in the table. Use TableAxisModel.setColumns() to specify columns in the table.

Parameters:
var - the Variable to be used for zoning
Throws:
java.lang.IllegalArgumentException - if null Variable is passed in.

TableAxisZone

public TableAxisZone(int treeLevel)
Constructor designating the level in the tree to zone on.

Parameters:
treeLevel - Tree Level to zone table and chart on.
Throws:
java.lang.IllegalArgumentException - if level < 0.
Method Detail

apply

public void apply(TableAxisZone theOtherObject)
Utility method to convey properties contained in "theOtherObject" 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:
theOtherObject - properties applied to this instance

equals

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

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

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

getVariable

public Variable getVariable()
Returns the Variable used for this zone.

Returns:
Variable for the table zone

getTreeLevel

public int getTreeLevel()
Returns the Level used for this zone.

Returns:
Level in the tree for the table zone

hashCode

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

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



Copyright © 2009 SAS Institute Inc. All Rights Reserved.