sk.baka.webvm.misc
Class GraphStyle

java.lang.Object
  extended by sk.baka.webvm.misc.GraphStyle
All Implemented Interfaces:
Serializable

public final class GraphStyle
extends Object
implements Serializable

Describes a style of graph to be drawn.

Author:
Martin Vysny
See Also:
Serialized Form

Nested Class Summary
static class GraphStyle.GraphStyleEnum
          A type of graph to draw.
 
Field Summary
 String border
          Draw a thin border around the table if not null.
 String caption
          The caption of the graph.
 String[] colors
          Display data in given colors.
 String[] fontColors
          Display data captions in given colors.
 int height
          The height of the graph in pixels.
 boolean showPercentage
          Draw percentage values to the graph.
 boolean showValues
          Draw values to the graph.
 GraphStyle.GraphStyleEnum style
          The graph legend.
 boolean vertical
          Vertical draws vertical (zero is in the left side) or horizontal bar (zero is on the bottom).
 int width
          The width of the graph in pixels.
 boolean yLegend
          Draw a legend for the Y axis.
 
Constructor Summary
GraphStyle()
          Creates new object instance.
GraphStyle(GraphStyle other)
          Copy-constructor.
 
Method Summary
 void validate()
          Validates this value object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

caption

public String caption
The caption of the graph.


yLegend

public boolean yLegend
Draw a legend for the Y axis.


border

public String border
Draw a thin border around the table if not null. Use a regular HTML color specification.


vertical

public boolean vertical
Vertical draws vertical (zero is in the left side) or horizontal bar (zero is on the bottom).


width

public int width
The width of the graph in pixels. Must be a positive integer.


height

public int height
The height of the graph in pixels. Must be a positive integer.


colors

public String[] colors
Display data in given colors. Use CSS-style notation, like "red" or "#00ffee". null color is a transparent color, i.e. a div without a background.


fontColors

public String[] fontColors
Display data captions in given colors. Use CSS-style notation, like "red" or "#00ffee". null color is a transparent color, i.e. a div without a background. Optional.


showValues

public boolean showValues
Draw values to the graph.


showPercentage

public boolean showPercentage
Draw percentage values to the graph.


style

public GraphStyle.GraphStyleEnum style
The graph legend.

Constructor Detail

GraphStyle

public GraphStyle()
Creates new object instance.


GraphStyle

public GraphStyle(GraphStyle other)
Copy-constructor.

Parameters:
other - copy this instance, must not be null
Method Detail

validate

public void validate()
Validates this value object.



Copyright © 2010 Baka. All Rights Reserved.