Package com.ribsapp.shapes
Class JComboBoxTool
- java.lang.Object
-
- com.reportmill.base.RMObject
-
- com.reportmill.panels.Tool
-
- com.ribsapp.shapes.RBTool
-
- com.ribsapp.shapes.RJTextTool
-
- com.ribsapp.shapes.JComboBoxTool
-
- All Implemented Interfaces:
RMArchiver.Archiving
,RJListController
,java.lang.Cloneable
public class JComboBoxTool extends RJTextTool implements RJListController
An inner class to act as RJComboBoxShape's Tool
-
-
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 JComboBoxTool()
Creates a new combo box shape tool.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addItem(java.lang.String s)
Add a string to the listboolean
allowsEmptySelection()
Indicates whether or not the list should always maintain a selectionvoid
didBecomeSuperSelectedShapeInEditor(RMShape aShape, RMEditor anEditor)
Called when combo box shape gains super-selection.java.lang.String
getItemAt(int index)
Returns the element at the given index.int
getSelectedIndex()
Return current selectionjava.lang.Class
getShapeClass()
Returns the class that this tool is responsible for.int
getSize()
Returns the number of items.RJPanel
getUI()
Returns the Swing UI panel (loading it the first time).java.lang.String
getWindowTitle()
Returns the string used in the inspector window title.void
itemWasSelected(int i)
Reflect selectionvoid
removeItemAt(int i)
Delete a string at a given indexvoid
renameItemAt(int i, java.lang.String s)
Rename string at indexvoid
resetUI()
Updates the Swing UI from the currently selected combo box shape.void
respondUI(java.lang.Object anObj)
Updates the currently selected combo box shape from the Swing UI controls.void
willLoseSuperSelectionInEditor(RMShape aShape, RMEditor anEditor)
Called when combo box shape loses super-selection.-
Methods inherited from class com.ribsapp.shapes.RBTool
buildShapesFromComponents, BuildShapesFromComponents, getComponentPacked, getHandleCount, getToolRB, syncComponentsFromShapes, SyncComponentsFromShapes
-
Methods inherited from class com.reportmill.panels.Tool
activateTool, deactivateTool, editor, flushChanges, getCoreTool, getCoreToolIndex, getHandleAtPoint, getHandlePoint, getHandleRect, getImageIcon, getImageIcon, getSelectedShape, getSelectedShapes, getSelectTool, getShapeHandleAtPoint, getTool, getTool, isInstance, isSelected, isSuperSelected, mouseDragged, mouseDragged, mouseMoved, mouseMoved, mousePressed, mousePressed, mousePressedSelection, mouseReleased, mouseReleased, moveShapeHandle, newInstance, paintSelectedShape, paintSuperSelectedShape, paintTool, processKeyEvent, reactivateTool
-
Methods inherited from class com.reportmill.base.RMObject
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ribsapp.shapes.RJListController
getSelectedShape
-
-
-
-
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 string used in the inspector window title.- Overrides:
getWindowTitle
in classTool
-
getUI
public RJPanel getUI()
Returns the Swing UI panel (loading it the first time).
-
resetUI
public void resetUI()
Updates the Swing UI from the currently selected combo box shape.
-
respondUI
public void respondUI(java.lang.Object anObj)
Updates the currently selected combo box shape from the Swing UI controls.
-
getSize
public int getSize()
Returns the number of items.- Specified by:
getSize
in interfaceRJListController
-
getItemAt
public java.lang.String getItemAt(int index)
Returns the element at the given index.- Specified by:
getItemAt
in interfaceRJListController
-
addItem
public void addItem(java.lang.String s)
Add a string to the list- Specified by:
addItem
in interfaceRJListController
-
removeItemAt
public void removeItemAt(int i)
Delete a string at a given index- Specified by:
removeItemAt
in interfaceRJListController
-
renameItemAt
public void renameItemAt(int i, java.lang.String s)
Rename string at index- Specified by:
renameItemAt
in interfaceRJListController
-
itemWasSelected
public void itemWasSelected(int i)
Description copied from interface:RJListController
Reflect selection- Specified by:
itemWasSelected
in interfaceRJListController
-
getSelectedIndex
public int getSelectedIndex()
Description copied from interface:RJListController
Return current selection- Specified by:
getSelectedIndex
in interfaceRJListController
-
allowsEmptySelection
public boolean allowsEmptySelection()
Description copied from interface:RJListController
Indicates whether or not the list should always maintain a selection- Specified by:
allowsEmptySelection
in interfaceRJListController
-
didBecomeSuperSelectedShapeInEditor
public void didBecomeSuperSelectedShapeInEditor(RMShape aShape, RMEditor anEditor)
Called when combo box shape gains super-selection.- Overrides:
didBecomeSuperSelectedShapeInEditor
in classRJTextTool
-
willLoseSuperSelectionInEditor
public void willLoseSuperSelectionInEditor(RMShape aShape, RMEditor anEditor)
Called when combo box shape loses super-selection.- Overrides:
willLoseSuperSelectionInEditor
in classRJTextTool
-
-