DESY ACOP Beans Home

com.cosylab.gui.components
Class DialKnob.MouseHandler

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by com.cosylab.gui.components.DialKnob.MouseHandler
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener
Enclosing class:
DialKnob

protected class DialKnob.MouseHandler
extends java.awt.event.MouseAdapter
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener

Utiliy class that handles user mouse actions on the Dial knob.

Author:
Nejc Kosnik

Constructor Summary
protected DialKnob.MouseHandler()
           
 
Method Summary
 void inhibit(boolean newInhibit)
          Method which enables/disables setting of value via mouse drag.
 void mouseDragged(java.awt.event.MouseEvent arg0)
          Does the value setting.
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent arg0)
          Starts the value setting.
 void mouseReleased(java.awt.event.MouseEvent arg0)
          Finishes the value setting.
 
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited, mouseWheelMoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.awt.event.MouseListener
mouseClicked, mouseEntered, mouseExited
 

Constructor Detail

DialKnob.MouseHandler

protected DialKnob.MouseHandler()
Method Detail

inhibit

public void inhibit(boolean newInhibit)
Method which enables/disables setting of value via mouse drag. Usually called when knob is to small to be painted and setting value must also be disabled.

Parameters:
newInhibit - true to enable and false to disable user setting

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent arg0)
Does the value setting.

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
Overrides:
mouseDragged in class java.awt.event.MouseAdapter
See Also:
MouseMotionListener.mouseDragged(java.awt.event.MouseEvent)

mousePressed

public void mousePressed(java.awt.event.MouseEvent arg0)
Starts the value setting.

Specified by:
mousePressed in interface java.awt.event.MouseListener
Overrides:
mousePressed in class java.awt.event.MouseAdapter
See Also:
MouseListener.mousePressed(java.awt.event.MouseEvent)

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent arg0)
Finishes the value setting.

Specified by:
mouseReleased in interface java.awt.event.MouseListener
Overrides:
mouseReleased in class java.awt.event.MouseAdapter
See Also:
MouseListener.mouseReleased(java.awt.event.MouseEvent)

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
Overrides:
mouseMoved in class java.awt.event.MouseAdapter


Copyright © 2010. All Rights Reserved.