DrawVertex
Keywords: uk.ac.ic.doc.automed.editor.DrawVertex,DrawVertex class

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

## uk.ac.ic.doc.automed.editor
Class DrawVertex

    java.lang.Object
      |
      +--uk.ac.ic.doc.automed.editor.DrawVertex

All Implemented Interfaces:
  Drawable, DrawableVertex

Direct Known Subclasses:
  DefaultDrawConstraintVertex, DefaultDrawLinkNodalVertex, DefaultDrawLinkVertex, DefaultDrawNodalVertex

public class DrawVertex
extends java.lang.Object
implements DrawableVertex

Field Summary
`protected java.awt.Rectangle` | `bounds`
`protected java.awt.Point` | `centre`
`protected Positionable[]` | `dependent`
`protected EditorPanel` | `ep`
`protected static java.awt.FontMetrics` | `fm`
`protected Positionable` | `p` The underlying `Positionable` that this `Drawable` instace is representing
`protected static java.awt.Stroke` | `standardStroke`
`protected int` | `symbolHeight`
`protected int` | `symbolWidth`
`protected java.lang.String` | `text`
`protected int` | `textHeight`
`protected int` | `textWidth`
`protected static int` | `thickness`
`protected static int` | `xInset`
`protected static int` | `yInset`

Constructor Summary
`DrawVertex(EditorPanel ep, Positionable p)`
`DrawVertex(EditorPanel ep, Positionable p, Positionable[] dependent)`

Method Summary
`java.awt.Rectangle` | `getBounds()` Describe the rectangular area within the `EditorPanel` where this `Drawable` vertex is to be painted.
`java.awt.Point` | `getCentre()` Describe where the centre of the `Drawable` visually appears to a viewer.
`java.awt.Point` | `getCentreOffset()` Implements the `Drawable`
`java.awt.Point` | `getConnectionPoint(java.awt.Point other)` Calculate the `Point` where a `DrawableArc` connecting to this `DrawableVertex` should be drawn to, no
`Positionable` | `getPositionable()`
`Positionable[]` | `getRelativeTo()` If the coordinates of the Positionable that this Drawable is for are specified relatitive to some other Positionables, return those other Positionables
`void` | `paint(java.awt.Graphics2D g)`
`void` | `paintSymbol(java.awt.Graphics2D g)`
`void` | `paintText(java.awt.Graphics2D g)`
`protected void` | `setText(java.lang.String s)` Set the text that will be used in this {link @Drawable}, and record its width and heigh in `textBounds`.

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

Field Detail

### fm

    protected static java.awt.FontMetrics fm

### thickness

    protected static final int thickness

See Also:
  Constant Field Values

### standardStroke

    protected static final java.awt.Stroke standardStroke

### xInset

    protected static final int xInset

See Also:
  Constant Field Values

### yInset

    protected static final int yInset

See Also:
  Constant Field Values

### text

    protected java.lang.String text

### textWidth

    protected int textWidth

### textHeight

    protected int textHeight

### symbolWidth

    protected int symbolWidth

### symbolHeight

    protected int symbolHeight

### bounds

    protected java.awt.Rectangle bounds

### centre

    protected java.awt.Point centre

### p

    protected Positionable p

  The underlying `Positionable` that this `Drawable` instace is representing

### dependent

    protected Positionable[] dependent

### ep

    protected EditorPanel ep

Constructor Detail

### DrawVertex

    public DrawVertex(EditorPanel ep,
                      Positionable p,
                      Positionable[] dependent)

### DrawVertex

    public DrawVertex(EditorPanel ep,
                      Positionable p)

Method Detail

### setText

    protected final void setText(java.lang.String s)

  Set the text that will be used in this {link @Drawable}, and record its width and heigh in `textBounds`.

### getRelativeTo

    public Positionable[] getRelativeTo()

  If the coordinates of the Positionable that this Drawable is for are specified relatitive to some other Positionables, return those other Positionables

  Specified by:
    `getRelativeTo` in interface `DrawableVertex`

### getBounds

    public java.awt.Rectangle getBounds()

  Description copied from interface: `DrawableVertex`
  Describe the rectangular area within the `EditorPanel` where this `Drawable` vertex is to be painted.

  Specified by:
    `getBounds` in interface `DrawableVertex`

### getCentreOffset

    public java.awt.Point getCentreOffset()

  Implements the `Drawable`

  Specified by:
    `getCentreOffset` in interface `DrawableVertex`
  Returns:
    A point that is an offset within `getBounds()`, where the graphical centre of this `Drawable` lies

### getCentre

    public java.awt.Point getCentre()

  Describe where the centre of the `Drawable` visually appears to a viewer.

  Specified by:
    `getCentre` in interface `DrawableVertex`
  Returns:
    A point that is the absolute coordinate of the , graphical centre of this `Drawable`.

### getPositionable

    public Positionable getPositionable()

  Specified by:
    `getPositionable` in interface `DrawableVertex`

### getConnectionPoint

    public java.awt.Point getConnectionPoint(java.awt.Point other)

  Description copied from interface: `DrawableVertex`
  Calculate the `Point` where a `DrawableArc` connecting to this `DrawableVertex` should be drawn to, no

  Specified by:
    `getConnectionPoint` in interface `DrawableVertex`
  Returns:
    Point

### paintSymbol

    public void paintSymbol(java.awt.Graphics2D g)

### paintText

    public void paintText(java.awt.Graphics2D g)

### paint

    public void paint(java.awt.Graphics2D g)

  Specified by:
    `paint` in interface `Drawable`

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