oscar.Gui.ClickableLabel

This ClickableLabel widget provides a label that, when clicked, fires a labelClicked event with the object reference.

Inherits from:oscar.Gui
Summary
oscar.Gui.ClickableLabelThis ClickableLabel widget provides a label that, when clicked, fires a labelClicked event with the object reference.
Properties
styles
Constants
EVENT_TYPES {Array(String)} Supported application event types.Register a listener for a particular event with the following syntax: > clickablelabel.events.register(type, obj, listener);
Properties
events {<OpenLayers.Events>} An events object that handlesall events on the label.
containerReference to the label container.
styleblock or inline
ref Holds a reference to an object.
Constructor
oscar.Gui.ClickableLabel
Functions
setLabelTextSets the label text and triggers the labelTextChanged event.
appendToAppends the the container to the element provided.
toggleReturns true or false if the label has been toggled
applyClassTakes a single CSS class or an array of CSS classes and adds them to the container.
removeClassTakes a single CSS class or an array of CSS classes and removes them from the container.
resetResets the counter to 0
setTooltip
Constants
CLASS_NAME - oscar.Gui.ClickableLabel

Properties

styles

styles.BLOCKCreates a <div> container
styles.INLINECreates a <span> container

Constants

EVENT_TYPES {Array(String)} Supported application event types.

Register a listener for a particular event with the following syntax: > clickablelabel.events.register(type, obj, listener);

Supported ClickableLabel event types

labelClickedTriggered when the label is clicked.  Passes the object
reference to the listeners. labelTextChangedTriggered when the label text is changed.

Properties

events {<OpenLayers.Events>} An events object that handles

all events on the label.

container

Reference to the label container.

style

block or inline

ref Holds a reference to an object.

Constructor

oscar.Gui.ClickableLabel

Parameters: labelTexttext of the label. options - {Object} An optional object whose properties will be set on this instance.

Functions

setLabelText

setLabelText : function(labelText)

Sets the label text and triggers the labelTextChanged event.

appendTo

appendTo : function(elem)

Appends the the container to the element provided.

toggle

toggle : function()

Returns true or false if the label has been toggled

applyClass

applyClass : function(cls)

Takes a single CSS class or an array of CSS classes and adds them to the container.

Parameters: clsthe CSS class or array of CSS classes should be applied.

removeClass

removeClass : function(cls)

Takes a single CSS class or an array of CSS classes and removes them from the container.

Parameters: clsthe CSS class for array of CSS classes should be removed.

reset

reset : function()

Resets the counter to 0

setTooltip

setTooltip : function(tooltipText)

Parameters

tooltipText<String> Adds a tooltip to the label element

Constants

CLASS_NAME - oscar.Gui.ClickableLabel

setLabelText : function(labelText)
Sets the label text and triggers the labelTextChanged event.
appendTo : function(elem)
Appends the the container to the element provided.
toggle : function()
Returns true or false if the label has been toggled
applyClass : function(cls)
Takes a single CSS class or an array of CSS classes and adds them to the container.
removeClass : function(cls)
Takes a single CSS class or an array of CSS classes and removes them from the container.
reset : function()
Resets the counter to 0
setTooltip : function(tooltipText)
The Oscar GUI package offers a set of utilities for building richly interactive web applications.This oscar.Gui object defines the Oscar GUI namespace.