Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jcckit.graphic
Class ShapeAttributes

    java.lang.Object
      jcckit.graphic.ShapeAttributes

All Implemented Interfaces:
  FillAttributes, GraphicAttributes, LineAttributes

Direct Known Subclasses:
  BasicGraphicAttributes

public class ShapeAttributes
extends java.lang.Object
implements LineAttributes, FillAttributes

Basic attributes for shapes.

Author:
  Franz-Josef Elmer

Field Summary
`static java.lang.String` | `FILL_COLOR_KEY` Configuration parameter key.
`static java.lang.String` | `LINE_COLOR_KEY` Configuration parameter key.
`static java.lang.String` | `LINE_PATTERN_KEY` Configuration parameter key.
`static java.lang.String` | `LINE_THICKNESS_KEY` Configuration parameter key.

Constructor Summary
`ShapeAttributes(java.awt.Color fillColor, java.awt.Color lineColor, double lineThickness, double[] linePattern)` Creates a new instance.
`ShapeAttributes(ConfigParameters config)` Creates a new instance based on the specified configuration parameters.

Method Summary
`java.awt.Color` | `getFillColor()` Returns the fill color.
`java.awt.Color` | `getLineColor()` Returns the line color.
`double[]` | `getLinePattern()` Returns the line pattern.
`double` | `getLineThickness()` Returns the line tickness. 0 means that the line thickness is chosen as thin as possible.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### FILL_COLOR_KEY

    public static final java.lang.String FILL_COLOR_KEY

  Configuration parameter key.

  See Also:
    Constant Field Values

### LINE_COLOR_KEY

    public static final java.lang.String LINE_COLOR_KEY

  Configuration parameter key.

  See Also:
    Constant Field Values

### LINE_THICKNESS_KEY

    public static final java.lang.String LINE_THICKNESS_KEY

  Configuration parameter key.

  See Also:
    Constant Field Values

### LINE_PATTERN_KEY

    public static final java.lang.String LINE_PATTERN_KEY

  Configuration parameter key.

  See Also:
    Constant Field Values

Constructor Detail

### ShapeAttributes

    public ShapeAttributes(ConfigParameters config)

  Creates a new instance based on the specified configuration parameters.

  Key & Default Value | Type | Mandatory | Description
  --- | --- | --- | ---
  `fillColor = no filling` | `Color` | no | The fill color of the shape.
  `lineColor = no line` | `Color` | no | The color of a line, a polygon, or the border of a shape.
  `lineThickness = 0` | `double` | no | The thickness of a line. A thickness of zero means that the renderer will draw the thinest line possible.
  `linePattern =` solid line | `double[]` | no | A sequence of lengths where the pen is alternatively down or up. For example, `0.1 0.1` will lead to a dashed line whereas `0.02 0.02` is the pattern of a dotted line and `0.02 0.02 0.1 0.02` of a dashed-dotted line.

### ShapeAttributes

    public ShapeAttributes(java.awt.Color fillColor,
                           java.awt.Color lineColor,
                           double lineThickness,
                           double[] linePattern)

  Creates a new instance.

Parameters:
  `fillColor` - The fill color. May be `null`.
  `lineColor` - The line color. May be `null`.
  `lineThickness` - Thickness of the line. Negative numbers will be trimmed to zero.
  `linePattern` - Line pattern. May be `null`.

Method Detail

### getFillColor

    public java.awt.Color getFillColor()

  Description copied from interface: `FillAttributes`
  Returns the fill color.

  Specified by:
    `getFillColor` in interface `FillAttributes`
  Returns:
    `null` means no filling.

### getLineColor

    public java.awt.Color getLineColor()

  Description copied from interface: `LineAttributes`
  Returns the line color.

  Specified by:
    `getLineColor` in interface `LineAttributes`
  Returns:
    `null` means default color of the renderer.

### getLineThickness

    public double getLineThickness()

  Description copied from interface: `LineAttributes`
  Returns the line tickness. 0 means that the line thickness is chosen as thin as possible. Implementations have to guarantee that the returned value is never negative.

  Specified by:
    `getLineThickness` in interface `LineAttributes`

### getLinePattern

    public double[] getLinePattern()

  Description copied from interface: `LineAttributes`
  Returns the line pattern. This is a sequence of length where the pen is down or up. The first element is the length where the pen is down. The next element is the length where the pen is up. The pattern is cyclically repeated.

  Specified by:
    `getLinePattern` in interface `LineAttributes`
  Returns:
    `null` means solid line.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD