Search this API

y.view.tabular
Interface TableStyle

All Known Implementing Classes:
TableStyle.SimpleStyle

public interface TableStyle

A TableStyle provides color and stroke information for painting. Visual styles have to be registered as GenericNodeRealizer style properties. Due to the fact that style properties are copied by reference when a GenericNodeRealizer is copied, TableStyle implementations may not depend on a specific realizer instance.

Serialization note: In order for TableStyle instances to be serializable, the following steps have to be taken.

GraphML: Either a suitable ObjectStringConverter has to be registered with the singleton ObjectStringConversion instance or suitable serialization/ deserialization event listener have to be registered with the GraphMLIOHandler that is used for reading/writing from/to GraphML.

YGF: Please note that YGF file format is deprecated.
Either the TableStyle has to implement Serializable or a suitable ObjectStringConverter has to be registered with the singleton ObjectStringConversion instance. The latter approach is the recommended one, as the former approach may break with obfuscated code.

See Also:
GenericNodeRealizer.getStyleProperty(String), GenericNodeRealizer.setStyleProperty(String,Object), TableNodePainter.ALTERNATE_COLUMN_SELECTION_STYLE_ID, TableNodePainter.ALTERNATE_COLUMN_STYLE_ID, TableNodePainter.ALTERNATE_ROW_SELECTION_STYLE_ID, TableNodePainter.ALTERNATE_ROW_STYLE_ID, TableNodePainter.COLUMN_SELECTION_STYLE_ID, TableNodePainter.COLUMN_STYLE_ID, TableNodePainter.ROW_SELECTION_STYLE_ID, TableNodePainter.ROW_STYLE_ID, TableNodePainter.TABLE_SELECTION_STYLE_ID, TableNodePainter.TABLE_STYLE_ID
 
Your browser does not support SVG content.

Nested Class Summary
static class TableStyle.SimpleStyle
          An immutable TableStyle implementation that provides constant values and stroke information specified at instance creation.
static class TableStyle.SimpleStyleDeserializer
          Handles GraphML deserialization of TableStyle.SimpleStyle objects.
static class TableStyle.SimpleStyleSerializer
          Handles GraphML serialization of TableStyle.SimpleStyle objects.
 
Method Summary
 java.awt.Color getBorderFillColor(NodeRealizer context)
          Returns the color to be used to fill the border area of the table, column, or row that is to be painted.
 java.awt.Color getBorderLineColor(NodeRealizer context)
          Returns the color to be used to draw the border of the table, column, or row that is to be painted.
 java.awt.Stroke getBorderLineType(NodeRealizer context)
          Returns the stroke to be used to draw the border of the table, column, or row that is to be painted.
 java.awt.Color getFillColor(NodeRealizer context)
          Returns the color to be used to fill a table, column, or row without a border, or the interior of a table, column, or row with a border.
 java.awt.Color getLineColor(NodeRealizer context)
          Returns the color to be used to draw a table, column, or row without a border, or the interior of a table, column, or row with a border.
 java.awt.Stroke getLineType(NodeRealizer context)
          Returns the stroke to be used to draw a table, column, or row without a border, or the interior of a table, column, or row with a border.
 

Method Detail

getBorderLineType

java.awt.Stroke getBorderLineType(NodeRealizer context)
Returns the stroke to be used to draw the border of the table, column, or row that is to be painted.

Parameters:
context - the TableGroupNodeRealizer that owns the table, column, or row to be painted.
Returns:
the stroke to be used to draw the border of the table, column, or row that is to be painted.
See Also:
TableNodePainter.newDefaultInstance()

getBorderLineColor

java.awt.Color getBorderLineColor(NodeRealizer context)
Returns the color to be used to draw the border of the table, column, or row that is to be painted.

Parameters:
context - the TableGroupNodeRealizer that owns the table, column, or row to be painted.
Returns:
the color to be used to draw the border of the table, column, or row that is to be painted.
See Also:
TableNodePainter.newDefaultInstance()

getBorderFillColor

java.awt.Color getBorderFillColor(NodeRealizer context)
Returns the color to be used to fill the border area of the table, column, or row that is to be painted.

Parameters:
context - the TableGroupNodeRealizer that owns the table, column, or row to be painted.
Returns:
the color to be used to fill the border area of the table, column, or row that is to be painted.
See Also:
TableNodePainter.newDefaultInstance()

getLineType

java.awt.Stroke getLineType(NodeRealizer context)
Returns the stroke to be used to draw a table, column, or row without a border, or the interior of a table, column, or row with a border.

Parameters:
context - the TableGroupNodeRealizer that owns the table, column, or row to be painted.
Returns:
the stroke to be used to draw a table, column, or row without a border, or the interior of a table, column, or row with a border.
See Also:
TableNodePainter.newDefaultInstance()

getLineColor

java.awt.Color getLineColor(NodeRealizer context)
Returns the color to be used to draw a table, column, or row without a border, or the interior of a table, column, or row with a border.

Parameters:
context - the TableGroupNodeRealizer that owns the table, column, or row to be painted.
Returns:
the color to be used to draw a table, column, or row without a border, or the interior of a table, column, or row with a border.
See Also:
TableNodePainter.newDefaultInstance()

getFillColor

java.awt.Color getFillColor(NodeRealizer context)
Returns the color to be used to fill a table, column, or row without a border, or the interior of a table, column, or row with a border.

Parameters:
context - the TableGroupNodeRealizer that owns the table, column, or row to be painted.
Returns:
the color to be used to fill a table, column, or row without a border, or the interior of a table, column, or row with a border.
See Also:
TableNodePainter.newDefaultInstance()

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.