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 class
A DefaultTableCellRenderer subclass to add tool tips.static class
A 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 TypeMethodDescriptionvoid
addGroupingKey
(String aKey) Adds a grouping key to the currently selected table.void
addSortingKey
(String aKey) Adds a sorting key to the currently selected table.static void
Adds a new table to the given editor with the given list key.int
getHandleCount
(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").void
mouseDragged
(RMShape aShape, MouseEvent anEvent) Event handling for splitshape editing.void
mouseMoved
(RMShape aShape, MouseEvent anEvent) MouseMoved implementation to update cursor for resize bars.void
mousePressed
(RMShape aShape, MouseEvent anEvent) Event handling for table editing.void
mouseReleased
(RMShape aShape, MouseEvent anEvent) Event handling for splitshape editing.void
moveGrouping
(int index1, int index2) Moves a grouping from the first given index to the second given index.void
moveSort
(int index1, int index2) Moves a sort from the first given index to the second given index.void
resetUI()
Updates Swing UI panel from currently selected tablevoid
Updates currently selected table from Swing UI panel.void
runMenuForShape
(RMShape aShape, int x, int y) Opens a popup menu specific for table row divider under mouse.void
takeValueFromDrop
(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, willLoseSuperSelectionInEditor
Methods 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:
getShapeClass
in classTool
-
getWindowTitle
Returns the display name for this tool ("Table Inspector").- Overrides:
getWindowTitle
in 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:
mouseMoved
in classTool
-
mousePressed
Event handling for table editing.- Overrides:
mousePressed
in classTool
-
mouseDragged
Event handling for splitshape editing.- Overrides:
mouseDragged
in classTool
-
mouseReleased
Event handling for splitshape editing.- Overrides:
mouseReleased
in 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:
getHandleCount
in classTool
-