lt.monarch.chart.style
Class HatchStyle<Tag extends AbstractPaintTags>

java.lang.Object
  extended by lt.monarch.chart.style.AbstractStyle<Tag>
      extended by lt.monarch.chart.style.HatchStyle<Tag>
All Implemented Interfaces:
java.io.Serializable

public class HatchStyle<Tag extends AbstractPaintTags>
extends AbstractStyle<Tag>

Hatch fill settings.

Use HatchFillPalette methods to access predefined hatch styles.

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
protected  Style style
           
protected  java.lang.String tag
          Paint tags
 
Fields inherited from class lt.monarch.chart.style.AbstractStyle
dirty
 
Constructor Summary
Constructor and Description
HatchStyle(Style style, java.lang.String tag)
          Default hatch constructor
 
Method Summary
Modifier and Type Method and Description
 void dispose()
          Disposes style object
 java.awt.Color[] getColors()
          Gets start and end colors
 HatchFills getHatchFill()
          Sets rendering paint
 java.awt.Paint getPaint()
          Gets hatch paint.
 void setColors(java.awt.Color color1, java.awt.Color color2)
          Sets the gradient colors
 void setHatchFill(HatchFills fill)
          Sets rendering paint
 void setPaint(java.awt.Paint paint)
          Sets rendering paint
 
Methods inherited from class lt.monarch.chart.style.AbstractStyle
finalize
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

style

protected Style style

tag

protected java.lang.String tag
Paint tags

Constructor Detail

HatchStyle

public HatchStyle(Style style,
                  java.lang.String tag)
Default hatch constructor

Parameters:
style - stylesheet object
tag - hash paint tag
Method Detail

setPaint

public void setPaint(java.awt.Paint paint)
Sets rendering paint

Parameters:
paint - hatch paint

setHatchFill

public void setHatchFill(HatchFills fill)
Sets rendering paint

Parameters:
fill - hatch fill paint

getHatchFill

public HatchFills getHatchFill()
Sets rendering paint


getPaint

public java.awt.Paint getPaint()
Gets hatch paint. If hatch fill is set, when the colors are retrieved from user set colors, if not set, when either predefined paint will be used (together with colors) or the user set Paint will be used (the colors are also already set to it)

Returns:
hatch paint

setColors

public void setColors(java.awt.Color color1,
                      java.awt.Color color2)
Sets the gradient colors

Parameters:
color1 - 1st gradient color
color2 - 2nd gradient color

getColors

public java.awt.Color[] getColors()
Gets start and end colors

Returns:
start and end color array

dispose

public void dispose()
Description copied from class: AbstractStyle
Disposes style object

Overrides:
dispose in class AbstractStyle<Tag extends AbstractPaintTags>