uk.ac.ic.doc.automed.editor
Class DefaultDrawLinkNodalVertex

java.lang.Object
  extended by uk.ac.ic.doc.automed.editor.DrawVertex
      extended by uk.ac.ic.doc.automed.editor.DefaultDrawLinkNodalVertex
All Implemented Interfaces:
Drawable, DrawableVertex
Direct Known Subclasses:
DrawEERAttributeVertex

public class DefaultDrawLinkNodalVertex
extends DrawVertex


Field Summary
protected  int cx
           
protected  int cy
           
protected  int tx
           
protected  int ty
           
 
Fields inherited from class uk.ac.ic.doc.automed.editor.DrawVertex
bounds, dashedStroke, dependent, ep, fm, p, standardStroke, symbolHeight, symbolWidth, text, textHeight, textWidth, thickness, thickStroke, thinStroke, xInset, yInset, zeroOffset
 
Constructor Summary
DefaultDrawLinkNodalVertex(EditorPanel ep, Positionable p, Positionable[] dependent)
           
 
Method Summary
 java.awt.Rectangle getBounds()
          Implements getBounds() from Drawable
 java.awt.Point getCentre()
          Describe where the centre of the Drawable visually appears to a viewer.
 java.awt.Point getCentreOffset()
          Implements getCentreOffset() from Drawable
 void paintSymbol(java.awt.Graphics2D g)
          Draw a circle to represent the attribute vertex
 void paintText(java.awt.Graphics2D g)
          The default implementation of paintText for a vertex puts the text in the middle of the symbol
 
Methods inherited from class uk.ac.ic.doc.automed.editor.DrawVertex
getConnectionPoint, getConnectionPointMovableCentre, getConnectsTo, getPositionable, intersectLine, paintComponent, setText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cx

protected int cx

cy

protected int cy

tx

protected int tx

ty

protected int ty
Constructor Detail

DefaultDrawLinkNodalVertex

public DefaultDrawLinkNodalVertex(EditorPanel ep,
                                  Positionable p,
                                  Positionable[] dependent)
Method Detail

getBounds

public java.awt.Rectangle getBounds()
Description copied from class: DrawVertex
Implements getBounds() from Drawable

Specified by:
getBounds in interface DrawableVertex
Overrides:
getBounds in class DrawVertex
Returns:
A rectangle that defines the area this Drawable takes up in the editor panel

getCentreOffset

public java.awt.Point getCentreOffset()
Description copied from class: DrawVertex
Implements getCentreOffset() from Drawable

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

getCentre

public java.awt.Point getCentre()
Description copied from class: DrawVertex
Describe where the centre of the Drawable visually appears to a viewer.

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

paintSymbol

public void paintSymbol(java.awt.Graphics2D g)
Draw a circle to represent the attribute vertex

Overrides:
paintSymbol in class DrawVertex

paintText

public void paintText(java.awt.Graphics2D g)
Description copied from class: DrawVertex
The default implementation of paintText for a vertex puts the text in the middle of the symbol

Overrides:
paintText in class DrawVertex