Search this API

y.view.tabular
Class TableStyle.SimpleStyle

java.lang.Object
  extended by y.view.tabular.TableStyle.SimpleStyle
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, TableStyle
Enclosing interface:
TableStyle

public static class TableStyle.SimpleStyle
extends java.lang.Object
implements java.io.Externalizable, TableStyle

An immutable TableStyle implementation that provides constant values and stroke information specified at instance creation.

See Also:
Serialized Form
 
Your browser does not support SVG content.

Nested Class Summary
 
Nested classes/interfaces inherited from interface y.view.tabular.TableStyle
TableStyle.SimpleStyle, TableStyle.SimpleStyleDeserializer, TableStyle.SimpleStyleSerializer
 
Constructor Summary
TableStyle.SimpleStyle()
          Creates a new SimpleStyle.
TableStyle.SimpleStyle(LineType lineType, java.awt.Color lineColor, java.awt.Color fillColor)
          Creates a new SimpleStyle for the specified line type and colors.
TableStyle.SimpleStyle(LineType borderLineType, java.awt.Color borderLineColor, java.awt.Color borderFillColor, LineType lineType, java.awt.Color lineColor, java.awt.Color fillColor)
          Creates a new SimpleStyle for the specified line types and colors.
 
Method Summary
 java.awt.Color getBorderFillColor(NodeRealizer context)
          Returns the value of the style's borderFillColor property.
 java.awt.Color getBorderLineColor(NodeRealizer context)
          Returns the value of the style's borderLineColor property.
 java.awt.Stroke getBorderLineType(NodeRealizer context)
          Returns the value of the style's borderLineType property.
 java.awt.Color getFillColor(NodeRealizer context)
          Returns the value of the style's fillColor property.
 java.awt.Color getLineColor(NodeRealizer context)
          Returns the value of the style's lineColor property.
 java.awt.Stroke getLineType(NodeRealizer context)
          Returns the value of the style's lineType property.
 void readExternal(java.io.ObjectInput in)
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableStyle.SimpleStyle

public TableStyle.SimpleStyle()
Creates a new SimpleStyle. Invoking this constructor is equivalent to:
new SimpleStyle(null, null, null, null, null, null)

Note: This constructor exist solely for the purpose of deserializing SimpleStyle instances from YGF data files.


TableStyle.SimpleStyle

public TableStyle.SimpleStyle(LineType lineType,
                              java.awt.Color lineColor,
                              java.awt.Color fillColor)
Creates a new SimpleStyle for the specified line type and colors. Invoking this constructor is equivalent to:
new SimpleStyle(null, null, null, lineType, lineColor, fillColor)

Parameters:
lineType - the value for the style's lineType property.
lineColor - the value for the style's lineColor property.
fillColor - the value for the style's fillColor property.

TableStyle.SimpleStyle

public TableStyle.SimpleStyle(LineType borderLineType,
                              java.awt.Color borderLineColor,
                              java.awt.Color borderFillColor,
                              LineType lineType,
                              java.awt.Color lineColor,
                              java.awt.Color fillColor)
Creates a new SimpleStyle for the specified line types and colors.

Parameters:
borderLineType - the value for the style's borderLineType property.
borderLineColor - the value for the style's borderLineColor property.
borderFillColor - the value for the style's borderFillColor property.
lineType - the value for the style's lineType property.
lineColor - the value for the style's lineColor property.
fillColor - the value for the style's fillColor property.
Method Detail

getBorderLineType

public java.awt.Stroke getBorderLineType(NodeRealizer context)
Returns the value of the style's borderLineType property.

Specified by:
getBorderLineType in interface TableStyle
Parameters:
context - ignored.
Returns:
the value of the style's borderLineType property.
See Also:
TableNodePainter.newDefaultInstance()

getBorderLineColor

public java.awt.Color getBorderLineColor(NodeRealizer context)
Returns the value of the style's borderLineColor property.

Specified by:
getBorderLineColor in interface TableStyle
Parameters:
context - ignored.
Returns:
the value of the style's borderLineColor property.
See Also:
TableNodePainter.newDefaultInstance()

getBorderFillColor

public java.awt.Color getBorderFillColor(NodeRealizer context)
Returns the value of the style's borderFillColor property.

Specified by:
getBorderFillColor in interface TableStyle
Parameters:
context - ignored.
Returns:
the value of the style's borderFillColor property.
See Also:
TableNodePainter.newDefaultInstance()

getLineType

public java.awt.Stroke getLineType(NodeRealizer context)
Returns the value of the style's lineType property.

Specified by:
getLineType in interface TableStyle
Parameters:
context - ignored.
Returns:
the value of the style's lineType property.
See Also:
TableNodePainter.newDefaultInstance()

getLineColor

public java.awt.Color getLineColor(NodeRealizer context)
Returns the value of the style's lineColor property.

Specified by:
getLineColor in interface TableStyle
Parameters:
context - ignored.
Returns:
the value of the style's lineColor property.
See Also:
TableNodePainter.newDefaultInstance()

getFillColor

public java.awt.Color getFillColor(NodeRealizer context)
Returns the value of the style's fillColor property.

Specified by:
getFillColor in interface TableStyle
Parameters:
context - ignored.
Returns:
the value of the style's fillColor property.
See Also:
TableNodePainter.newDefaultInstance()

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

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