Package com.reportmill.panels
Class CellTableTool
- java.lang.Object
-
- com.reportmill.base.RMObject
-
- com.reportmill.panels.Tool
-
- com.reportmill.panels.CellTableTool
-
- All Implemented Interfaces:
RMArchiver.Archiving
,java.lang.Cloneable
public class CellTableTool extends Tool
This class provides support for UI editing of RMCellTable shapes.
-
-
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 CellTableTool()
Creates a new CellTableTool.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RMCell
getSelectedCell()
Returns the selected cell.RMCellTable
getSelectedTable()
Returns the selected table.java.lang.Class
getShapeClass()
Returns the shape class this tool edits (RMTable).RJPanel
getUI()
Returns the Swing UI panel for this inspector.java.lang.String
getWindowTitle()
Returns the display name for this tool ("Table Inspector").void
mouseDragged(RMShape aShape, java.awt.event.MouseEvent anEvent)
Handle cell table mouse dragged.void
mouseMoved(RMShape aShape, java.awt.event.MouseEvent anEvent)
Event handling - overridden to set a custom cursor.void
mousePressed(RMShape aShape, java.awt.event.MouseEvent anEvent)
Handles Shape MousePressed.void
mouseReleased(RMShape aShape, java.awt.event.MouseEvent anEvent)
Handle cell table mouse released.void
paintTool(java.awt.Graphics2D g)
Highlights the selected cells or dividers.void
processKeyEvent(RMShape aShape, java.awt.event.KeyEvent anEvent)
Key event handler for crosstab editing.void
resetUI()
Resets the Swing UI from current selected cell table.void
respondUI(java.lang.Object anObj)
Updates currently selected cell table from Swing UI.void
runContextMenu(java.awt.event.MouseEvent anEvent)
Runs a context menu for the given event.-
Methods inherited from class com.reportmill.panels.Tool
activateTool, deactivateTool, didBecomeSuperSelectedShapeInEditor, editor, flushChanges, getCoreTool, getCoreToolIndex, getHandleAtPoint, getHandleCount, getHandlePoint, getHandleRect, getImageIcon, getImageIcon, getSelectedShape, getSelectedShapes, getSelectTool, getShapeHandleAtPoint, getTool, getTool, isInstance, isSelected, isSuperSelected, mouseDragged, mouseMoved, mousePressed, mousePressedSelection, mouseReleased, moveShapeHandle, newInstance, paintSelectedShape, paintSuperSelectedShape, reactivateTool, willLoseSuperSelectionInEditor
-
Methods inherited from class com.reportmill.base.RMObject
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
-
-
-
-
Method Detail
-
getUI
public RJPanel getUI()
Returns the Swing UI panel for this inspector.
-
resetUI
public void resetUI()
Resets the Swing UI from current selected cell table.
-
respondUI
public void respondUI(java.lang.Object anObj)
Updates currently selected cell table from Swing UI.
-
mouseMoved
public void mouseMoved(RMShape aShape, java.awt.event.MouseEvent anEvent)
Event handling - overridden to set a custom cursor.- Overrides:
mouseMoved
in classTool
-
mousePressed
public void mousePressed(RMShape aShape, java.awt.event.MouseEvent anEvent)
Handles Shape MousePressed.- Overrides:
mousePressed
in classTool
-
mouseDragged
public void mouseDragged(RMShape aShape, java.awt.event.MouseEvent anEvent)
Handle cell table mouse dragged.- Overrides:
mouseDragged
in classTool
-
mouseReleased
public void mouseReleased(RMShape aShape, java.awt.event.MouseEvent anEvent)
Handle cell table mouse released.- Overrides:
mouseReleased
in classTool
-
processKeyEvent
public void processKeyEvent(RMShape aShape, java.awt.event.KeyEvent anEvent)
Key event handler for crosstab editing.- Overrides:
processKeyEvent
in classTool
-
runContextMenu
public void runContextMenu(java.awt.event.MouseEvent anEvent)
Runs a context menu for the given event.
-
paintTool
public void paintTool(java.awt.Graphics2D g)
Highlights the selected cells or dividers.
-
getSelectedTable
public RMCellTable getSelectedTable()
Returns the selected table.
-
getSelectedCell
public RMCell getSelectedCell()
Returns the selected cell.
-
getShapeClass
public java.lang.Class getShapeClass()
Returns the shape class this tool edits (RMTable).- Overrides:
getShapeClass
in classTool
-
getWindowTitle
public java.lang.String getWindowTitle()
Returns the display name for this tool ("Table Inspector").- Overrides:
getWindowTitle
in classTool
-
-