Package com.ribsapp.shapes
Class JSplitPaneTool
- java.lang.Object
-
- com.reportmill.base.RMObject
-
- com.reportmill.panels.Tool
-
- com.ribsapp.shapes.RBTool
-
- com.ribsapp.shapes.JSplitPaneTool
-
- All Implemented Interfaces:
RMArchiver.Archiving
,java.lang.Cloneable
public class JSplitPaneTool extends RBTool
A Ribs app tool for JSplitPanes.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.reportmill.panels.Tool
Tool.RMShapeHandle
-
-
Field Summary
-
Fields inherited from class com.reportmill.panels.Tool
HandleMaxXMaxY, HandleMaxXMidY, HandleMaxXMinY, HandleMidXMaxY, HandleMidXMinY, HandleMinXMaxY, HandleMinXMidY, HandleMinXMinY, HandleWidth
-
-
Constructor Summary
Constructors Constructor Description JSplitPaneTool()
Creates a tabbed pane tool.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
buildShapesFromComponents(javax.swing.JComponent aComponent, RJShape aShape, RMShape aParentShape)
Creates the appropriate RJShape for given RJComponent and adds it to given shape.static javax.swing.JSplitPane
buildSplitpaneWithChildren(javax.swing.JComponent c1, javax.swing.JComponent c2, int splitways)
java.lang.Class
getShapeClass()
Returns the class that this tool is responsible for.RJPanel
getUI()
Returns the Swing UI panel for this inspector.java.lang.String
getWindowTitle()
Returns the name to be used for this tool in inspector window title.static JSplitPaneShape
groupInSplitpanes(java.util.List allShapes)
Group multiple shapes into splitpanes.void
mouseDragged(RMShape aShape, java.awt.event.MouseEvent anEvent)
Event handling for shape editing.void
mousePressed(RMShape aShape, java.awt.event.MouseEvent anEvent)
Event handling for shape editing.void
paintSuperSelectedShape(RMShape aShape, java.awt.Graphics2D g)
Draw some sort of indicator for super-selected splitpanes.void
resetUI()
Updates the Swing UI panel controls from the currently selected button shape.void
respondUI(javax.swing.JComponent anObj)
Updates the currently selected button shape from the Swing UI panel controls.void
syncComponentsFromShapes(RMShape aShape)
Synchronizes component heirarchy from shape heirarchy (shapes may have been added, removed, reordered).-
Methods inherited from class com.ribsapp.shapes.RBTool
BuildShapesFromComponents, getComponentPacked, getHandleCount, getToolRB, SyncComponentsFromShapes
-
Methods inherited from class com.reportmill.panels.Tool
activateTool, deactivateTool, didBecomeSuperSelectedShapeInEditor, editor, flushChanges, getCoreTool, getCoreToolIndex, getHandleAtPoint, getHandlePoint, getHandleRect, getImageIcon, getImageIcon, getSelectedShape, getSelectedShapes, getSelectTool, getShapeHandleAtPoint, getTool, getTool, isInstance, isSelected, isSuperSelected, mouseDragged, mouseMoved, mouseMoved, mousePressed, mousePressedSelection, mouseReleased, mouseReleased, moveShapeHandle, newInstance, paintSelectedShape, paintTool, processKeyEvent, reactivateTool, respondUI, willLoseSuperSelectionInEditor
-
Methods inherited from class com.reportmill.base.RMObject
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
-
-
-
-
Method Detail
-
getShapeClass
public java.lang.Class getShapeClass()
Returns the class that this tool is responsible for.- Overrides:
getShapeClass
in classTool
-
getWindowTitle
public java.lang.String getWindowTitle()
Returns the name to be used for this tool in inspector window title.- Overrides:
getWindowTitle
in classTool
-
getUI
public RJPanel getUI()
Returns the Swing UI panel for this inspector.
-
resetUI
public void resetUI()
Updates the Swing UI panel controls from the currently selected button shape.
-
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 classRBTool
-
syncComponentsFromShapes
public void syncComponentsFromShapes(RMShape aShape)
Synchronizes component heirarchy from shape heirarchy (shapes may have been added, removed, reordered).- Overrides:
syncComponentsFromShapes
in classRBTool
-
mousePressed
public void mousePressed(RMShape aShape, java.awt.event.MouseEvent anEvent)
Event handling for shape editing.- Overrides:
mousePressed
in classTool
-
mouseDragged
public void mouseDragged(RMShape aShape, java.awt.event.MouseEvent anEvent)
Event handling for shape editing.- Overrides:
mouseDragged
in classTool
-
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 classTool
-
-