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,- java.lang.Cloneable
 
 public class TableTool extends Tool This class provides Swing UI editing for Tables.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classTableTool.TTCellRendererA DefaultTableCellRenderer subclass to add tool tips.static classTableTool.TTTableA JTable subclass to make table as big as scrollpane for drag and drop.- 
Nested classes/interfaces inherited from class com.reportmill.panels.ToolTool.RMShapeHandle
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static javax.swing.IconNoPageBreakIconstatic javax.swing.IconPageBreakIconstatic javax.swing.IconSortAscIconstatic javax.swing.IconSortDescIcon- 
Fields inherited from class com.reportmill.panels.ToolHandleMaxXMaxY, HandleMaxXMidY, HandleMaxXMinY, HandleMidXMaxY, HandleMidXMinY, HandleMinXMaxY, HandleMinXMidY, HandleMinXMinY, HandleWidth
 
- 
 - 
Constructor SummaryConstructors Constructor Description TableTool()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddGroupingKey(java.lang.String aKey)Adds a grouping key to the currently selected table.voidaddSortingKey(java.lang.String aKey)Adds a sorting key to the currently selected table.static voidaddTable(RMEditor anEditor, java.lang.String aKeyPath)Adds 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.RMGroupinggetSelectedGrouping()Returns the selected grouping for this table.RMSortgetSelectedSort()Returns the selected sort for this table.RMTablegetSelectedTable()Returns the selected table.java.lang.ClassgetShapeClass()Returns the shape class this tool edits (RMTable).RJPanelgetUI()Returns the Swing UI panel for this tool.java.lang.StringgetWindowTitle()Returns the display name for this tool ("Table Inspector").voidmouseDragged(RMShape aShape, java.awt.event.MouseEvent anEvent)Event handling for splitshape editing.voidmouseMoved(RMShape aShape, java.awt.event.MouseEvent anEvent)MouseMoved implementation to update cursor for resize bars.voidmousePressed(RMShape aShape, java.awt.event.MouseEvent anEvent)Event handling for table editing.voidmouseReleased(RMShape aShape, java.awt.event.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 tablevoidrespondUI(java.lang.Object anObj)Updates 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(java.lang.Object anObj, RJAction anAction)Handles drag and drop on grouping or sort tables.- 
Methods inherited from class com.reportmill.panels.ToolactivateTool, 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.RMObjectclone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
 
- 
 
- 
- 
- 
Method Detail- 
getSelectedTablepublic RMTable getSelectedTable() Returns the selected table.
 - 
getSelectedGroupingpublic RMGrouping getSelectedGrouping() Returns the selected grouping for this table.
 - 
getSelectedSortpublic RMSort getSelectedSort() Returns the selected sort for this table.
 - 
getUIpublic RJPanel getUI() Returns the Swing UI panel for this tool.
 - 
resetUIpublic void resetUI() Updates Swing UI panel from currently selected table
 - 
respondUIpublic void respondUI(java.lang.Object anObj) Updates currently selected table from Swing UI panel.
 - 
takeValueFromDroppublic void takeValueFromDrop(java.lang.Object anObj, RJAction anAction)Handles drag and drop on grouping or sort tables.
 - 
getShapeClasspublic java.lang.Class getShapeClass() Returns the shape class this tool edits (RMTable).- Overrides:
- getShapeClassin class- Tool
 
 - 
getWindowTitlepublic java.lang.String getWindowTitle() Returns the display name for this tool ("Table Inspector").- Overrides:
- getWindowTitlein class- Tool
 
 - 
addGroupingKeypublic void addGroupingKey(java.lang.String aKey) Adds a grouping key to the currently selected table.
 - 
addSortingKeypublic void addSortingKey(java.lang.String aKey) Adds a sorting key to the currently selected table.
 - 
moveGroupingpublic void moveGrouping(int index1, int index2)Moves a grouping from the first given index to the second given index.
 - 
moveSortpublic void moveSort(int index1, int index2)Moves a sort from the first given index to the second given index.
 - 
addTablepublic static void addTable(RMEditor anEditor, java.lang.String aKeyPath) Adds a new table to the given editor with the given list key.
 - 
mouseMovedpublic void mouseMoved(RMShape aShape, java.awt.event.MouseEvent anEvent) MouseMoved implementation to update cursor for resize bars.- Overrides:
- mouseMovedin class- Tool
 
 - 
mousePressedpublic void mousePressed(RMShape aShape, java.awt.event.MouseEvent anEvent) Event handling for table editing.- Overrides:
- mousePressedin class- Tool
 
 - 
mouseDraggedpublic void mouseDragged(RMShape aShape, java.awt.event.MouseEvent anEvent) Event handling for splitshape editing.- Overrides:
- mouseDraggedin class- Tool
 
 - 
mouseReleasedpublic void mouseReleased(RMShape aShape, java.awt.event.MouseEvent anEvent) Event handling for splitshape editing.- Overrides:
- mouseReleasedin class- Tool
 
 - 
runMenuForShapepublic void runMenuForShape(RMShape aShape, int x, int y) Opens a popup menu specific for table row divider under mouse.
 - 
getHandleCountpublic int getHandleCount(RMShape aShape) Overrides shape implementation to declare no handles when the child of a table group.- Overrides:
- getHandleCountin class- Tool
 
 
- 
 
-