org.graffiti.util
Class GeneralEditorUtils

java.lang.Object
  extended by org.graffiti.util.GeneralEditorUtils

public class GeneralEditorUtils
extends Object

Some auxiliary routines that need editor functionality.

See Also:
GeneralUtils

Constructor Summary
GeneralEditorUtils()
           
 
Method Summary
static void paintSelectionRectangle(JComponent comp, Point2D p1, Point2D p2)
          Draws a rectangle on the given graphics context.
static void setLabel(GraphElement ge, String val)
          Searches if the given Attributable already contains a LabelAttribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeneralEditorUtils

public GeneralEditorUtils()
Method Detail

setLabel

public static void setLabel(GraphElement ge,
                            String val)
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 - graphelement
val - new label string

paintSelectionRectangle

public static void paintSelectionRectangle(JComponent comp,
                                           Point2D p1,
                                           Point2D p2)
Draws a rectangle on the given graphics context.

Parameters:
comp - context to draw upon
p1 - first corner of the rectangle
p2 - second corner of the rectangle


Generated at 2012-05-30 11:00:36 PM CEST