JGraph X 0.15.0.3


com.mxgraph.swing.handler
Class mxRubberband

java.lang.Object
  extended by com.mxgraph.swing.handler.mxRubberband
All Implemented Interfaces:
MouseListener, MouseMotionListener, EventListener

public class mxRubberband
extends Object
implements MouseListener, MouseMotionListener


Field Summary
protected  Color borderColor
          Defines the border color for drawing the rubberband selection.
protected  Rectangle bounds
          Holds the current rubberband bounds.
protected  boolean enabled
          Specifies if the rubberband is enabled.
protected  Color fillColor
          Defines the color to be used for filling the rubberband selection.
protected  mxGraphComponent graphComponent
          Reference to the enclosing graph container.
protected  Point start
          Holds the point where the selection has started.
 
Constructor Summary
mxRubberband(mxGraphComponent graphComponent)
           
 
Method Summary
 boolean isEnabled()
           
 boolean isRubberbandTrigger(MouseEvent e)
           
 void mouseClicked(MouseEvent arg0)
           
 void mouseDragged(MouseEvent e)
           
 void mouseEntered(MouseEvent arg0)
           
 void mouseExited(MouseEvent arg0)
           
 void mouseMoved(MouseEvent arg0)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
 void paintRubberband(Graphics g)
           
 void reset()
           
 Object[] select(Rectangle rect, MouseEvent e)
           
 void setEnabled(boolean enabled)
           
 void start(Point point)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

borderColor

protected Color borderColor
Defines the border color for drawing the rubberband selection.


fillColor

protected Color fillColor
Defines the color to be used for filling the rubberband selection.


graphComponent

protected mxGraphComponent graphComponent
Reference to the enclosing graph container.


enabled

protected boolean enabled
Specifies if the rubberband is enabled.


bounds

protected Rectangle bounds
Holds the current rubberband bounds.


start

protected transient Point start
Holds the point where the selection has started.

Constructor Detail

mxRubberband

public mxRubberband(mxGraphComponent graphComponent)
Parameters:
graphComponent -
Method Detail

setEnabled

public void setEnabled(boolean enabled)

isEnabled

public boolean isEnabled()

isRubberbandTrigger

public boolean isRubberbandTrigger(MouseEvent e)

start

public void start(Point point)

reset

public void reset()

select

public Object[] select(Rectangle rect,
                       MouseEvent e)
Parameters:
rect -
e -

paintRubberband

public void paintRubberband(Graphics g)

mousePressed

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

mouseDragged

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

mouseReleased

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

mouseClicked

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

mouseEntered

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

mouseExited

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

mouseMoved

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

JGraph X 0.15.0.3


Copyright (c) 2008 Gaudenz Alder. All rights reserved.