Class JSplitPaneTool

All Implemented Interfaces:
RMArchiver.Archiving, Cloneable

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

    • JSplitPaneTool

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

    • getShapeClass

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

      public 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(JComponent anObj)
      Updates the currently selected button shape from the Swing UI panel controls.
    • buildShapesFromComponents

      public void buildShapesFromComponents(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, MouseEvent anEvent)
      Event handling for shape editing.
      Overrides:
      mousePressed in class Tool
    • mouseDragged

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

      public static JSplitPaneShape groupInSplitpanes(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 JSplitPane buildSplitpaneWithChildren(JComponent c1, JComponent c2, int splitways)
    • paintSuperSelectedShape

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