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 Details

    • GeneralEditorUtils

      public GeneralEditorUtils()
  • Method Details

    • 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