Class ButtonBase
Object
|
+--WidgetBase
|
+--ButtonBase
-
Direct Known Subclasses:
-
WfsGetFeature, ZoomOut, InsertFeature, Graticule, DragPan, Reset, GetFeatureInfo, Forward, ZoomIn, EditButtonBase, SetAoi, DeleteFeature, Button, Save, Back
- class
ButtonBase
- extends WidgetBase
Defined in ButtonBase.js
Author: Mike Adair mike.adairATccrs.nrcan.gc.ca
Constructor Summary |
ButtonBase
(widgetNode, model)
Abstract base button object that all Buttons extend.
|
Method Summary |
void
|
attachToOL(objRef,refreshId)
Attaches the control for this button to OpenLayers
and add it to the buttonBar.
|
void
|
buttonInit(objRef)
Set the target context for the button, initialise the
buttonBars array in the context document and add a
listener to the target model for adding controls
to the OL map as soon as the map is initialized.
|
void
|
doAction()
Override this in buttons which inherit from this object to carry out the action.
|
void
|
doSelect(objRef, selected)
Method overriden by subclasses
|
Object
|
getButtonClass(objRef, state)
Gets the css classname for this button.
|
void
|
select()
Select this button.
|
active
Object active
buttonBarGroup
Object buttonBarGroup
buttonType
Object buttonType
control
Object control
OpenLayers control for this button.
This will be filled with the instance of the control
by the attachToOL method.
htmlTagId
Object htmlTagId
panelHtmlTagId
Object panelHtmlTagId
ButtonBase
ButtonBase(widgetNode, model)
Abstract base button object that all Buttons extend.
A Button is a widget which renders an image and an optional second image
for the enabled state.
Parameters:
widgetNode
- The tool node from the Config XML file.
model
- The parent model object (optional).
Author: Mike Adair mike.adairATccrs.nrcan.gc.ca
attachToOL
void attachToOL(objRef,refreshId)
Attaches the control for this button to OpenLayers
and add it to the buttonBar. When this method is called,
everything of the OL map is available.
Parameters:
objRef
- Reference to this object.
buttonInit
void buttonInit(objRef)
Set the target context for the button, initialise the
buttonBars array in the context document and add a
listener to the target model for adding controls
to the OL map as soon as the map is initialized.
Parameters:
objRef
- Reference to this object.
doAction
void doAction()
Override this in buttons which inherit from this object to carry out the action.
This is the function that will be called either when the button is selected
via the select() method or on a mouseup event if there is an associated
mouseHandler property in config.
doSelect
void doSelect(objRef, selected)
Method overriden by subclasses
Parameters:
objRef
- Reference to this object.
selected
- True when selected, false when deselected.
getButtonClass
Object getButtonClass(objRef, state)
Gets the css classname for this button. We use this
to define the button styles.
Parameters:
objRef
- Reference to this object.
state
- 'Active' or 'Inactive' (case sensitive!)
select
void select()
Select this button. Enables and disables associated tools,
then the control.trigger()/activate() methods make OL call
the doSelect method defined in derived classes.
Documentation generated by
JSDoc on Tue Aug 21 08:12:28 2007