com.imagero.gui.flowin.util
Class ResizeHandler

java.lang.Object
  extended byjavax.swing.event.MouseInputAdapter
      extended bycom.imagero.gui.flowin.util.ResizeHandler
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.MouseInputListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener

public class ResizeHandler
extends javax.swing.event.MouseInputAdapter

ResizeHandler. Easy adding resizing functionality to custom components. "Snap to grid" is also supported by this handler.


Field Summary
static int DEFAULT
           
static int E_RESIZE
           
static int N_RESIZE
           
static int NE_RESIZE
           
static int NW_RESIZE
           
static int S_RESIZE
           
static int SE_RESIZE
           
static int SW_RESIZE
           
static int UNDEFINED
           
static int W_RESIZE
           
 
Constructor Summary
ResizeHandler(java.awt.Container comp)
          Easy to use resize file.
 
Method Summary
protected  void createCursors(java.awt.Cursor[] cursors)
           
 GridChecker getChecker()
           
 int getCornerSize()
           
 void mouseDragged(java.awt.event.MouseEvent e)
          Invoked when a mouse button is pressed on a component and then dragged.
 void mouseExited(java.awt.event.MouseEvent e)
          Invoked when the mouse exits a component.
 void mouseMoved(java.awt.event.MouseEvent e)
          Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.
 void mousePressed(java.awt.event.MouseEvent e)
          Invoked when a mouse button has been pressed on a component.
 void mouseReleased(java.awt.event.MouseEvent e)
          Invoked when a mouse button has been released on a component.
 void setChecker(GridChecker checker)
           
 void setCornerSize(int cornerSize)
           
protected  void setCursor(int cursor)
           
 
Methods inherited from class javax.swing.event.MouseInputAdapter
mouseClicked, mouseEntered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final int DEFAULT
See Also:
Constant Field Values

E_RESIZE

public static final int E_RESIZE
See Also:
Constant Field Values

N_RESIZE

public static final int N_RESIZE
See Also:
Constant Field Values

NE_RESIZE

public static final int NE_RESIZE
See Also:
Constant Field Values

NW_RESIZE

public static final int NW_RESIZE
See Also:
Constant Field Values

S_RESIZE

public static final int S_RESIZE
See Also:
Constant Field Values

SE_RESIZE

public static final int SE_RESIZE
See Also:
Constant Field Values

SW_RESIZE

public static final int SW_RESIZE
See Also:
Constant Field Values

UNDEFINED

public static final int UNDEFINED
See Also:
Constant Field Values

W_RESIZE

public static final int W_RESIZE
See Also:
Constant Field Values
Constructor Detail

ResizeHandler

public ResizeHandler(java.awt.Container comp)
Easy to use resize file. Custom icons and snap to grid are supported. getMinimumSize/getMaximumSize are taken into account

Parameters:
comp -
Method Detail

createCursors

protected void createCursors(java.awt.Cursor[] cursors)

getChecker

public GridChecker getChecker()

getCornerSize

public int getCornerSize()

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Description copied from interface: java.awt.event.MouseMotionListener
Invoked when a mouse button is pressed on a component and then dragged. MOUSE_DRAGGED events will continue to be delivered to the component where the drag originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).

Due to platform-dependent Drag&Drop implementations, MOUSE_DRAGGED events may not be delivered during a native Drag&Drop operation.


mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Description copied from interface: java.awt.event.MouseListener
Invoked when the mouse exits a component.


mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Description copied from interface: java.awt.event.MouseMotionListener
Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.


mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Description copied from interface: java.awt.event.MouseListener
Invoked when a mouse button has been pressed on a component.


mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Description copied from interface: java.awt.event.MouseListener
Invoked when a mouse button has been released on a component.


setChecker

public void setChecker(GridChecker checker)

setCornerSize

public void setCornerSize(int cornerSize)

setCursor

protected void setCursor(int cursor)