public class JComboBoxTool extends RJTextTool implements RJListController
Tool.RMShapeHandle
HandleMaxXMaxY, HandleMaxXMidY, HandleMaxXMinY, HandleMidXMaxY, HandleMidXMinY, HandleMinXMaxY, HandleMinXMidY, HandleMinXMinY, HandleWidth
Constructor and Description |
---|
JComboBoxTool()
Creates a new combo box shape tool.
|
Modifier and Type | Method and Description |
---|---|
void |
addItem(java.lang.String s)
Add a string to the list
|
boolean |
allowsEmptySelection()
Indicates whether or not the list should always maintain a selection
|
void |
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 selection
|
java.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 selection
|
void |
removeItemAt(int i)
Delete a string at a given index
|
void |
renameItemAt(int i,
java.lang.String s)
Rename string at index
|
void |
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.
|
buildShapesFromComponents, BuildShapesFromComponents, getComponentPacked, getHandleCount, getToolRB, SyncComponentsFromShapes, syncComponentsFromShapes
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
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSelectedShape
public java.lang.Class getShapeClass()
getShapeClass
in class Tool
public java.lang.String getWindowTitle()
getWindowTitle
in class Tool
public RJPanel getUI()
public void resetUI()
public void respondUI(java.lang.Object anObj)
public int getSize()
getSize
in interface RJListController
public java.lang.String getItemAt(int index)
getItemAt
in interface RJListController
public void addItem(java.lang.String s)
addItem
in interface RJListController
public void removeItemAt(int i)
removeItemAt
in interface RJListController
public void renameItemAt(int i, java.lang.String s)
renameItemAt
in interface RJListController
public void itemWasSelected(int i)
RJListController
itemWasSelected
in interface RJListController
public int getSelectedIndex()
RJListController
getSelectedIndex
in interface RJListController
public boolean allowsEmptySelection()
RJListController
allowsEmptySelection
in interface RJListController
public void didBecomeSuperSelectedShapeInEditor(RMShape aShape, RMEditor anEditor)
didBecomeSuperSelectedShapeInEditor
in class RJTextTool
public void willLoseSuperSelectionInEditor(RMShape aShape, RMEditor anEditor)
willLoseSuperSelectionInEditor
in class RJTextTool