package pipe.dataLayer; import java.awt.Color; import java.awt.Shape; import java.awt.Point; import java.awt.Rectangle; import java.awt.geom.*; import javax.swing.*; import java.awt.event.*; import java.awt.*; /** * NameLabel - This class is for the labels of PN Objects * * @see

NameLabel UML

* @version 1.0 * @author Camilla Clifford */ public class NameLabel extends JLabel{ public String text; public int boundsLeft; public int boundsTop; public int arcboundsLeft; public int arcboundsTop; public int width = 60; public int height = 20; public int arcWidth = 50; public int arcHeight = 20; public NameLabel(){ } public NameLabel(String text){ text = text; setText(text); setVerticalAlignment(TOP); } //sets the bounds of the label according to the PN Object that it is labelling public void boundsSet(int boundsLoffset, int boundsToffset, int boundsWidth, int boundsHeight){ boundsLeft = boundsLoffset; boundsTop = boundsToffset+30; setBounds(boundsLeft, boundsTop, width, height); } public void arcboundsSet(int boundsLoffset, int boundsToffset, int arcWidth, int arcHeight){ arcboundsLeft = boundsLoffset; arcboundsTop = boundsToffset; setBounds(arcboundsLeft, arcboundsTop, arcWidth, arcHeight); } public void paintComponent(Graphics g){ super.paintComponent(g); } }