Class JFCStyle

All Implemented Interfaces:
Serializable, org.jfree.chart.plot.DrawingSupplier, overit.geocall.marks.MethodExposer, overit.geocall.marks.NameExposer, Identified, Tool
Direct Known Subclasses:
ChartStyle

@Component public class JFCStyle extends Component implements Identified, org.jfree.chart.plot.DrawingSupplier
This class implements the object that manages the style (paints, shapes, strokes) of the elements that compose the charts, like the JFCPie and the JFCSerie. The JFCStyle must be inserted as a child in the XML definition of the chart.

The possible formats for the definition of the colors are:

  • RGB: #rrggbb, for example #ff0000
  • RGB with Alpha channel: #aarrggbb, for example 5000ff00
  • Random color: @{a-z}, for example @{qwerty} (random color extracted with the "qwerty" seed)

The possible values for the definition of the shapes are: square, circle, diamond, triangleup, triangledown, triangleleft, triangleright, rectanglehorizontal, rectanglevertical

The possible values for the definition of the end lines decorations are:

The possible values for the definition of the join lines decorations are:
See Also:
GCApi:
component
  • Field Details

    • _identity

      protected Identity _identity
    • SHAPE_EMPTY

      protected static Shape SHAPE_EMPTY
      Empty Polygon
    • _paints

      protected ListAttribute _paints
    • _paintIndex

      protected int _paintIndex
    • _symbolPaints

      protected ArrayList _symbolPaints
    • _symbolPaintIndex

      protected int _symbolPaintIndex
    • _shapes

      protected ListAttribute _shapes
    • _shapeIndex

      protected int _shapeIndex
    • _itemSize

      protected int _itemSize
    • _strokes

      protected ListAttribute _strokes
    • _strokeIndex

      protected int _strokeIndex
    • _seed

      protected double _seed
    • _rs

      protected RandomSequence _rs
  • Constructor Details

    • JFCStyle

      public JFCStyle()
      Main constructor, creates a new JFCStyle instance.
  • Method Details

    • getIdentity

      public Identity getIdentity()
      Description copied from class: Component
      Returns the Identity associated to the component
      Specified by:
      getIdentity in interface Identified
      Overrides:
      getIdentity in class Component
      Returns:
      The Identity of the user currently logged in the application
    • setIdentity

      public void setIdentity(Identity identity)
      Description copied from class: Component
      Sets the Identity to the component
      Specified by:
      setIdentity in interface Identified
      Overrides:
      setIdentity in class Component
      Parameters:
      identity - The Identity that must be associated to the component
    • setPAINTS

      public void setPAINTS(String s)
      Sets the string that defines the colors of the elements of the chart.
      Parameters:
      s - A ListAttribute, in which the colors must be written using the format: color1 | color2 | color3 | .... In this way we set the colors of the elements of a serie for the JFCPie or the colors of different series for the JFCSerie. It is possible to obtain a gradient (shaded colors), using the format: color1a - color2a | color2a - color2b | color3a - color3b
      For the color format see JFCStyle
    • setSTROKES

      public void setSTROKES(String s)
      Sets the strokes for the elements of the JFCSerie lines chart.
      Parameters:
      s - A ListAttribute, in whick the strokes must be written using the format: thickness,end line decoration,join lines decoration | thickness,end line decoration,join lines decoration | ....
      For the possible values of the decorations see JFCStyle (the default stroke format is 1,1,1)
    • setSHAPES

      public void setSHAPES(String s)
      Sets the shapes of the elements of the JFCSerie lines chart.
      Parameters:
      s - A ListAttribute, in which the shapes must be written using the format: shape,size,color | shape,size,color | ....
      It is possible to omit some of the values defining a format; in that case it will be used the default value. The default value for the size is 6. If the color is omitted it will be used the one defined for the line which the shape belongs, that is set with the setPAINTS(java.lang.String) method
      For the possible values of the shape, and the color format, see JFCStyle
    • setItemSize

      protected void setItemSize(int size)
      Sets the size of the items of the JFCSerie lines chart
      Parameters:
      size - An integer that defines the size. The default value for is 6.
    • parseStroke

      protected static Stroke parseStroke(String definition)
    • parseShape

      protected Shape parseShape(String def)
    • parseFloat

      protected static float parseFloat(String s, float def)
    • reStart

      public void reStart()
      Resets the style
    • getNextPaint

      public Paint getNextPaint()
      Returns the next Paint in the sequence
      Specified by:
      getNextPaint in interface org.jfree.chart.plot.DrawingSupplier
      Returns:
      The next paint that will be used to draw the element of the chart
    • getNextStroke

      public Stroke getNextStroke()
      Returns the next Stroke object in the sequence
      Specified by:
      getNextStroke in interface org.jfree.chart.plot.DrawingSupplier
      Returns:
      The next stroke that will be used to draw the element of the chart
    • getNextShape

      public Shape getNextShape()
      Returns the next Shape object in the sequence
      Specified by:
      getNextShape in interface org.jfree.chart.plot.DrawingSupplier
      Returns:
      The next shape that will be used to draw the element of the chart
    • getNextFillPaint

      public Paint getNextFillPaint()
      Returns the next fill Paint in the sequence
      Specified by:
      getNextFillPaint in interface org.jfree.chart.plot.DrawingSupplier
      Returns:
      The next paint that will be used to fill the element of the chart
    • getNextOutlinePaint

      public Paint getNextOutlinePaint()
      Returns the next outline Paint in the sequence
      Specified by:
      getNextOutlinePaint in interface org.jfree.chart.plot.DrawingSupplier
      Returns:
      null
    • getNextOutlineStroke

      public Stroke getNextOutlineStroke()
      Returns the next outline Stroke object in the sequence
      Specified by:
      getNextOutlineStroke in interface org.jfree.chart.plot.DrawingSupplier
      Returns:
      null
    • getHtml

      public org.apache.ecs.Element getHtml(EntitySet es)
      Returns null
      Specified by:
      getHtml in class Component
      Parameters:
      es - The EntitySet to which the element belongs
      Returns:
      null