uk.ac.ic.doc.automed.editor.drawables
Class DrawUMLAssociationArc

java.lang.Object
  extended by uk.ac.ic.doc.automed.editor.DrawArc
      extended by uk.ac.ic.doc.automed.editor.drawables.DrawUMLAssociationArc
All Implemented Interfaces:
Drawable, DrawableArc

public class DrawUMLAssociationArc
extends DrawArc


Field Summary
(package private)  int textHeight
           
 
Fields inherited from class uk.ac.ic.doc.automed.editor.DrawArc
d, dashedStroke, ep, fm, p, standardStroke, thickness, thickStroke
 
Constructor Summary
DrawUMLAssociationArc(EditorPanel ep, Positionable p, Positionable[] d)
          Draw a UML association arc that includes the two role names and a muliplicity for each role
 
Method Summary
 void paintComponent(java.awt.Graphics2D g)
          Draw the arc between a vertex representing the association in p and an vertex representing the attached entities in
 void roleAndMultiplicityString(java.awt.Graphics2D g, java.lang.String role, java.lang.String muliplicity, java.awt.Point p1, java.awt.Point p2)
          Place a string near the correct end of the line for the relevant role such that it will not overlap the object p1 might connect to.
 
Methods inherited from class uk.ac.ic.doc.automed.editor.DrawArc
drawArrow, getConnectsTo, getPositionable, getPositionables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

textHeight

int textHeight
Constructor Detail

DrawUMLAssociationArc

public DrawUMLAssociationArc(EditorPanel ep,
                             Positionable p,
                             Positionable[] d)
Draw a UML association arc that includes the two role names and a muliplicity for each role

Method Detail

paintComponent

public void paintComponent(java.awt.Graphics2D g)
Draw the arc between a vertex representing the association in p and an vertex representing the attached entities in

Specified by:
paintComponent in interface Drawable
Overrides:
paintComponent in class DrawArc

roleAndMultiplicityString

public void roleAndMultiplicityString(java.awt.Graphics2D g,
                                      java.lang.String role,
                                      java.lang.String muliplicity,
                                      java.awt.Point p1,
                                      java.awt.Point p2)
Place a string near the correct end of the line for the relevant role such that it will not overlap the object p1 might connect to.