org.das2.graph.DasCanvasComponent

Super class providing base functionality for all canvas components such as DasAxis, DasPlot, and DasLabel.

DasCanvasComponent( )

constructs a DasCanvasComponent, creating the DasMouseInputAdapter for it and assigning a default name to it.


PROPERTIES_ACTION

action for entering the properties editor.


PROP_OPAQUEBACKGROUND


acceptContext

acceptContext( int x, int y ) → boolean

returns true if the component is suitable context for the point. For example, the operator right-clicks at the point, is this point a transparent region of the component, and accepting context would be confusing to the operator? This was first introduced to support the annotation component, which draws a compact background bubble around a message, which is typically smaller than its bounds, plus an arrow.

Parameters

x - the x location on the canvas, with (0,0) being the upper-left corner.
y - the y location on the canvas, with (0,0) being the upper-left corner.

Returns:

true if the component accepts the context at this point.

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


addMouseModule

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

Add the MouseModule to the list of MouseModules attached to the component via the DasMouseInputAdapter. MouseModules will appear the in the order that they are added.

Parameters

module - the mouse module to add

Returns:

void (returns nothing)

See Also:

org.das2.event.MouseModule


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


getActions

getActions( ) → Action

return a list of actions. This is used by the DasMouseInputAdapter.

Returns:

the actions this provides.

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


getActiveRegion

getActiveRegion( ) → Shape

returns the active region of the canvas component, which is not necessarily the bounds.

Returns:

the active region of the canvas component

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


getCanvas

getCanvas( ) → DasCanvas

get the DasCanvas which contains this DasCanvasComponent.

Returns:

the DasCanvas which contains this DasCanvasComponent.

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


getColumn

getColumn( ) → DasColumn

accessor for the DasColumn used for positioning the component.

Returns:

DasColumn used for positioning the component.

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


getDasMouseInputAdapter

getDasMouseInputAdapter( ) → DasMouseInputAdapter

Get the DasMouseInputAdapter, which handles mouse input for the component.

Returns:

the dasMouseInputAdapter.

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


getDasName

getDasName( ) → String

Get the String identifier for the component which identifies the component within the application. This name should be consistent between sessions of an application, where applicable, for persistent state support.

Returns:

the name of the component.

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


getEmSize

getEmSize( ) → double

convenient method intended to encourage use of em's. returns the em size for the canvas. We define the em size as the height of the component's font.

Returns:

the height of the component's font.

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


getFont

getFont( ) → Font

return the font used to paint the component.

Returns:

the font.

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


getLineThicknessDouble

getLineThicknessDouble( String lineThickness ) → double

return the thickness of the lines (in points or pixels), as specified in the lineThickness parameter. Example inputs include "", "1px", and ".1em".

Parameters

lineThickness - a String

Returns:

a double

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


getRow

getRow( ) → DasRow

accessor for the DasRow used for positioning the component.

Returns:

DasRow used for positioning the component.

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


isOpaqueBackground

isOpaqueBackground( ) → boolean

Returns:

boolean

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


removeMouseModule

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

Remove the MouseModule from the list of MouseModules attached to the component via the DasMouseInputAdapter.

Parameters

module - the mouse module to remove

Returns:

void (returns nothing)

See Also:

org.das2.event.MouseModule


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


resize

resize( ) → void

Called by the DasCanvas layout manager to request this component to set its bounds.

Returns:

void (returns nothing)

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


setColumn

setColumn( org.das2.graph.DasColumn c ) → void

set the DasColumn for positioning the component horizontally. The current column is disconnected, and a propertyChange is fired.

Parameters

c - the DasColumn

Returns:

void (returns nothing)

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


setDasName

setDasName( String name ) → void

Set the String identifier for the component which identifies the component within the application. This name should be consistent between sessions of an application, where applicable, for persistent state support. For example, "timeAxis1" or "theTimeAxis"

Parameters

name - unique String identifying the component within the application.

Returns:

void (returns nothing)

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


setOpaqueBackground

setOpaqueBackground( boolean opaqueBackground ) → void

Parameters

opaqueBackground - a boolean

Returns:

void (returns nothing)

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


setRow

setRow( org.das2.graph.DasRow r ) → void

set the DasRow for positioning the component vertically. The current row is disconnected, and a propertyChange is fired.

Parameters

r - the DasRow

Returns:

void (returns nothing)

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


showProperties

showProperties( ) → void

popup the PropertyEditor for editing the state of this component.

Returns:

void (returns nothing)

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


toString

toString( ) → String

Returns:

a concise String representation of the object.

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


update

update( ) → void

posts an update event on the SystemEventQueue, indicating that work needs to be done to get the get the component back into a valid state.

Returns:

void (returns nothing)

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