package drawables;

import java.awt.*;
import javax.swing.*;
import uk.ac.ic.doc.automed.editor.*;
import uk.ac.ic.doc.automed.reps.SchemaObject;
import uk.ac.ic.doc.automed.InconsistentException;

public class DrawERRelationshipVertex extends DrawVertex {   
  public DrawERRelationshipVertex(EditorPanel ep,Positionable schemaObject) {
    super(ep,schemaObject);
  }

  /** Draw a diamond instead of the standard ellipse.
   *
   */
  public void paintSymbol(Graphics2D g) {
    g.setColor(p.getBackgroundColor());
    DefaultDrawLinkVertex.fillDiamond(g,thickness/2,thickness/2,
       symbolWidth-thickness,symbolHeight-thickness);
    g.setColor(p.getForegroundColor());
    g.setStroke(standardStroke);
    DefaultDrawLinkVertex.drawDiamond(g,thickness/2,thickness/2,
       symbolWidth-thickness,symbolHeight-thickness);
  }
}
