public class TableNodeStyle extends Object implements INodeStyle, Cloneable
INodeStyle
for tables
.
This implementations stores the table instance and therefore, its instances cannot be shared among different table instances.
Constructor and Description |
---|
TableNodeStyle()
Default constructor that creates an empty table.
|
TableNodeStyle(ITable table)
Constructor with a custom renderer implementation that uses
table as backing table model. |
TableNodeStyle(ITable table,
TableNodeStyleRenderer renderer)
Constructor with a custom renderer implementation that uses
table as backing table model. |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangedListener(IEventHandler<PropertyChangedEventArgs> propertyChangedEvent)
Adds the given listener for the
PropertyChanged event that occurs when the value of the Table
property changes. |
TableNodeStyle |
clone()
Creates a copy of this object and returns it.
|
protected INodeStyle |
copyBackgroundStyle(INodeStyle style)
Create a copy of the background style when this style instance is cloned.
|
protected ITable |
copyTable(ITable table)
Create a copy of the table when this style instance is cloned.
|
INodeStyle |
getBackgroundStyle()
Gets the style that is used to draw the background of the table.
|
TableNodeStyleRenderer |
getRenderer()
Gets the renderer implementation that can be queried for implementations that provide details about the visual
appearance and visual behavior for a given node and this style instance.
|
ITable |
getTable()
Gets the
ITable instance that defines the tabular structure. |
TableRenderingOrder |
getTableRenderingOrder()
Gets the order in which rows and columns are rendered.
|
protected void |
onPropertyChanged(PropertyChangedEventArgs e)
Raises the
PropertyChanged event. |
void |
removePropertyChangedListener(IEventHandler<PropertyChangedEventArgs> propertyChangedEvent)
Removes the given listener for the
PropertyChanged event that occurs when the value of the Table
property changes. |
void |
setBackgroundStyle(INodeStyle value)
Sets the style that is used to draw the background of the table.
|
void |
setTable(ITable value)
Sets the
ITable instance that defines the tabular structure. |
void |
setTableRenderingOrder(TableRenderingOrder value)
Sets the order in which rows and columns are rendered.
|
public TableNodeStyle()
public TableNodeStyle(ITable table)
table
as backing table model.table
- The table instance that defines the tabular structure.public TableNodeStyle(ITable table, TableNodeStyleRenderer renderer)
table
as backing table model.table
- The table instance that defines the tabular structure.renderer
- Custom renderer instance for this style.public final void addPropertyChangedListener(IEventHandler<PropertyChangedEventArgs> propertyChangedEvent)
PropertyChanged
event that occurs when the value of the Table
property changes.propertyChangedEvent
- The listener to add.removePropertyChangedListener(IEventHandler)
public TableNodeStyle clone()
ICloneable
clone
in interface ICloneable
clone
in class Object
Object.clone()
protected INodeStyle copyBackgroundStyle(INodeStyle style)
style
- The original background node stylestyle
instance.protected ITable copyTable(ITable table)
table
- The original table instanceICloneable.clone()
clone the original table
instance, if possible,
otherwise it returns table
unchanged.public final INodeStyle getBackgroundStyle()
setBackgroundStyle(INodeStyle)
public final TableNodeStyleRenderer getRenderer()
INodeStyle
The idiom for retrieving, e.g. an IVisualCreator
implementation for a given style is:
getRenderer
in interface INodeStyle
public final ITable getTable()
ITable
instance that defines the tabular structure.setTable(ITable)
public final TableRenderingOrder getTableRenderingOrder()
setTableRenderingOrder(TableRenderingOrder)
protected void onPropertyChanged(PropertyChangedEventArgs e)
PropertyChanged
event.
Called when the value of the Table
property changes.
e
- The PropertyChangedEventArgs
instance containing the event data.public final void removePropertyChangedListener(IEventHandler<PropertyChangedEventArgs> propertyChangedEvent)
PropertyChanged
event that occurs when the value of the Table
property changes.propertyChangedEvent
- The listener to remove.addPropertyChangedListener(IEventHandler)
public final void setBackgroundStyle(INodeStyle value)
value
- The BackgroundStyle to set.getBackgroundStyle()
public final void setTable(ITable value)
ITable
instance that defines the tabular structure.value
- The Table to set.getTable()
public final void setTableRenderingOrder(TableRenderingOrder value)
value
- The TableRenderingOrder to set.getTableRenderingOrder()