Class SGuiHelper


  • public class SGuiHelper
    extends java.lang.Object
    Helper methods for the GUI.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected static class  SGuiHelper.ModulateComposite
      Composite for modulation.
    • Constructor Summary

      Constructors 
      Constructor Description
      SGuiHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void applyOrganicLayout​(ModelContainer modelcontainer)
      Applies a circle layout to the model.
      static com.mxgraph.util.mxPoint getCenter​(com.mxgraph.util.mxPoint[] points)
      Gets the center of the rectangle described by the two points.
      static com.mxgraph.util.mxPoint getCenter​(com.mxgraph.util.mxPoint min, com.mxgraph.util.mxPoint max, com.mxgraph.util.mxPoint[] additional)
      Gets the center of the rectangle described by the two points.
      static javax.swing.AbstractButton getSelectedButton​(javax.swing.ButtonGroup group)
      Gets the selected button in a button group.
      static java.lang.String getText​(javax.swing.text.Document doc)
      Text extraction from the Java "Document" class is braindead, throws non-RuntimeException: Bloat, bloat, bloat.
      static void refreshCellView​(com.mxgraph.view.mxGraph graph, com.mxgraph.model.mxCell cell)
      Refreshes the view for a cell.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SGuiHelper

        public SGuiHelper()
    • Method Detail

      • getText

        public static final java.lang.String getText​(javax.swing.text.Document doc)
        Text extraction from the Java "Document" class is braindead, throws non-RuntimeException: Bloat, bloat, bloat.
        Parameters:
        doc - The document.
        Returns:
        The extracted String.
      • refreshCellView

        public static final void refreshCellView​(com.mxgraph.view.mxGraph graph,
                                                 com.mxgraph.model.mxCell cell)
        Refreshes the view for a cell.
        Parameters:
        cell - The cell.
      • getCenter

        public static final com.mxgraph.util.mxPoint getCenter​(com.mxgraph.util.mxPoint[] points)
        Gets the center of the rectangle described by the two points.
        Parameters:
        points - Points to be included in the calculation.
        Returns:
        The center.
      • getCenter

        public static final com.mxgraph.util.mxPoint getCenter​(com.mxgraph.util.mxPoint min,
                                                               com.mxgraph.util.mxPoint max,
                                                               com.mxgraph.util.mxPoint[] additional)
        Gets the center of the rectangle described by the two points.
        Parameters:
        min - Minimum coordinates of the rectangle.
        max - Maximum coordinates of the rectangle.
        addition - Additional points to be included in the calculation.
        Returns:
        The center.
      • getSelectedButton

        public static final javax.swing.AbstractButton getSelectedButton​(javax.swing.ButtonGroup group)
        Gets the selected button in a button group.
        Parameters:
        group - The button group.
        Returns:
        The selected button.
      • applyOrganicLayout

        public static final void applyOrganicLayout​(ModelContainer modelcontainer)
        Applies a circle layout to the model.
        Parameters:
        modelcontainer - The model container.