public class TableRolloverController<T extends JTable> extends RolloverController<T>
Modifier and Type | Field and Description |
---|---|
private Cursor |
oldCursor |
component, EXECUTE_BUTTON_ACTIONCOMMAND
Constructor and Description |
---|
TableRolloverController() |
Modifier and Type | Method and Description |
---|---|
protected Point |
getFocusedCell()
The coordinates of the focused cell in view coordinates.
|
private List<Rectangle> |
getPaintRectangles(List<Rectangle> rectangles,
Point cellLocation,
boolean paintRow,
boolean paintColumn) |
protected RolloverRenderer |
getRolloverRenderer(Point location,
boolean prepare)
Returns the rolloverRenderer at the given location.
|
private boolean |
hasColumn(Point cellLocation) |
private boolean |
hasRow(Point cellLocation) |
protected boolean |
isClickable(Point location)
overridden to return false if cell editable.
|
protected void |
rollover(Point oldLocation,
Point newLocation)
called on change of client property Rollover_Key.
|
private void |
setRolloverCursor(Point location) |
click, createExecuteButtonAction, hasRollover, install, propertyChange, registerExecuteButtonAction, release, unregisterExecuteButtonAction
public TableRolloverController()
protected void rollover(Point oldLocation, Point newLocation)
RolloverController
rollover
in class RolloverController<T extends JTable>
oldLocation
- the old value of the rollover location.newLocation
- the new value of the rollover location.private List<Rectangle> getPaintRectangles(List<Rectangle> rectangles, Point cellLocation, boolean paintRow, boolean paintColumn)
rectangles
- List of rectangles to paint, maybe nullcellLocation
- the location of the cell, guaranteed to be not nullpaintRow
- boolean indicating whether the row should be paintedpaintColumn
- boolean indicating whether the column should be paintedprivate boolean hasColumn(Point cellLocation)
cellLocation
- the cell location to check, may be nullprivate boolean hasRow(Point cellLocation)
cellLocation
- the cell location to check, may be nullprotected boolean isClickable(Point location)
isClickable
in class RolloverController<T extends JTable>
location
- in cell coordinates, p.x == column, p.y == row.RolloverController.hasRollover(Point)
protected RolloverRenderer getRolloverRenderer(Point location, boolean prepare)
RolloverController
The result may be null if there is none or if rollover is not enabled. If the prepare flag is true, the renderer will be prepared with value and state as appropriate for the given location. Note: PRE - the location must be valid in cell coordinate space.
getRolloverRenderer
in class RolloverController<T extends JTable>
location
- a valid location in cell coordinates, p.x == column, p.y == row.RolloverRenderer
at the given locationprivate void setRolloverCursor(Point location)
protected Point getFocusedCell()
RolloverController
getFocusedCell
in class RolloverController<T extends JTable>
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses