|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.graphics.components.TableAxisColumn
public class TableAxisColumn
The TableAxisColumn class stores column attributes for a table axis.
GanttChart ganttChart = new GanttChart(); GanttChartModel ganttChartModel = ganttChart.getGraphModel(); TableAxisModel tableAxisModel = ganttChartModel.getTableAxisModel(); TableAxisColumn tac[] = new TableAxisColumn[3]; tac[0] = new TableAxisColumn(variable1); tac[1] = new TableAxisColumn(variable2); tac[2] = new TableAxisColumn(variable3); tableAxisModel.setColumns(tac);Use setSort method to cause a graph to sort the associated data values. The default sort is GraphConstants.SORT_NONE meaning that graph will order the values in the same order as they found in the data source.
You can also set the column width and visibility.
Changing a property in a TableAxisColumn will cause a PropertyChangeEvent to be fired.
Changing a property in any of the contained models will also cause the TableAxisColumn to
fire a PropertyChangeEvent. No matter how deep the contained model is the event will
cascade up the containment chain to finally reach the TableAxisColumn which will fire an
event. The table to which the TableAxisColumn is attached, listens to these events and the
changes are applied to the table immediately.
ModelBase
,
TableAxisModel
,
Variable
Constructor Summary | |
---|---|
TableAxisColumn(Variable var)
Constructor designating variable to display in the table. |
|
TableAxisColumn(Variable var,
int sort)
Constructor designating variable to display in the table along with the sort type for this column. |
|
TableAxisColumn(Variable var,
int sort,
int index)
Constructor designating variable to display in the table along with the sort type for this column and the sort index if multiple variable sort is to be done. |
|
TableAxisColumn(Variable var,
int sort,
int index,
com.sas.measures.BaseLength wid)
Constructor designating variable to display in the table along with the sort type for this column and the sort index if multiple variable sort is to be done and a column width. |
|
TableAxisColumn(Variable var,
int sort,
int index,
com.sas.measures.BaseLength wid,
boolean vis)
Constructor designating variable to display in the table along with the sort type for this column and the sort index if multiple variable sort is to be done and a column width and if the column is visible. |
Method Summary | |
---|---|
void |
apply(TableAxisColumn 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 |
getSort()
Returns the type of sort type applied to the values in the data column designated by this variable. |
int |
getSortIndex()
Returns the sort index applied to the values in the data column designated by this variable when multiple sort variables are designated. |
Variable |
getVariable()
Returns the Variable used in this table column. |
com.sas.measures.BaseLength |
getWidth()
Returns the width applied to the table column. |
int |
hashCode()
Computes the hash code for this TableAxisColumn . |
boolean |
isVisible()
Get whether or not the column is displayed. |
void |
setSort(int newSort)
Set the a sort type. |
void |
setSortIndex(int newSortIndex)
Set the order index for this sort to occur in if multiple sort variables have been specified. |
void |
setVisible(boolean newVisible)
Set whether or not the column is displayed. |
void |
setWidth(com.sas.measures.BaseLength newWidth)
Assigns a new width to be applied to the table column. |
Methods inherited from class com.sas.graphics.components.ModelBase |
---|
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setContainedModel |
Constructor Detail |
---|
public TableAxisColumn(Variable var)
var
- the Variable to be displayed.
java.lang.IllegalArgumentException
- if null Variable is passed in.public TableAxisColumn(Variable var, int sort)
var
- the Variable to be displayed.sort
- the type of sort
java.lang.IllegalArgumentException
- if null Variable is passed in.public TableAxisColumn(Variable var, int sort, int index)
var
- the Variable to be displayed.sort
- the type of sortindex
- order to place this variable in a multiple variable sort.
java.lang.IllegalArgumentException
- if index < 0.
java.lang.IllegalArgumentException
- if null Variable is passed in.public TableAxisColumn(Variable var, int sort, int index, com.sas.measures.BaseLength wid)
var
- the Variable to be displayed.wid
- the width of the column.sort
- the type of sortindex
- order to place this variable in a multiple variable sort.
java.lang.IllegalArgumentException
- if index < 0.
java.lang.IllegalArgumentException
- if null Variable is passed in.public TableAxisColumn(Variable var, int sort, int index, com.sas.measures.BaseLength wid, boolean vis)
var
- the Variable to be displayed.wid
- the width of the column.vis
- visibility of columnsort
- the type of sortindex
- order to place this variable in a multiple variable sort.
java.lang.IllegalArgumentException
- if index < 0.
java.lang.IllegalArgumentException
- if null Variable is passed in.
java.lang.IllegalArgumentException
- if null BaseLength is passed in.Method Detail |
---|
public void apply(TableAxisColumn theOtherObject)
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.
theOtherObject
- properties to apply to this instancepublic boolean equals(java.lang.Object obj)
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.
equals
in class ModelBase
obj
- the object to test for equality with this
TableAxisColumn
true
if the objects are the same;
false
otherwise.public void setWidth(com.sas.measures.BaseLength newWidth) throws java.lang.IllegalArgumentException
newWidth
- Width setting for this table column
java.lang.IllegalArgumentException
- if newWidth is null.getWidth()
public com.sas.measures.BaseLength getWidth()
setWidth(com.sas.measures.BaseLength)
public Variable getVariable()
public void setVisible(boolean newVisible)
newVisible
- true means column is displayedisVisible()
public boolean isVisible()
setVisible(boolean)
public void setSort(int newSort)
Valid sort values are:
GraphConstants.SORT_NONE
GraphConstants.SORT_ASCENDING
GraphConstants.SORT_DESCENDING
GraphConstants.SORT_ASCENDING_FORMATTED
GraphConstants.SORT_DESCENDING_FORMATTED
GraphConstants.SORT_ASCENDING_UNFORMATTED
GraphConstants.SORT_DESCENDING_UNFORMATTED
A default of GraphConstants.SORT_NONE is applied if an invalid sort value is specified.
newSort
- the type of sortGraphConstants
,
getSort()
public int getSort()
GraphConstants
public void setSortIndex(int newSortIndex)
newSortIndex
- order to place this variable in a multiple variable sort.
java.lang.IllegalArgumentException
- if index < 0.getSortIndex()
public int getSortIndex()
public int hashCode()
TableAxisColumn
.
hashCode
in class ModelBase
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |