|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.table.InputHandler | +--com.klg.jclass.table.MouseInputHandler
MouseInputHandler
processes all mouse events for
table. It handles traversal, selection, resize, editor start
and stop, and dragging.
Field Summary | |
protected static int |
AUTO_SCROLL_AMOUNT
|
protected static int |
AUTO_SCROLL_DEC
|
protected int |
auto_scroll_horiz
|
protected static int |
AUTO_SCROLL_INC
|
protected com.klg.jclass.table.JCCellPosition |
auto_scroll_initial_cell
|
protected static int |
AUTO_SCROLL_NONE
|
protected Timer |
auto_scroll_timer
|
protected int |
auto_scroll_vert
|
protected int |
auto_scroll_x
|
protected int |
auto_scroll_y
|
protected boolean |
AUTOSCROLLING
|
protected static int |
CORNER_CURSOR
|
protected static int |
CORNER_RESIZE
|
protected static int |
DEFAULT_CURSOR
|
protected boolean |
DRAGGING
|
protected static int |
HORIZ_CURSOR
|
protected static int |
HORIZ_RESIZE
|
protected com.klg.jclass.table.JCCellPosition |
initial_cell
|
protected static int |
MOVE_CURSOR
|
protected boolean |
multi_cell_drag
|
protected boolean |
needs_resize_begin_event
|
protected static int |
NO_RESIZE
|
protected static int |
NONTRAV_CURSOR
|
protected com.klg.jclass.table.JCCellPosition |
position
|
protected com.klg.jclass.table.JCResizeCellEvent |
resize_motion_event
|
protected int |
resizeColumn
|
protected com.klg.jclass.table.CellSize |
resizeColumnCellSize
|
protected int |
resizeHeight
|
protected Point |
resizePoint
|
protected int |
resizeRow
|
protected com.klg.jclass.table.CellSize |
resizeRowCellSize
|
protected int |
resizeWidth
|
protected boolean |
RESIZING
|
protected boolean |
SORTING
|
protected static int |
TRAV_CURSOR
|
protected static int |
VERT_CURSOR
|
protected static int |
VERT_RESIZE
|
protected static int |
WAIT_CURSOR
|
Fields inherited from class com.klg.jclass.table.InputHandler |
SELECTING, table |
Constructor Summary | |
MouseInputHandler(com.klg.jclass.table.JCTable table)
|
Method Summary | |
void |
actionPerformed(ActionEvent event)
ActionPerformed is called by the AutoScroll timer in
order to make new rows/columns visible when the mouse is dragged
out of the cell/label area of table during selection or dragging. |
protected void |
cancelDrag()
Cancels the drag process if mouse release if over a frozen cell. |
protected void |
cancelResize()
Resets the resize variables. |
protected void |
endDrag(com.klg.jclass.table.JCCellPosition final_cell)
Completes the drag process by actually performing the manipulation. |
protected int |
getResizeDirection(int x,
int y,
int row,
int column)
Determines whether a resize is available at the current position. |
protected boolean |
isAutoScrollColumn()
Returns true if column auto scroll is enabled. |
protected boolean |
isAutoScrollRow()
Returns true if row auto scroll is enabled. |
boolean |
isLeftButton(int modifiers)
Returns true if the mouse press is with the left mouse button. |
boolean |
isMiddleButton(int modifiers)
Returns true if the mouse press is with the middle mouse button. |
protected boolean |
isResizing()
Returns true if resize is under way. |
boolean |
isRightButton(int modifiers)
Returns true if the mouse press is with the right mouse button. |
protected boolean |
isTraversable(int row,
int column)
Returns true if the cell is potentially traversable. |
protected boolean |
isValidCellPosition(com.klg.jclass.table.JCCellPosition cell)
Returns true if the cell position is potentially valid. |
protected boolean |
isValidDragPosition(com.klg.jclass.table.JCCellPosition cp)
Returns true if the given position is valid for dragging. |
void |
mouseClicked(MouseEvent e)
Process mouse click. |
void |
mouseDragged(MouseEvent e)
Process mouse drag. |
void |
mouseEntered(MouseEvent e)
Process mouse enter. |
void |
mouseExited(MouseEvent e)
Process mouse exit. |
void |
mouseMoved(MouseEvent e)
Process mouse move. |
void |
mousePressed(MouseEvent e)
Process mouse press. |
void |
mouseReleased(MouseEvent e)
Process mouse release. |
protected void |
performDrag(com.klg.jclass.table.JCCellPosition current_cell)
Drags the invoking row or column to the new position. |
protected void |
resizeBegin(int x,
int y)
Initiates a resize action. |
protected void |
resizeDrag(int x,
int y)
Handles a drag event during a resize action. |
protected void |
resizeEnd(int x,
int y)
Completes a resize action. |
protected int |
trackResizeCursor(int x,
int y)
Returns the cursor type given a mouse position. |
protected boolean |
traverse(MouseEvent event,
com.klg.jclass.table.JCCellPosition position,
boolean isPress)
Traverse the current cell from one location to another, scrolling to make it visible if necessary. |
Methods inherited from class com.klg.jclass.table.InputHandler |
getCellPosition, isAlt, isCell, isControl, isCopyAction, isLabel, isMeta, isPasteAction, isShift, loadPasteData, performCopyAction, performPasteAction |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final int DEFAULT_CURSOR
protected static final int TRAV_CURSOR
protected static final int NONTRAV_CURSOR
protected static final int CORNER_CURSOR
protected static final int HORIZ_CURSOR
protected static final int VERT_CURSOR
protected static final int MOVE_CURSOR
protected static final int WAIT_CURSOR
protected static final int NO_RESIZE
protected static final int HORIZ_RESIZE
protected static final int VERT_RESIZE
protected static final int CORNER_RESIZE
protected com.klg.jclass.table.JCCellPosition initial_cell
protected com.klg.jclass.table.JCCellPosition position
protected boolean multi_cell_drag
protected int resizeRow
protected int resizeColumn
protected int resizeHeight
protected int resizeWidth
protected com.klg.jclass.table.CellSize resizeRowCellSize
protected com.klg.jclass.table.CellSize resizeColumnCellSize
protected Point resizePoint
protected boolean needs_resize_begin_event
protected com.klg.jclass.table.JCResizeCellEvent resize_motion_event
protected static final int AUTO_SCROLL_DEC
protected static final int AUTO_SCROLL_NONE
protected static final int AUTO_SCROLL_INC
protected static final int AUTO_SCROLL_AMOUNT
protected int auto_scroll_horiz
protected int auto_scroll_vert
protected transient Timer auto_scroll_timer
protected com.klg.jclass.table.JCCellPosition auto_scroll_initial_cell
protected int auto_scroll_x
protected int auto_scroll_y
protected boolean AUTOSCROLLING
protected boolean DRAGGING
protected boolean RESIZING
protected boolean SORTING
Constructor Detail |
public MouseInputHandler(com.klg.jclass.table.JCTable table)
Method Detail |
public final boolean isLeftButton(int modifiers)
modifiers
- The mouse event modifiers
public final boolean isMiddleButton(int modifiers)
modifiers
- The mouse event modifiers
public final boolean isRightButton(int modifiers)
modifiers
- The mouse event modifiers
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
e
- The event generated by the mouse pressprotected boolean isValidDragPosition(com.klg.jclass.table.JCCellPosition cp)
cp
- The cell position (i.e. row/column)
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener
e
- The event generated by the mouse dragpublic void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
e
- The event generated by the mouse releasepublic void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
e
- The event generated by the mouse enterpublic void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
e
- The event generated by the mouse movepublic void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
e
- The event generated by the mouse exitpublic void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
e
- The event generated by the mouse clickprotected int trackResizeCursor(int x, int y)
x
- The x coordinate of the mousey
- The y coordinate of the mouse
protected int getResizeDirection(int x, int y, int row, int column)
x
- The x coordinate of the current positiony
- The y coordinate of the current positionrow
- The row in which the current position is incolumn
- The column in which the current position is in
NO_RESIZE
, HORIZ_RESIZE
,
VERT_RESIZE
and BORDER_RESIZE
.protected void resizeBegin(int x, int y)
x
- The x position of the resize beginy
- The y position of the resize beginprotected void resizeDrag(int x, int y)
x
- The x position of the resize dragy
- The y position of the resize dragprotected void resizeEnd(int x, int y)
x
- The x position of the resize endy
- The y position of the resize endprotected void cancelResize()
protected final boolean isAutoScrollRow()
protected final boolean isAutoScrollColumn()
protected final boolean isResizing()
protected final boolean isTraversable(int row, int column)
row
- The row index of the cellcolumn
- The column index of the cell
protected final boolean isValidCellPosition(com.klg.jclass.table.JCCellPosition cell)
cell
- The cell position
protected boolean traverse(MouseEvent event, com.klg.jclass.table.JCCellPosition position, boolean isPress)
event
- The mouse event that caused traverse to be calledposition
- The cell position of the mouse eventisPress
- Is this a button press
protected void performDrag(com.klg.jclass.table.JCCellPosition current_cell)
current_cell
- The current cell to which to dragprotected void cancelDrag()
protected void endDrag(com.klg.jclass.table.JCCellPosition final_cell)
CellAreaHandler
.
final_cell
- The final cell to which to dragpublic void actionPerformed(ActionEvent event)
ActionPerformed
is called by the AutoScroll timer in
order to make new rows/columns visible when the mouse is dragged
out of the cell/label area of table during selection or dragging.
actionPerformed
in interface ActionListener
event
- The action event generated by the action
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |