JIDE 3.5.15

com.jidesoft.pivot
Class FieldBoxInputListener

java.lang.Object
  extended by 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.


Constructor Summary
FieldBoxInputListener(PivotTablePane pane)
           
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 void drawItem(Graphics g)
           
 BufferedImage getImage()
           
 BufferedImage getShadow()
           
 boolean isDragging()
           
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.
 void keyPressed(KeyEvent e)
           
 void keyReleased(KeyEvent e)
           
 void keyTyped(KeyEvent e)
           
 void mouseClicked(MouseEvent e)
           
 void mouseDragged(MouseEvent e)
           
 void mouseEntered(MouseEvent e)
           
 void mouseExited(MouseEvent e)
           
 void mouseMoved(MouseEvent e)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldBoxInputListener

public FieldBoxInputListener(PivotTablePane pane)
Method Detail

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 dragged
dropArea - the area to be drawn as dropped in indication
dropSide - the drop side
dropContainer - 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

JIDE 3.5.15