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.

DasMouseInputAdapter( org.das2.graph.DasCanvasComponent parent )

Create a DasMouseInputAdapter to handle mouse events for the component.


NULL_FEEDBACK


addMenu

addMenu( String label ) → JMenu

return a menu with font to match LAF.

Parameters

label - a String

Returns:

a javax.swing.JMenu

[search for examples] [view on GitHub] [view on old javadoc] [view source]


addMenuItem

addMenuItem( java.awt.Component b ) → void

Parameters

b - a Component

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [view source]


cancel

cancel( ) → void

allow clients to cancel, to take the same action as if cancel were pressed.

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [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 on old javadoc] [view source]


getKeyAdapter

getKeyAdapter( ) → KeyAdapter

creates a new KeyAdapter, and should probably be private.

Returns:

a java.awt.event.KeyAdapter

[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [view source]


getMouseModule

getMouseModule( int i ) → MouseModule

Parameters

i - an int

Returns:

org.das2.event.MouseModule

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getMouseModules

getMouseModules( ) → MouseModule

Returns:

org.das2.event.MouseModule[]

[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [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 on old javadoc] [view source]


getNumInserted

getNumInserted( ) → int

return number of elements for diagnostic purposes.

Returns:

an int

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getPinned

getPinned( ) → boolean

Returns:

boolean

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getPrimaryModule

getPrimaryModule( ) → MouseModule

Returns:

org.das2.event.MouseModule

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getPrimaryModuleByLabel

getPrimaryModuleByLabel( ) → String

Returns:

java.lang.String

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getPrimaryPopupMenu

getPrimaryPopupMenu( ) → JPopupMenu

added so ColumnColumnConnector could delegate to DasPlot's adapter.

Returns:

a javax.swing.JPopupMenu

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getSecondaryModule

getSecondaryModule( ) → MouseModule

Returns:

org.das2.event.MouseModule

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getSecondaryModuleByLabel

getSecondaryModuleByLabel( ) → String

Returns:

java.lang.String

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getSecondaryPopupMenu

getSecondaryPopupMenu( ) → JPopupMenu

access popup menu so that synchronized blocks are minimized.

Returns:

a javax.swing.JPopupMenu

[search for examples] [view on GitHub] [view on old javadoc] [view source]


isHoverHighlite

isHoverHighlite( ) → boolean

Returns:

boolean

[search for examples] [view on GitHub] [view on old javadoc] [view source]


mouseDragged

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

Parameters

e - a MouseEvent

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


mouseEntered

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

Parameters

e - a MouseEvent

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


mouseExited

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

Parameters

e - a MouseEvent

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


mouseMoved

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

Parameters

e - a MouseEvent

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


mousePressed

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

Parameters

e - a MouseEvent

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


mouseReleased

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

Parameters

e - a MouseEvent

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [view source]


paint

paint( java.awt.Graphics g1 ) → void

Parameters

g1 - a Graphics

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


releaseAll

releaseAll( ) → void

remove all references to mouse modules

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [view source]


removeMouseModule

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

Parameters

module - a MouseModule

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [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 - a Component

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


replaceMouseModule

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

Parameters

oldModule - a MouseModule
newModule - a MouseModule

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


resetName

resetName( String name ) → void

set the name of the menus to help with debugging

Parameters

name - a String

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


setFeedback

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

Parameters

f - a DasMouseInputAdapter.Feedback

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


setHoverHighlite

setHoverHighlite( boolean value ) → void

glow the outline of the mouse area, for development.

Parameters

value - a boolean

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


setMenuLabel

setMenuLabel( String id ) → void

Parameters

id - a String

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [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 - a Point

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


setPinned

setPinned( boolean b ) → void

Parameters

b - a boolean

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [view source]


setPrimaryModuleByLabel

setPrimaryModuleByLabel( String label ) → void

Parameters

label - a String

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [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 - a MouseModule

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


setSecondaryModuleByLabel

setSecondaryModuleByLabel( String label ) → void

Parameters

label - a String

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]