com.powerml.structures.styles
Class LineStyle

java.lang.Object
  extended bycom.powerml.structures.styles.LineStyle
All Implemented Interfaces:
java.io.Serializable

public final class LineStyle
extends java.lang.Object
implements java.io.Serializable

Defines the style properties of the line used as contour for the shape this style is assigned to.

See Also:
Serialized Form

Field Summary
static byte ARROW_STYLE_DIAMOND
          Diamond arrow head
static byte ARROW_STYLE_NONE
          No arrow head
static byte ARROW_STYLE_OPEN
          Open arrow head
static byte ARROW_STYLE_OVAL
          Oval arrow head
static byte ARROW_STYLE_SIMPLE
          Simple arrow head
static byte ARROW_STYLE_STEALTH
          Stealth arrow head
static byte DASHING_DASH
          Simple dash line dashing
static byte DASHING_DASH_DOT
          Dash-dot line dashing
static byte DASHING_LONG_DASH
          Long dash line dashing
static byte DASHING_LONG_DASH_DOT
          Long dash-dot line dashing
static byte DASHING_LONG_DASH_DOT_DOT
          Long dash-dot-dot line dashing
static byte DASHING_ROUND_DOT
          Round dot line dashing
static byte DASHING_SOLID
          No line dashing (solid)
static byte DASHING_SQUARE_DOT
          Square dot line dashing
static byte STYLE_DOUBLE
          Double line style
static byte STYLE_SIMPLE
          Simple line style
static byte STYLE_THICK_THIN
          Thick-thin line style
static byte STYLE_THIN_THICK
          Thin-thick line style
static byte STYLE_TRIPLE
          Triple line style
static byte TYPE_PATTERN
          Patterned line
static byte TYPE_SOLID
          Solid line (not patterned)
 
Method Summary
 void addXml(org.dom4j.Element parent, int roundPrecision)
          Transforms current instance to XML and adds it to a parent element.
 RGBColor getBackgroundColor()
          Returns the background color of the line (only relevant for patterned lines).
 RGBColor getColor()
          Returns the color of the line for solid lines, or the foreground color in case the line is patterned.
 byte getDashing()
          Returns the dashing type (see DASHING_...
 byte getEndArrowSize()
          Returns the size of the arrow head at the end of the line (a value between 1 and 9).
 byte getEndArrowStyle()
          Returns the style of the arrow head at the end of the line (see ARROW_STYLE_...
 Picture getPicture()
          Returns the picture used as a pattern (relevant only for patterned lines).
 byte getStartArrowSize()
          Returns the size of the arrow head at the start of the line (a value between 1 and 9).
 byte getStartArrowStyle()
          Returns the size of the arrow head at the start of the line (a value between 1 and 9).
 byte getStyle()
          Returns the line style (see STYLE_...
 short getTransparency()
          Returns the line transparency in percent (relevant only for solid lines).
 byte getType()
          Returns the line type (TYPE_SOLID or TYPE_PATTERN).
 double getWidth()
          Returns the line width in points.
 boolean isActive()
          Checks whether the line used as the contour of the shape this style belongs to is visible.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ARROW_STYLE_DIAMOND

public static final byte ARROW_STYLE_DIAMOND
Diamond arrow head

See Also:
Constant Field Values

ARROW_STYLE_NONE

public static final byte ARROW_STYLE_NONE
No arrow head

See Also:
Constant Field Values

ARROW_STYLE_OPEN

public static final byte ARROW_STYLE_OPEN
Open arrow head

See Also:
Constant Field Values

ARROW_STYLE_OVAL

public static final byte ARROW_STYLE_OVAL
Oval arrow head

See Also:
Constant Field Values

ARROW_STYLE_SIMPLE

public static final byte ARROW_STYLE_SIMPLE
Simple arrow head

See Also:
Constant Field Values

ARROW_STYLE_STEALTH

public static final byte ARROW_STYLE_STEALTH
Stealth arrow head

See Also:
Constant Field Values

DASHING_DASH

public static final byte DASHING_DASH
Simple dash line dashing

See Also:
Constant Field Values

DASHING_DASH_DOT

public static final byte DASHING_DASH_DOT
Dash-dot line dashing

See Also:
Constant Field Values

DASHING_LONG_DASH

public static final byte DASHING_LONG_DASH
Long dash line dashing

See Also:
Constant Field Values

DASHING_LONG_DASH_DOT

public static final byte DASHING_LONG_DASH_DOT
Long dash-dot line dashing

See Also:
Constant Field Values

DASHING_LONG_DASH_DOT_DOT

public static final byte DASHING_LONG_DASH_DOT_DOT
Long dash-dot-dot line dashing

See Also:
Constant Field Values

DASHING_ROUND_DOT

public static final byte DASHING_ROUND_DOT
Round dot line dashing

See Also:
Constant Field Values

DASHING_SOLID

public static final byte DASHING_SOLID
No line dashing (solid)

See Also:
Constant Field Values

DASHING_SQUARE_DOT

public static final byte DASHING_SQUARE_DOT
Square dot line dashing

See Also:
Constant Field Values

STYLE_DOUBLE

public static final byte STYLE_DOUBLE
Double line style

See Also:
Constant Field Values

STYLE_SIMPLE

public static final byte STYLE_SIMPLE
Simple line style

See Also:
Constant Field Values

STYLE_THICK_THIN

public static final byte STYLE_THICK_THIN
Thick-thin line style

See Also:
Constant Field Values

STYLE_THIN_THICK

public static final byte STYLE_THIN_THICK
Thin-thick line style

See Also:
Constant Field Values

STYLE_TRIPLE

public static final byte STYLE_TRIPLE
Triple line style

See Also:
Constant Field Values

TYPE_PATTERN

public static final byte TYPE_PATTERN
Patterned line

See Also:
Constant Field Values

TYPE_SOLID

public static final byte TYPE_SOLID
Solid line (not patterned)

See Also:
Constant Field Values
Method Detail

addXml

public void addXml(org.dom4j.Element parent,
                   int roundPrecision)
Transforms current instance to XML and adds it to a parent element.

Parameters:
parent - parent element
roundPrecision - rounding precision

getBackgroundColor

public RGBColor getBackgroundColor()
Returns the background color of the line (only relevant for patterned lines).

Returns:
background pattern color

getColor

public RGBColor getColor()
Returns the color of the line for solid lines, or the foreground color in case the line is patterned.

Returns:
line color

getDashing

public byte getDashing()
Returns the dashing type (see DASHING_...).

Returns:
dashing type

getEndArrowSize

public byte getEndArrowSize()
Returns the size of the arrow head at the end of the line (a value between 1 and 9).

Returns:
end arrow head size

getEndArrowStyle

public byte getEndArrowStyle()
Returns the style of the arrow head at the end of the line (see ARROW_STYLE_...).

Returns:
end arrow head style

getPicture

public Picture getPicture()
Returns the picture used as a pattern (relevant only for patterned lines).

Returns:
pattern image

getStartArrowSize

public byte getStartArrowSize()
Returns the size of the arrow head at the start of the line (a value between 1 and 9).

Returns:
start arrow head size

getStartArrowStyle

public byte getStartArrowStyle()
Returns the size of the arrow head at the start of the line (a value between 1 and 9).

Returns:
start arrow head size

getStyle

public byte getStyle()
Returns the line style (see STYLE_...).

Returns:
line style

getTransparency

public short getTransparency()
Returns the line transparency in percent (relevant only for solid lines).

Returns:
line transparency

getType

public byte getType()
Returns the line type (TYPE_SOLID or TYPE_PATTERN).

Returns:
line type

getWidth

public double getWidth()
Returns the line width in points.

Returns:
width

isActive

public boolean isActive()
Checks whether the line used as the contour of the shape this style belongs to is visible.

Returns:
true if line visible, otherwise false


© 2004-2005 Ralf Terdic. All rights reserved.
www.powerml.com