Package com.reportmill.panels
Class TableTool
java.lang.Object
com.reportmill.base.RMObject
com.reportmill.panels.Tool
com.reportmill.panels.TableTool
- All Implemented Interfaces:
RMArchiver.Archiving,Cloneable
This class provides Swing UI editing for Tables.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA DefaultTableCellRenderer subclass to add tool tips.static classA JTable subclass to make table as big as scrollpane for drag and drop.Nested classes/interfaces inherited from class com.reportmill.panels.Tool
Tool.RMShapeHandle -
Field Summary
FieldsFields inherited from class com.reportmill.panels.Tool
HandleMaxXMaxY, HandleMaxXMidY, HandleMaxXMinY, HandleMidXMaxY, HandleMidXMinY, HandleMinXMaxY, HandleMinXMidY, HandleMinXMinY, HandleWidth -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGroupingKey(String aKey) Adds a grouping key to the currently selected table.voidaddSortingKey(String aKey) Adds a sorting key to the currently selected table.static voidAdds a new table to the given editor with the given list key.intgetHandleCount(RMShape aShape) Overrides shape implementation to declare no handles when the child of a table group.Returns the selected grouping for this table.Returns the selected sort for this table.Returns the selected table.Returns the shape class this tool edits (RMTable).getUI()Returns the Swing UI panel for this tool.Returns the display name for this tool ("Table Inspector").voidmouseDragged(RMShape aShape, MouseEvent anEvent) Event handling for splitshape editing.voidmouseMoved(RMShape aShape, MouseEvent anEvent) MouseMoved implementation to update cursor for resize bars.voidmousePressed(RMShape aShape, MouseEvent anEvent) Event handling for table editing.voidmouseReleased(RMShape aShape, MouseEvent anEvent) Event handling for splitshape editing.voidmoveGrouping(int index1, int index2) Moves a grouping from the first given index to the second given index.voidmoveSort(int index1, int index2) Moves a sort from the first given index to the second given index.voidresetUI()Updates Swing UI panel from currently selected tablevoidUpdates currently selected table from Swing UI panel.voidrunMenuForShape(RMShape aShape, int x, int y) Opens a popup menu specific for table row divider under mouse.voidtakeValueFromDrop(Object anObj, RJAction anAction) Handles drag and drop on grouping or sort tables.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, mousePressed, mousePressedSelection, mouseReleased, moveShapeHandle, newInstance, paintSelectedShape, paintSuperSelectedShape, paintTool, processKeyEvent, reactivateTool, willLoseSuperSelectionInEditorMethods inherited from class com.reportmill.base.RMObject
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
-
Field Details
-
PageBreakIcon
-
NoPageBreakIcon
-
SortAscIcon
-
SortDescIcon
-
-
Constructor Details
-
TableTool
public TableTool()
-
-
Method Details
-
getSelectedTable
Returns the selected table. -
getSelectedGrouping
Returns the selected grouping for this table. -
getSelectedSort
Returns the selected sort for this table. -
getUI
Returns the Swing UI panel for this tool. -
resetUI
public void resetUI()Updates Swing UI panel from currently selected table -
respondUI
Updates currently selected table from Swing UI panel. -
takeValueFromDrop
Handles drag and drop on grouping or sort tables. -
getShapeClass
Returns the shape class this tool edits (RMTable).- Overrides:
getShapeClassin classTool
-
getWindowTitle
Returns the display name for this tool ("Table Inspector").- Overrides:
getWindowTitlein classTool
-
addGroupingKey
Adds a grouping key to the currently selected table. -
addSortingKey
Adds a sorting key to the currently selected table. -
moveGrouping
public void moveGrouping(int index1, int index2) Moves a grouping from the first given index to the second given index. -
moveSort
public void moveSort(int index1, int index2) Moves a sort from the first given index to the second given index. -
addTable
Adds a new table to the given editor with the given list key. -
mouseMoved
MouseMoved implementation to update cursor for resize bars.- Overrides:
mouseMovedin classTool
-
mousePressed
Event handling for table editing.- Overrides:
mousePressedin classTool
-
mouseDragged
Event handling for splitshape editing.- Overrides:
mouseDraggedin classTool
-
mouseReleased
Event handling for splitshape editing.- Overrides:
mouseReleasedin classTool
-
runMenuForShape
Opens a popup menu specific for table row divider under mouse. -
getHandleCount
Overrides shape implementation to declare no handles when the child of a table group.- Overrides:
getHandleCountin classTool
-