Package org.graffiti.util
Class GeneralEditorUtils
java.lang.Object
org.graffiti.util.GeneralEditorUtils
public class GeneralEditorUtils extends Object
Some auxiliary routines that need editor functionality.
- See Also:
 GeneralUtils
- 
Constructor Summary
Constructors Constructor Description GeneralEditorUtils() - 
Method Summary
Modifier and Type Method Description static voidpaintSelectionRectangle(JComponent comp, Point2D p1, Point2D p2)Draws a rectangle on the given graphics context.static voidsetLabel(GraphElement ge, String val)Searches if the given Attributable already contains a LabelAttribute. 
- 
Constructor Details
- 
GeneralEditorUtils
public GeneralEditorUtils() 
 - 
 - 
Method Details
- 
setLabel
Searches if the given Attributable already contains a LabelAttribute. If yes, its value is set to the given String. If not, a new label attribute is instantiated and its value set to the given value.- Parameters:
 ge- graphelementval- new label string
 - 
paintSelectionRectangle
Draws a rectangle on the given graphics context.- Parameters:
 comp- context to draw uponp1- first corner of the rectanglep2- second corner of the rectangle
 
 -