Class JSplitPaneTool

  • All Implemented Interfaces:
    RMArchiver.Archiving, java.lang.Cloneable

    public class JSplitPaneTool
    extends RBTool
    A Ribs app tool for JSplitPanes.
    • Constructor Detail

      • JSplitPaneTool

        public JSplitPaneTool()
        Creates a tabbed pane tool.
    • Method Detail

      • getShapeClass

        public java.lang.Class getShapeClass()
        Returns the class that this tool is responsible for.
        Overrides:
        getShapeClass in class Tool
      • getWindowTitle

        public java.lang.String getWindowTitle()
        Returns the name to be used for this tool in inspector window title.
        Overrides:
        getWindowTitle in class Tool
      • getUI

        public RJPanel getUI()
        Returns the Swing UI panel for this inspector.
        Overrides:
        getUI in class Tool
      • resetUI

        public void resetUI()
        Updates the Swing UI panel controls from the currently selected button shape.
        Overrides:
        resetUI in class Tool
      • respondUI

        public void respondUI​(javax.swing.JComponent anObj)
        Updates the currently selected button shape from the Swing UI panel controls.
      • buildShapesFromComponents

        public void buildShapesFromComponents​(javax.swing.JComponent aComponent,
                                              RJShape aShape,
                                              RMShape aParentShape)
        Creates the appropriate RJShape for given RJComponent and adds it to given shape.
        Overrides:
        buildShapesFromComponents in class RBTool
      • syncComponentsFromShapes

        public void syncComponentsFromShapes​(RMShape aShape)
        Synchronizes component heirarchy from shape heirarchy (shapes may have been added, removed, reordered).
        Overrides:
        syncComponentsFromShapes in class RBTool
      • mousePressed

        public void mousePressed​(RMShape aShape,
                                 java.awt.event.MouseEvent anEvent)
        Event handling for shape editing.
        Overrides:
        mousePressed in class Tool
      • mouseDragged

        public void mouseDragged​(RMShape aShape,
                                 java.awt.event.MouseEvent anEvent)
        Event handling for shape editing.
        Overrides:
        mouseDragged in class Tool
      • groupInSplitpanes

        public static JSplitPaneShape groupInSplitpanes​(java.util.List allShapes)
        Group multiple shapes into splitpanes. Splitpanes have only two children, so this routine recursively groups the list of shapes into a tree of splitpanes. 98% of the time it will probably be called with just 2 shapes, but we might as well cover all the cases. Also, every shape will go into its own pane. Selecting 10 random shapes & choosing "group in splitpane" is awfully ambiguous, so you get what you get - quit your bitching.
      • buildSplitpaneWithChildren

        public static javax.swing.JSplitPane buildSplitpaneWithChildren​(javax.swing.JComponent c1,
                                                                        javax.swing.JComponent c2,
                                                                        int splitways)
      • paintSuperSelectedShape

        public void paintSuperSelectedShape​(RMShape aShape,
                                            java.awt.Graphics2D g)
        Draw some sort of indicator for super-selected splitpanes.
        Overrides:
        paintSuperSelectedShape in class Tool