org.noos.xing.mydoggy.plaf.ui.cmp.event
Class FloatingResizeMouseInputHandler

java.lang.Object
  extended by org.noos.xing.mydoggy.plaf.ui.cmp.event.FloatingResizeMouseInputHandler
All Implemented Interfaces:
MouseListener, MouseMotionListener, EventListener, MouseInputListener

public class FloatingResizeMouseInputHandler
extends Object
implements MouseInputListener

Author:
Angelo De Caro (angelo.decaro@gmail.com)

Field Summary
protected  int dragCursor
           
protected  int dragHeight
           
protected  int dragOffsetX
           
protected  int dragOffsetY
           
protected  int dragWidth
           
protected  Component floatingContainer
           
protected  boolean isWindow
           
protected  Cursor lastCursor
           
protected  Dimension minimumSize
           
protected  boolean resizable
           
 
Constructor Summary
FloatingResizeMouseInputHandler(Component floatingContainer)
           
 
Method Summary
protected  void adjust(Rectangle bounds, Dimension min, int deltaX, int deltaY, int deltaWidth, int deltaHeight)
           
protected  int calculateCorner(Component c, int x, int y)
           
protected  int calculatePosition(int spot, int width)
           
protected  int getCursor(int corner)
           
 Component getFloatingContainer()
           
 Dimension getMinimumSize()
           
 boolean isResizable()
           
protected  boolean isResizeSuppressed()
           
 void mouseClicked(MouseEvent ev)
           
 void mouseDragged(MouseEvent ev)
           
 void mouseEntered(MouseEvent ev)
           
 void mouseExited(MouseEvent ev)
           
 void mouseMoved(MouseEvent ev)
           
 void mousePressed(MouseEvent ev)
           
 void mouseReleased(MouseEvent ev)
           
 void setFloatingContainer(Component floatingContainer)
           
 void setMinimumSize(Dimension minimumSize)
           
 void setResizable(boolean resizable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lastCursor

protected Cursor lastCursor

dragCursor

protected int dragCursor

dragOffsetX

protected int dragOffsetX

dragOffsetY

protected int dragOffsetY

dragWidth

protected int dragWidth

dragHeight

protected int dragHeight

floatingContainer

protected Component floatingContainer

resizable

protected boolean resizable

isWindow

protected boolean isWindow

minimumSize

protected Dimension minimumSize
Constructor Detail

FloatingResizeMouseInputHandler

public FloatingResizeMouseInputHandler(Component floatingContainer)
Method Detail

mousePressed

public void mousePressed(MouseEvent ev)
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent ev)
Specified by:
mouseReleased in interface MouseListener

mouseMoved

public void mouseMoved(MouseEvent ev)
Specified by:
mouseMoved in interface MouseMotionListener

mouseDragged

public void mouseDragged(MouseEvent ev)
Specified by:
mouseDragged in interface MouseMotionListener

mouseEntered

public void mouseEntered(MouseEvent ev)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent ev)
Specified by:
mouseExited in interface MouseListener

mouseClicked

public void mouseClicked(MouseEvent ev)
Specified by:
mouseClicked in interface MouseListener

getMinimumSize

public Dimension getMinimumSize()

setMinimumSize

public void setMinimumSize(Dimension minimumSize)

getFloatingContainer

public Component getFloatingContainer()

setFloatingContainer

public void setFloatingContainer(Component floatingContainer)

isResizable

public boolean isResizable()

setResizable

public void setResizable(boolean resizable)

isResizeSuppressed

protected boolean isResizeSuppressed()

adjust

protected void adjust(Rectangle bounds,
                      Dimension min,
                      int deltaX,
                      int deltaY,
                      int deltaWidth,
                      int deltaHeight)

calculateCorner

protected int calculateCorner(Component c,
                              int x,
                              int y)

getCursor

protected int getCursor(int corner)

calculatePosition

protected int calculatePosition(int spot,
                                int width)


Copyright © 2012. All Rights Reserved.