JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.table
Class InputHandler

java.lang.Object
  |
  +--com.klg.jclass.table.InputHandler
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
KeyInputHandler, MouseInputHandler

public class InputHandler
extends Object
implements Serializable

InputHandler provides copy/paste support for KeyInputHandler and MouseInputHandler.

See Also:
Serialized Form

Field Summary
protected  boolean SELECTING
           
protected  com.klg.jclass.table.JCTable table
           
 
Constructor Summary
InputHandler(com.klg.jclass.table.JCTable table)
           
 
Method Summary
 void getCellPosition(int x, int y, com.klg.jclass.table.JCCellPosition cp)
          Sets the given JCCellPosition with the cell found at the x,y coordinates.
 boolean isAlt(int modifiers)
          Returns true if the modifier contains an ALT key.
 boolean isCell(int row, int column)
          Returns true if the row/column is a cell.
 boolean isControl(int modifiers)
          Returns true if the modifier contains a control key.
 boolean isCopyAction(AWTEvent event, int row, int column)
          Returns true if the given event is mapped to a copy action.
 boolean isLabel(int row, int column)
          Returns true if the row/column is a label.
 boolean isMeta(int modifiers)
          Returns true if the modifier contains a META key.
 boolean isPasteAction(AWTEvent event, int row, int column)
          Returns true if the given event is mapped to a paste action.
 boolean isShift(int modifiers)
          Returns true if the modifier is a shift key.
protected  void loadPasteData(Vector cells)
          Pastes the given vector of cells into the current location.
 void performCopyAction()
          Executes a copy action using the system clipboard.
 void performPasteAction()
          Executes a paste action using the system clipboard.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

table

protected com.klg.jclass.table.JCTable table

SELECTING

protected boolean SELECTING
Constructor Detail

InputHandler

public InputHandler(com.klg.jclass.table.JCTable table)
Method Detail

getCellPosition

public void getCellPosition(int x,
                            int y,
                            com.klg.jclass.table.JCCellPosition cp)
Sets the given JCCellPosition with the cell found at the x,y coordinates. JCTableEnum.NOVALUE will be set for the row/column position if the coordinates don't correspond to a cell location.


isShift

public boolean isShift(int modifiers)
Returns true if the modifier is a shift key.


isControl

public boolean isControl(int modifiers)
Returns true if the modifier contains a control key.


isAlt

public boolean isAlt(int modifiers)
Returns true if the modifier contains an ALT key.


isMeta

public boolean isMeta(int modifiers)
Returns true if the modifier contains a META key.


isCell

public boolean isCell(int row,
                      int column)
Returns true if the row/column is a cell.


isLabel

public boolean isLabel(int row,
                       int column)
Returns true if the row/column is a label.


isCopyAction

public boolean isCopyAction(AWTEvent event,
                            int row,
                            int column)
Returns true if the given event is mapped to a copy action.


isPasteAction

public boolean isPasteAction(AWTEvent event,
                             int row,
                             int column)
Returns true if the given event is mapped to a paste action.


performCopyAction

public void performCopyAction()
Executes a copy action using the system clipboard.


performPasteAction

public void performPasteAction()
Executes a paste action using the system clipboard.


loadPasteData

protected void loadPasteData(Vector cells)
Pastes the given vector of cells into the current location. If no cells are selected, the cells are pasted starting at the current cell position for as many cells as required. If cells are selected, the pasted values will not extend outside of the selected region. If the vector of cells contains fewer cells than the current selection, not all cells will receive a new value.

All cells paste independently. As a result, individual values may be rejected by the datasource.


Copyright © 2004 Quest Software Inc..
All rights reserved.