com.jidesoft.pivot
Class FieldBoxInputListener
java.lang.Object
com.jidesoft.pivot.FieldBoxInputListener
- All Implemented Interfaces:
- ActionListener, KeyListener, MouseListener, MouseMotionListener, EventListener
public class FieldBoxInputListener
- extends Object
- implements MouseListener, MouseMotionListener, KeyListener, ActionListener
FieldBoxInputListener
is a listener added to FieldBox to handle the drag-n-drop, keystrokes and action.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FieldBoxInputListener
public FieldBoxInputListener(PivotTablePane pane)
mouseClicked
public void mouseClicked(MouseEvent e)
- Specified by:
mouseClicked
in interface MouseListener
mousePressed
public void mousePressed(MouseEvent e)
- Specified by:
mousePressed
in interface MouseListener
mouseReleased
public void mouseReleased(MouseEvent e)
- Specified by:
mouseReleased
in interface MouseListener
mouseEntered
public void mouseEntered(MouseEvent e)
- Specified by:
mouseEntered
in interface MouseListener
mouseExited
public void mouseExited(MouseEvent e)
- Specified by:
mouseExited
in interface MouseListener
mouseDragged
public void mouseDragged(MouseEvent e)
- Specified by:
mouseDragged
in interface MouseMotionListener
mouseMoved
public void mouseMoved(MouseEvent e)
- Specified by:
mouseMoved
in interface MouseMotionListener
keyTyped
public void keyTyped(KeyEvent e)
- Specified by:
keyTyped
in interface KeyListener
keyPressed
public void keyPressed(KeyEvent e)
- Specified by:
keyPressed
in interface KeyListener
keyReleased
public void keyReleased(KeyEvent e)
- Specified by:
keyReleased
in interface KeyListener
isDragging
public boolean isDragging()
isDropAllowed
protected boolean isDropAllowed(Component draggingComponent,
Rectangle dropArea,
int dropSide,
Container dropContainer)
- Calculate if you allow the customer to drop a FieldBox to the area in the container.
You can use this method to control the behavior of the mouse dragging. For example, you can just return false if
you don't want the customer to move any fields.
The default implementation of this method is just to return true. So it allows any dragging and drop behavior
provided by JIDE jars.
- Parameters:
draggingComponent
- the component being draggeddropArea
- the area to be drawn as dropped in indicationdropSide
- the drop sidedropContainer
- the container where the draggingComponent will be dropped into
- Returns:
- true if you allow the drop action. Otherwise false.
getImage
public BufferedImage getImage()
getShadow
public BufferedImage getShadow()
drawItem
public void drawItem(Graphics g)
actionPerformed
public void actionPerformed(ActionEvent e)
- Specified by:
actionPerformed
in interface ActionListener