|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.graphics.components.TableAxisModel
public class TableAxisModel
The TableAxisModel class stores general appearance settings for a table axis as well as the chart's horizontal grid lines.
GanttChart ganttChart = new GanttChart(); GanttChartModel ganttChartModel = ganttChart.getGraphModel(); TableAxisModel tableAxisModel = ganttChartModel.getTableAxisModel();Once you get the TableAxisModel, you can modify the properties. Continuing on our previous example, say we want to set the table axis' header background color to white.
tableAxisModel.setHeaderBackgroundColor(Color.WHITE);Changing a property in the TableAxisModel will cause a PropertyChangeEvent to be fired. Changing a property in any of the contained models will also cause the TableAxisModel to fire a PropertyChangeEvent. No matter how deep the contained model is the event will cascade up the containment chain to finally reach the TableAxisModel which will fire an event. The table to which the TableAxisModel is attached, listens to these events and the changes are applied to the table immediately.
ModelBase
,
TextStyle
,
GanttChartModel
,
StrokeLineStyle
Constructor Summary | |
---|---|
TableAxisModel()
|
Method Summary | |
---|---|
void |
addTableCellPopupMenuItem(com.sas.swing.visuals.treetable.CellAction itemToBeAdded)
Add an item to the end of the menu. |
void |
apply(TableAxisModel theOtherObject)
Utility method to convey properties contained in "theOtherObject" to this object. |
void |
clearTableColumnEditable()
Remove all column-editable settings. |
void |
clearTableRowEditable()
Remove all row-editable settings. |
boolean |
equals(java.lang.Object obj)
Determines whether another object is equal to this TableAxisModel . |
java.util.Iterator |
getAllLinkedTasks()
Return an iterator that will produce all tasks for which links are currently set. |
com.sas.measures.BaseLength |
getCellPadding()
Returns the vertical padding applied to the table's cell text. |
TableAxisColumn[] |
getColumns()
Returns the current table axis displayed columns. |
StrokeLineStyle |
getGridLineStyle()
Get the line style for the chart's grid lines. |
HierarchyModel |
getHierarchyModel()
|
CellStyle |
getLabelCellStyle()
Returns the CellStyle that contains the set of display properties used to define the appearance of the table header including its background color and frame line color. |
TextStyle |
getLabelTextStyle()
Return the text attributes for the table header text. |
int |
getPreferredExpansionDepth()
Get the expansion depth. |
TextStyle |
getRowSelectionFontStyle()
This method if for internal use only. |
com.sas.swing.visuals.treetable.CellAction |
getTableCellPopupMenuItem(int index)
Get a single item from the menu; the first item has index 0. |
int |
getTableCellPopupMenuItemCount()
Tell how many items are currently in the cell popup menu. |
boolean |
getTableColumnEditable(java.lang.String colName)
Tell whether a single column is marked as editable or not. |
boolean |
getTableRowEditable(java.lang.String taskName)
Tell whether a single row is marked as editable or not. |
java.lang.String |
getTaskLink(java.lang.String taskName)
Get a task link, or null if the task has no link. |
CellStyle |
getValueCellStyle()
Returns the CellStyle that contains the set of display properties used to define the appearance of the table cells including its background color and frame line color. |
TextStyle |
getValueTextStyle()
Return the text attributes for the table cell text. |
TableAxisZone[] |
getZones()
Returns the current table axis zones. |
int |
hashCode()
Computes the hash code for this TableAxisModel . |
boolean |
isGridInFront()
Returns true if the grid drawn in front of the graph elements. |
boolean |
isRootVisible()
Returns if the root of a treetable is visible. |
boolean |
isTableCellPopupMenuEnabled()
Is the table's pop-up menu enabled? |
boolean |
isTableEditable()
Return the whole-table-editable setting. |
boolean |
isTableEditableSet()
Has the whole-table-editable flag been set? |
java.util.Set |
keySetTableColumnEditable()
Retrieve the set of keys for all column-editable settings. |
java.util.Set |
keySetTableRowEditable()
Retrieve the set of keys for all row-editable settings. |
void |
putTableColumnEditable(java.lang.String colName,
boolean editable)
Mark a single column as editable or not. |
void |
putTableRowEditable(java.lang.String taskName,
boolean editable)
Mark a single row as editable or not. |
void |
removeAllTableCellPopupMenuItems()
Remove all items from the menu. |
void |
removeAllTaskLinks()
Remove all task links. |
void |
removeTableCellPopupMenuItem(com.sas.swing.visuals.treetable.CellAction itemToBeRemoved)
Remove an item from the menu. |
void |
removeTableColumnEditable(java.lang.String colName)
Remove the column-editable setting for a column. |
void |
removeTableRowEditable(java.lang.String taskName)
Remove the row-editable setting for a row. |
void |
setCellPadding(com.sas.measures.BaseLength newPadding)
Assigns a new Vertical Padding to be applied to the table's cell text. |
void |
setColumns(TableAxisColumn[] newColumns)
Establish the columns to display in the table and the order to display them. |
void |
setGridInFront(boolean inFront)
Sets grid lines in front or back of the graph elements. |
void |
setGridLineStyle(StrokeLineStyle newLineStyle)
Set the line style for the chart's horizontal grid lines. |
void |
setHierarchyModel(HierarchyModel newModel)
Set the hierarchy attributes for the tree. |
void |
setLabelCellStyle(CellStyle newCellStyle)
Sets the CellStyle that contains the set of display properties used to define the appearance of the table header including its background color and frame line color. |
void |
setLabelTextStyle(TextStyle labelTextStyle)
Set the text attributes for the table header text. |
void |
setPreferredExpansionDepth(int newDepth)
Set the number of levels to expand from the top level. |
void |
setRootVisible(boolean newRootVisible)
Set if the root row is visible when creating an hierarchical treetable. |
void |
setRowSelectionFontStyle(TextStyle valueRowSelFontStyle)
This method if for internal use only. |
void |
setTableCellPopupMenuEnabled(boolean newEnabled)
Enable or disable the table's pop-up menu |
void |
setTableEditable(boolean newEditable)
Make the whole table editable or non-editable. |
void |
setTaskLink(java.lang.String taskName,
java.lang.String newLink)
Add/remove a task link. |
void |
setValueCellStyle(CellStyle newCellStyle)
Sets the CellStyle that contains the set of display properties used to define the appearance of the table cells including its background color and frame line color. |
void |
setValueTextStyle(TextStyle valueTextStyle)
Set the text attributes for the table cell text. |
void |
setZones(TableAxisZone[] newZones)
Set the zones to be displayed in the table. |
void |
unsetTableEditable()
Retract the whole-table-editable setting. |
Methods inherited from class com.sas.graphics.components.ModelBase |
---|
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setContainedModel |
Constructor Detail |
---|
public TableAxisModel()
Method Detail |
---|
public void apply(TableAxisModel 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 applied to this instancepublic void setLabelTextStyle(TextStyle labelTextStyle) throws java.lang.IllegalArgumentException
labelTextStyle
- the new repository for the header's text attributes
java.lang.IllegalArgumentException
- if labelTextStyle is null.getLabelTextStyle()
,
TextStyle.apply(com.sas.graphics.components.TextStyle)
public TextStyle getLabelTextStyle()
setLabelTextStyle(com.sas.graphics.components.TextStyle)
public void setValueTextStyle(TextStyle valueTextStyle) throws java.lang.IllegalArgumentException
valueTextStyle
- the new repository for the axis' cell attributes
java.lang.IllegalArgumentException
- if valueTextStyle is null.getValueTextStyle()
,
TextStyle.apply(com.sas.graphics.components.TextStyle)
public void setRowSelectionFontStyle(TextStyle valueRowSelFontStyle) throws java.lang.IllegalArgumentException
valueRowSelFontStyle
- font to be applied for the row selection made.
java.lang.IllegalArgumentException
- if valueRowSelFontStyle is null.getRowSelectionFontStyle()
public TextStyle getRowSelectionFontStyle()
setRowSelectionFontStyle(com.sas.graphics.components.TextStyle)
public TextStyle getValueTextStyle()
setValueTextStyle(com.sas.graphics.components.TextStyle)
public void setLabelCellStyle(CellStyle newCellStyle)
java.lang.IllegalArgumentException
- if newCellStyle is null.getLabelCellStyle()
public CellStyle getLabelCellStyle()
setLabelCellStyle(com.sas.graphics.components.CellStyle)
public void setValueCellStyle(CellStyle newCellStyle)
java.lang.IllegalArgumentException
- if newCellStyle is null.getValueCellStyle()
public CellStyle getValueCellStyle()
setValueCellStyle(com.sas.graphics.components.CellStyle)
public void setGridLineStyle(StrokeLineStyle newLineStyle) throws java.lang.IllegalArgumentException
newLineStyle
- the new repository for the grid's line attributes
java.lang.IllegalArgumentException
- if newLineStyle is null.getGridLineStyle()
,
StrokeLineStyle.apply(com.sas.graphics.components.StrokeLineStyle)
public StrokeLineStyle getGridLineStyle()
setGridLineStyle(com.sas.graphics.components.StrokeLineStyle)
public boolean isGridInFront()
setGridInFront(boolean)
public void setGridInFront(boolean inFront)
inFront
- grid drawn in front of the chart elements?isGridInFront()
public void setHierarchyModel(HierarchyModel newModel)
newModel
- the new HierarchyModel for the tree
java.lang.IllegalArgumentException
- if newModel is null.getHierarchyModel()
public HierarchyModel getHierarchyModel()
public boolean equals(java.lang.Object obj)
TableAxisModel
.
The result is true
if and only if the argument is not
null
and is a TableAxisModel
object that has the same
property values as this object.
equals
in class ModelBase
obj
- the object to test for equality with this
TableAxisModel
true
if the objects are the same;
false
otherwise.public void setRootVisible(boolean newRootVisible)
newRootVisible
- root node is visible or not.isRootVisible()
public boolean isRootVisible()
setRootVisible(boolean)
public void setCellPadding(com.sas.measures.BaseLength newPadding) throws java.lang.IllegalArgumentException
newPadding
- padding setting for the table rows
java.lang.IllegalArgumentException
- if newPadding is null.getCellPadding()
public com.sas.measures.BaseLength getCellPadding()
setCellPadding(com.sas.measures.BaseLength)
public void addTableCellPopupMenuItem(com.sas.swing.visuals.treetable.CellAction itemToBeAdded)
public void removeTableCellPopupMenuItem(com.sas.swing.visuals.treetable.CellAction itemToBeRemoved)
public void removeAllTableCellPopupMenuItems()
public int getTableCellPopupMenuItemCount()
public com.sas.swing.visuals.treetable.CellAction getTableCellPopupMenuItem(int index) throws java.lang.IndexOutOfBoundsException
java.lang.IndexOutOfBoundsException
public void setTableCellPopupMenuEnabled(boolean newEnabled)
newEnabled
- allow that menu to pop up?public boolean isTableCellPopupMenuEnabled()
public void setTaskLink(java.lang.String taskName, java.lang.String newLink)
taskName
- - task to set a link onnewLink
- - the link to set, null removes an existing linkpublic java.lang.String getTaskLink(java.lang.String taskName)
taskName
- - task to set a link onpublic void removeAllTaskLinks()
public java.util.Iterator getAllLinkedTasks()
public void setTableEditable(boolean newEditable)
unsetTableEditable()
,
isTableEditable()
,
isTableEditableSet()
,
putTableRowEditable(java.lang.String, boolean)
,
putTableColumnEditable(java.lang.String, boolean)
public void unsetTableEditable()
setTableEditable(false)
,
which would make the entire table non-editable.
setTableEditable(boolean)
,
isTableEditable()
,
isTableEditableSet()
public boolean isTableEditable()
setTableEditable(boolean)
,
isTableEditableSet()
,
putTableRowEditable(java.lang.String, boolean)
,
putTableColumnEditable(java.lang.String, boolean)
public boolean isTableEditableSet()
setTableEditable(boolean)
,
unsetTableEditable()
public void putTableRowEditable(java.lang.String taskName, boolean editable)
taskName
- - which row to affecteditable
- - can it be edited, or not?
setTableEditable(boolean)
,
getTableRowEditable(java.lang.String)
,
removeTableRowEditable(java.lang.String)
,
clearTableRowEditable()
,
keySetTableRowEditable()
public boolean getTableRowEditable(java.lang.String taskName)
taskName
- - which row to affectputTableRowEditable(java.lang.String, boolean)
public void removeTableRowEditable(java.lang.String taskName)
taskName
- - which row to affectputTableRowEditable(java.lang.String, boolean)
public void clearTableRowEditable()
putTableRowEditable(java.lang.String, boolean)
public java.util.Set keySetTableRowEditable()
putTableRowEditable(java.lang.String, boolean)
public void putTableColumnEditable(java.lang.String colName, boolean editable)
colName
- - which column to affecteditable
- - can it be edited, or not?
setTableEditable(boolean)
,
getTableColumnEditable(java.lang.String)
,
removeTableColumnEditable(java.lang.String)
,
clearTableColumnEditable()
,
keySetTableColumnEditable()
public boolean getTableColumnEditable(java.lang.String colName)
colName
- - which column to affectputTableColumnEditable(java.lang.String, boolean)
public void removeTableColumnEditable(java.lang.String colName)
colName
- - which column to affectputTableColumnEditable(java.lang.String, boolean)
public void clearTableColumnEditable()
putTableColumnEditable(java.lang.String, boolean)
public java.util.Set keySetTableColumnEditable()
putTableColumnEditable(java.lang.String, boolean)
public void setPreferredExpansionDepth(int newDepth)
Note that the user at the GUI is free to expand and collapse nodes, and no attempt is made to update this model for such changes.
The default value is Integer.MAX_VALUE.
getPreferredExpansionDepth()
public int getPreferredExpansionDepth()
setPreferredExpansionDepth(int)
public void setColumns(TableAxisColumn[] newColumns) throws java.lang.IllegalArgumentException
newColumns
- Array of TableAxisColumn to be displayed in the table axis, can be null.
java.lang.IllegalArgumentException
- if array is empty (ie, zero length), or has null TableAxisColumn objects, or has duplicate TableAxisColumn objects, or has duplicate Variable values.getColumns()
public TableAxisColumn[] getColumns()
setColumns(com.sas.graphics.components.TableAxisColumn[])
public void setZones(TableAxisZone[] newZones) throws java.lang.IllegalArgumentException
newZones
- - Array of TableAxisZones to be used to display the table axis, can be null.
java.lang.IllegalArgumentException
- if newZones is empty (ie, zero length) or if it contains nullsgetZones()
public TableAxisZone[] getZones()
setZones(com.sas.graphics.components.TableAxisZone[])
public int hashCode()
TableAxisModel
.
hashCode
in class ModelBase
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |