AbstractShapeDecoration (OpenMap API)
Date: 2016-12-09

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

## com.bbn.openmap.omGraphics.awt
Class AbstractShapeDecoration

    java.lang.Object
      com.bbn.openmap.omGraphics.awt.AbstractShapeDecoration

All Implemented Interfaces:
  Revertable, ShapeDecoration

Direct Known Subclasses:
  CircleShapeDecoration, ColdFrontShapeDecoration, HotFrontShapeDecoration, IceAreaShapeDecoration, SpacingShapeDecoration, TextShapeDecoration, TurbulanceShapeDecoration

    public abstract class AbstractShapeDecoration

extends java.lang.Object
implements ShapeDecoration

A minimal implementation of ShapeDecoration, adds members and accessors for graphic attributes :

- length : the decoration length, along the path to decorate
- width : the decoration width, normal to the path to decorate
- orientation : the decoration is on the left or on the right of the path
- stroke, paint : the stroke and paint to be used

Version:
  27 juil. 2002
Author:
  Eric LEPICIER

Field Summary

Fields inherited from interface com.bbn.openmap.omGraphics.awt.ShapeDecoration
`LEFT, RIGHT`

Constructor Summary
`AbstractShapeDecoration(float length, float width, int orientation)` Constructor.

Method Summary
`float` | `getLength()` Returns the length.
`int` | `getOrientation()` Returns the orientation.
`java.awt.Paint` | `getPaint()` Returns the paint.
`java.awt.Stroke` | `getStroke()` Returns the stroke.
`float` | `getWidth()` Returns the width.
`protected void` | `restoreGraphics(java.awt.Graphics g)` Restores previous settings to the Graphics.
`void` | `revert()` Reverts the orientation
`protected void` | `setGraphics(java.awt.Graphics g)` Applies stroke and paint to the Graphics, saving previous settings
`void` | `setLength(float length)` Sets the length.
`void` | `setOrientation(int orientation)` Sets the orientation.
`void` | `setPaint(java.awt.Paint paint)` Sets the paint.
`void` | `setStroke(java.awt.Stroke stroke)` Sets the stroke.
`void` | `setWidth(float width)` Sets the width.

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

Methods inherited from interface com.bbn.openmap.omGraphics.awt.ShapeDecoration
`draw`

Constructor Detail

### AbstractShapeDecoration

    public AbstractShapeDecoration(float length,
                                   float width,
                                   int orientation)

  Constructor.

  Parameters:
    `length` -
    `width` -
    `orientation` -

Method Detail

### getLength

    public float getLength()

  Returns the length.

  Specified by:
    `getLength` in interface `ShapeDecoration`
  Returns:
    float

### setLength

    public void setLength(float length)

  Sets the length.

  Parameters:
    `length` - The length to set

### getWidth

    public float getWidth()

  Returns the width.

  Specified by:
    `getWidth` in interface `ShapeDecoration`
  Returns:
    float

### setWidth

    public void setWidth(float width)

  Sets the width.

  Parameters:
    `width` - The width to set

### getOrientation

    public int getOrientation()

  Returns the orientation.

  Specified by:
    `getOrientation` in interface `ShapeDecoration`
  Returns:
    int

### setOrientation

    public void setOrientation(int orientation)

  Sets the orientation.

  Specified by:
    `setOrientation` in interface `ShapeDecoration`
  Parameters:
    `orientation` - The orientation to set

### revert

    public void revert()

  Reverts the orientation

  Specified by:
    `revert` in interface `Revertable`
  Specified by:
    `revert` in interface `ShapeDecoration`
  See Also:
    `ShapeDecoration.revert()`

### getPaint

    public java.awt.Paint getPaint()

  Returns the paint.

  Returns:
    Paint

### getStroke

    public java.awt.Stroke getStroke()

  Returns the stroke.

  Returns:
    Stroke

### setPaint

    public void setPaint(java.awt.Paint paint)

  Sets the paint.

  Parameters:
    `paint` - The paint to set

### setStroke

    public void setStroke(java.awt.Stroke stroke)

  Sets the stroke.

  Parameters:
    `stroke` - The stroke to set

### setGraphics

    protected void setGraphics(java.awt.Graphics g)

  Applies stroke and paint to the Graphics, saving previous settings

  Parameters:
    `g` -

### restoreGraphics

    protected void restoreGraphics(java.awt.Graphics g)

  Restores previous settings to the Graphics. Beware : no verification is made to be sure that it is the same Graphics ...

  Parameters:
    `g` -

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

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details