Package gov.nih.mipav.view.dialogs
Class JDialogCaptureScreen.GlassPaneListener
java.lang.Object
java.awt.event.MouseAdapter
javax.swing.event.MouseInputAdapter
gov.nih.mipav.view.dialogs.JDialogCaptureScreen.GlassPaneListener
- All Implemented Interfaces:
MouseListener,MouseMotionListener,MouseWheelListener,EventListener,MouseInputListener
- Enclosing class:
JDialogCaptureScreen
Listener for the glass panes.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) JDialogCaptureScreen.MyGlassPanePane of glass this listener is tied to.(package private) intX and Y coordinates where drawing started.(package private) intX and Y coordinates where drawing started. -
Constructor Summary
ConstructorsConstructorDescriptionCreates new listener that captures mouse and mouse motion events and sends them to the glass pane to draw a partial or completed rectangle. -
Method Summary
Modifier and TypeMethodDescriptionvoidUnchanged.voidSets the width and height variables in the glass pane based upon how far the mouse has been dragged and repaints the glass pane.voidUnchanged.voidUnchanged.voidUnchanged.voidSets the x and y variables in the glass pane to indicate that we've begun drawing a rectangle.voidSets the width and height variables appropriately, and lets the glass pane know that we are done drawing the rectangle.Methods inherited from class java.awt.event.MouseAdapter
mouseWheelMoved
-
Field Details
-
glassPane
JDialogCaptureScreen.MyGlassPane glassPanePane of glass this listener is tied to. -
x
int xX and Y coordinates where drawing started. -
y
int yX and Y coordinates where drawing started.
-
-
Constructor Details
-
GlassPaneListener
Creates new listener that captures mouse and mouse motion events and sends them to the glass pane to draw a partial or completed rectangle.- Parameters:
glassPane- Glass pane tied to this listener.
-
-
Method Details
-
mouseClicked
Unchanged.- Specified by:
mouseClickedin interfaceMouseListener- Overrides:
mouseClickedin classMouseAdapter- Parameters:
e- DOCUMENT ME!
-
mouseDragged
Sets the width and height variables in the glass pane based upon how far the mouse has been dragged and repaints the glass pane.- Specified by:
mouseDraggedin interfaceMouseMotionListener- Overrides:
mouseDraggedin classMouseAdapter- Parameters:
e- Event that triggered this function.
-
mouseEntered
Unchanged.- Specified by:
mouseEnteredin interfaceMouseListener- Overrides:
mouseEnteredin classMouseAdapter- Parameters:
e- DOCUMENT ME!
-
mouseExited
Unchanged.- Specified by:
mouseExitedin interfaceMouseListener- Overrides:
mouseExitedin classMouseAdapter- Parameters:
e- DOCUMENT ME!
-
mouseMoved
Unchanged.- Specified by:
mouseMovedin interfaceMouseMotionListener- Overrides:
mouseMovedin classMouseAdapter- Parameters:
e- DOCUMENT ME!
-
mousePressed
Sets the x and y variables in the glass pane to indicate that we've begun drawing a rectangle. Resets all the glass panes first so only one has any drawing in it at one time.- Specified by:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin classMouseAdapter- Parameters:
e- Event that triggered this function.
-
mouseReleased
Sets the width and height variables appropriately, and lets the glass pane know that we are done drawing the rectangle.- Specified by:
mouseReleasedin interfaceMouseListener- Overrides:
mouseReleasedin classMouseAdapter- Parameters:
e- Event that triggered this function.
-