org.das2.event.DasMouseInputAdapter

DasMouseInputAdapter delegates mouse and key events to mouse modules, which do something with the events. Also, mouse events are promoted to MouseDragEvents which conveniently store information about the entire drag gesture. The base class of MouseModule has do-nothing stubs for KeyListener, MouseListener, MouseMotionListener, and MouseWheelListener, which can be implemented if the module wants to do something with these events. Also MouseDragEvents will be sent to the module as its DragRenderer has requested: after the mouse release, during the drag, or when keys are pressed. The module will first receive the low-level events before receiving the MouseDragEvents.


NULL_FEEDBACK


addMenu

addMenu( String label ) → JMenu

return a menu with font to match LAF.

Parameters

label -

Returns:

javax.swing.JMenu

search for examples view on GitHub view source


addMenuItem

addMenuItem( java.awt.Component b ) → void

Returns:

void (returns nothing)

search for examples view on GitHub view source


addMouseModule

addMouseModule( org.das2.event.MouseModule module ) → void

add a mouse module to the list of available modules. If a module with the same label exists already, it will be replaced.

Parameters

module - the module

Returns:

void (returns nothing)

search for examples view on GitHub view source


getActive

getActive( ) → MouseModule

return the active mouse module, for scripting. Active means the button has been pressed, etc.

Returns:

null or the active module.

search for examples view on GitHub view source


getFeedback

getFeedback( ) → Feedback

get the feedback object, so its message can be set.

Returns:

the feedback object.

search for examples view on GitHub view source


getKeyAdapter

getKeyAdapter( ) → KeyAdapter

Returns:

java.awt.event.KeyAdapter

search for examples view on GitHub view source


getModuleByLabel

getModuleByLabel( String label ) → MouseModule

remove the mouse module with the label.

Parameters

label - the label (case-sensitive)

Returns:

null if not found, or the module.

search for examples view on GitHub view source


getMouseModule

getMouseModule( int i ) → MouseModule

Returns:

org.das2.event.MouseModule

search for examples view on GitHub view source


getMouseModules

getMouseModules( ) → MouseModule

Returns:

org.das2.event.MouseModule[]

search for examples view on GitHub view source


getMousePressPosition

getMousePressPosition( ) → Point

returns the position of the last mouse press. This is a hack so that the mouse position can be obtained to get the context of the press. The result point is in the parent's coordinate system.

Returns:

the position of the mouse press, or null if a press has not been received.

See Also:

getMousePressPositionOnCanvas()


search for examples view on GitHub view source


getMousePressPositionOnCanvas

getMousePressPositionOnCanvas( ) → Point

return the position of the last mouse press, in the canvas coordinate frame.

Returns:

the position of the mouse press in the canvas coordinate frame, or null if a press has not been received.

See Also:

getMousePressPosition()


search for examples view on GitHub view source


getNumInserted

getNumInserted( ) → int

return number of elements for diagnostic purposes.

Returns:

int

search for examples view on GitHub view source


getPinned

getPinned( ) → boolean

Returns:

boolean

search for examples view on GitHub view source


getPrimaryModule

getPrimaryModule( ) → MouseModule

Returns:

org.das2.event.MouseModule

search for examples view on GitHub view source


getPrimaryModuleByLabel

getPrimaryModuleByLabel( ) → String

Returns:

java.lang.String

search for examples view on GitHub view source


getPrimaryPopupMenu

getPrimaryPopupMenu( ) → JPopupMenu

added so ColumnColumnConnector could delegate to DasPlot's adapter.

Returns:

javax.swing.JPopupMenu

search for examples view on GitHub view source


getSecondaryModule

getSecondaryModule( ) → MouseModule

Returns:

org.das2.event.MouseModule

search for examples view on GitHub view source


getSecondaryModuleByLabel

getSecondaryModuleByLabel( ) → String

Returns:

java.lang.String

search for examples view on GitHub view source


getSecondaryPopupMenu

getSecondaryPopupMenu( ) → JPopupMenu

access popup menu so that synchronized blocks are minimized.

Returns:

javax.swing.JPopupMenu

search for examples view on GitHub view source


isHoverHighlite

isHoverHighlite( ) → boolean

Returns:

boolean

search for examples view on GitHub view source


mouseDragged

mouseDragged( java.awt.event.MouseEvent e ) → void

Returns:

void (returns nothing)

search for examples view on GitHub view source


mouseEntered

mouseEntered( java.awt.event.MouseEvent e ) → void

Returns:

void (returns nothing)

search for examples view on GitHub view source


mouseExited

mouseExited( java.awt.event.MouseEvent e ) → void

Returns:

void (returns nothing)

search for examples view on GitHub view source


mouseMoved

mouseMoved( java.awt.event.MouseEvent e ) → void

Returns:

void (returns nothing)

search for examples view on GitHub view source


mousePressed

mousePressed( java.awt.event.MouseEvent e ) → void

Returns:

void (returns nothing)

search for examples view on GitHub view source


mouseWheelMoved

mouseWheelMoved( java.awt.event.MouseWheelEvent e ) → void

the mouse wheel was turned so many units. Delegate this to the primary module, so that if it is set to "ZoomX" then the mousewheel will be in just the X direction.

Parameters

e - the mouse wheel event

Returns:

void (returns nothing)

search for examples view on GitHub view source


releaseAll

releaseAll( ) → void

remove all references to mouse modules

Returns:

void (returns nothing)

search for examples view on GitHub view source


removeMenuItem

removeMenuItem( String label ) → void

hack to provide way to get rid of "Dump Data".

Parameters

label - string to search for.

Returns:

void (returns nothing)

search for examples view on GitHub view source


removeMouseModule

removeMouseModule( org.das2.event.MouseModule module ) → void

Returns:

void (returns nothing)

search for examples view on GitHub view source


replaceMenuItem

replaceMenuItem( String label, java.awt.Component b ) → void

provide a way for an alternate implementation to be added at the position occupied by "label".

Parameters

label - the parameter to find, e.h.
b -

Returns:

void (returns nothing)

search for examples view on GitHub view source


replaceMouseModule

replaceMouseModule( org.das2.event.MouseModule oldModule, org.das2.event.MouseModule newModule ) → void

Returns:

void (returns nothing)

search for examples view on GitHub view source


resetName

resetName( String name ) → void

set the name of the menus to help with debugging

Parameters

name -

Returns:

void (returns nothing)

search for examples view on GitHub view source


setFeedback

setFeedback( org.das2.event.DasMouseInputAdapter.Feedback f ) → void

Returns:

void (returns nothing)

search for examples view on GitHub view source


setHoverHighlite

setHoverHighlite( boolean value ) → void

glow the outline of the mouse area, for development.

Parameters

value -

Returns:

void (returns nothing)

search for examples view on GitHub view source


setMenuLabel

setMenuLabel( String id ) → void

Returns:

void (returns nothing)

search for examples view on GitHub view source


setMouseModule

setMouseModule( int i, org.das2.event.MouseModule mouseModule ) → void

//TODO: check this Setter for property mouseModules.

Parameters

i - the index
mouseModule - the new mouseModule to use.

Returns:

void (returns nothing)

search for examples view on GitHub view source


setMousePressPositionOnCanvas

setMousePressPositionOnCanvas( java.awt.Point p ) → void

set the mouse press position, so that it is a bean property and one DasMouseInputAdapter can delegate to another.

Parameters

p -

Returns:

void (returns nothing)

search for examples view on GitHub view source


setPinned

setPinned( boolean b ) → void

Returns:

void (returns nothing)

search for examples view on GitHub view source


setPrimaryModule

setPrimaryModule( org.das2.event.MouseModule module ) → void

set the primary module, the module receiving left-button events, to the module provided. If the module is not already loaded, implicitly addMouseModule is called.

Parameters

module - the module

Returns:

void (returns nothing)

search for examples view on GitHub view source


setPrimaryModuleByLabel

setPrimaryModuleByLabel( String label ) → void

Returns:

void (returns nothing)

search for examples view on GitHub view source


setSecondaryModule

setSecondaryModule( org.das2.event.MouseModule module ) → void

set the secondary module, the module receiving middle-button events, to the module provided. If the module is not already loaded, implicitly addMouseModule is called.

Parameters

module -

Returns:

void (returns nothing)

search for examples view on GitHub view source


setSecondaryModuleByLabel

setSecondaryModuleByLabel( String label ) → void

Returns:

void (returns nothing)

search for examples view on GitHub view source