Search this API

y.view.tabular
Class TableStyle.SimpleStyle

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

public static class TableStyle.SimpleStyle
extends Object
implements Externalizable, TableStyle

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

See Also:
Serialized Form

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, Color lineColor, Color fillColor)
          Creates a new SimpleStyle for the specified line type and colors.
TableStyle.SimpleStyle(LineType borderLineType, Color borderLineColor, Color borderFillColor, LineType lineType, Color lineColor, Color fillColor)
          Creates a new SimpleStyle for the specified line types and colors.
 
Method Summary
 Color getBorderFillColor(NodeRealizer context)
          Returns the value of the style's borderFillColor property.
 Color getBorderLineColor(NodeRealizer context)
          Returns the value of the style's borderLineColor property.
 Stroke getBorderLineType(NodeRealizer context)
          Returns the value of the style's borderLineType property.
 Color getFillColor(NodeRealizer context)
          Returns the value of the style's fillColor property.
 Color getLineColor(NodeRealizer context)
          Returns the value of the style's lineColor property.
 Stroke getLineType(NodeRealizer context)
          Returns the value of the style's lineType property.
 void readExternal(ObjectInput in)
           
 void writeExternal(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,
                              Color lineColor,
                              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,
                              Color borderLineColor,
                              Color borderFillColor,
                              LineType lineType,
                              Color lineColor,
                              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 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 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 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 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 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 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(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

writeExternal

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

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