OracleJavaScript API Reference for Oracle ADF Faces

 

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

oracle.adfinternal.view.js.laf.dhtml.rich
Class AdfDhtmlButtonPeer

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adf.view.js.base.AdfUIPeer
               |
               +--oracle.adf.view.js.laf.rich.AdfRichUIPeer
                     |
                     +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlButtonPeer

public class AdfDhtmlButtonPeer
extends AdfRichUIPeer
Peer Implementation for button



Field Summary

private static Object
_AFR_GROUPID
private static Object
_BUSY
protected Object
ComponentTextChanged
Handle change to the text property.
private static Object
_DEPRESSED_STYLE_CLASS
private static Object
_POPUP_CONTAINER
private static Object
_POPUP_CONTENT_ID
private static Object
_POPUP_CONTEXT_AREA
private static Object
_POPUP_ELEMENT
private static Object
_POPUP_ID
private static Object
_SELECTED_STYLE_CLASS
private static Object
_SUB_ID_MAP
button component publishes the following sub ids [External Subid --> Internal Client SubId]:- 1.


Fields inherited from oracle.adf.view.js.laf.rich.AdfRichUIPeer

addComponentPropertyChanges, addComponentPropertyGetters, BUSY_STYLECLASS, CreateSubId, DISABLED_STYLECLASS, DRAG_READY_STYLECLASS, DRAG_SOURCE_STYLECLASS, DROP_TARGET_STYLECLASS, FOCUS_TARGET_STYLECLASS, HOVER_TARGET_STYLECLASS, READONLY_STYLECLASS, SELECTED_STYLECLASS


Fields inherited from oracle.adf.view.js.base.AdfObject

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfDhtmlButtonPeer()
Peer Implementation for button


Method Summary

protected Object
BindToComponent(AdfUIComponent component, HTMLElement domElement)
Update any state necessary to bind to the current DOM component.
protected Object
ComponentDisabledChanged(AdfUIComponent component, HTMLElement domElement, boolean newValue, boolean oldValue)
Handle change to the disabled property.
protected Object
ComponentSelectedChanged(AdfUIComponent component, HTMLElement domElement, boolean newValue, boolean oldValue)
Handle change to the selected property.
protected Object
ComponentShortDescChanged(AdfUIComponent component, HTMLElement domElement, string newValue, string oldValue)
Handle change to the shortDesc property.
private Object
_displayDefaultIcon(AdfUIComponent component)
Display the default icon
private Object
_displayDisabledIcon(AdfUIComponent component)
Display the disabled icon
private Object
_displayIcon(AdfUIComponent component, string icon)
Display the provided icon
private Object
_displayMouseDownIcon(AdfUIComponent component)
Display the mousedown icon
private Object
_displayMouseOverIcon(AdfUIComponent component)
Display the mouseover icon
private Object
_executeAction()
Execute Action event for button.
private Object
_executeDestination(AdfComponentEvent componentEvent)
Execute destination for button.
protected Object
GetComponentText(Object component, Object domElement)
Optimized getter for text property
private Object
_getGroupId(HTMLElement domElement)
Get the groupId for the specified domElement.
private HTMLElement
_getIconElement(AdfUIComponent component)
Get the icon element
protected Object
GetInlineEditor(Object event)
Given the component this peer is bound to and the optional DOM event to start editing, return the AdfRichInlineEditor for this component at the event location, if any.
private string
_getPopupId()
If available, returns the popup's id.
protected Object
GetSubIdDomElement(Object subElementId)
Returns the DOM element identified by the passed in subId.
protected Object
HandleComponentClick(AdfComponentEvent componentEvent)
Handle a click on the button
protected Object
HandleComponentKeyDown(AdfComponentEvent componentEvent)
Handles keydown event to allow the popup facet popup to open by keyboard
protected Object
HandleComponentMouseDown(AdfComponentEvent componentEvent)
Handles the mousedown either on the button or its dropdown, and adjusts the mousedown state accordingly.
protected Object
HandleComponentMouseOut(AdfComponentEvent componentEvent)
On mouseout, the default icon is displayed.
protected Object
HandleComponentMouseOver(AdfComponentEvent componentEvent)
On mouseover, the mouseover icon is displayed.
protected Object
HandleComponentMouseUp(AdfComponentEvent componentEvent)
On mouse up, the mouseover icon is displayed.
private Object
_handleTypeChange(AdfUIComponent component)
Handle type changes on button click.
protected static Object
InitSubclass()
Init button peer.
public Object
isBusy()
Overridden to return the busy state of the component.
private Object
_isDestinationButton()
Returns true if this is a destination type button
private boolean
_isEventInRootElement(AdfComponentEvent componentEvent)
Checks if the event target is within the root dom element.
private Object
_isInPopupSelector(AdfComponentEvent componentEvent)
Sees if the event is in the popup target.
private Object
_openPopupMenu(string popupId, boolean autoFocus)
Opens the popup facet popup and aligns it after_start with the selector button
protected Object
PopupClosed(Object component, Object contentDom, Object popupId)
Hook for notifying a peer that a popup of its was just closed.
Object
__preferredSizeChangeNotify(AdfUIComponent component)
Notification that the components preferred size has changed.
protected Object
SetBusy(Object isBusy)
Override to disable the button when in busy state.
private Object
_setDepressedStyle(AdfUIComponent component, boolean depressed)
Button uses depressed instead of active, in order to have finer control over depressed highlighting.
private Object
_toggleComponentUnselected(AdfUIComponent buttonComponent)
Called to toggle a button to off (unselected) when a new item is selected in a group of radio buttons.
private Object
_toggleRadioGroupItems()
When a radio type item is selected, the other radio items in the group are unselected.


Methods inherited from oracle.adf.view.js.laf.rich.AdfRichUIPeer

addComponentEventHandlers, addComponentPropertyChanges, addComponentPropertyGetters, addDomEventHandlers, addEventHandlerToDomInstance, addSuppressedPPRAttributes, applyDragReadyState, ApplyDragReadyState, applyDragSourceState, ApplyDragSourceState, bind, cancelAllPopups, cancelPopup, ChildVisibilityChanged, clearDragReadyState, ClearDragReadyState, clearDragSourceState, ClearDragSourceState, ComponentInlineStyleChanged, ComponentPropertyChanged, componentRemoved, ComponentRemoved, ComponentStyleClassChanged, ComponentVisibleChanged, ConvertClientIdToLocator, convertLocatorToClientId, createComponentEvent, CreateComponentEvent, CreateDraggableNode, createInnerPeerClassWithSubId, createPeerClass, createSubId, DefaultInitClass, descendantMessageChanged, DescendantMessageChanged, DispatchComponentEvent, DispatchUncanceledComponentEvent, domReplaceNotify, DomReplaceNotify, focus, Focus, getAbsoluteId, getAbsoluteLocator, getAccessibleName, GetAccessibleName, getAllPopups, getComponent, GetComponent, GetComponentId, getComponentParent, getComponentProperty, GetComponentVisible, getDescendantComponents, getDomContentElement, getDomContentElementForComponent, GetDomContentElementForNode, getDomDocument, getDomElement, getDomElementForComponent, getDomNode, GetDomNodeForCommentComponent, getDomNodeForComponent, getDragOverFeedback, GetDragOverFeedback, getDragTransferable, GetDragTransferable, getFirstAncestorComponent, getInlineEditor, getInlineStyleProperty, getLocatorByDomElement, getPagePosition, getPopupWindow, getReadyState, GetReadyState, GetRichResourceURL, getSubIdDomElement, hideAllPopups, hidePopup, InitClass, InitDomElement, initialize, isActive, isInActiveHeirarchy, isPopupVisible, messageNotify, MessageNotify, messageShow, MessageShow, needsChildVisibilityChanges, needsFocusTargetStyleClass, processPushData, ProcessPushData, registerKeyStroke, replaceDomElement, ReplaceDomElement, resizeNotify, ResizeNotify, scrollIntoView, ScrollIntoView, setBusy, setInlineStyleProperty, showContextMenu, showPopup, TruncateClientId, TruncateClientIdOnceImpl, UnbindFromComponent, unregisterKeyStroke, visitChildren


Methods inherited from oracle.adf.view.js.base.AdfUIPeer

getDefaultDragRecognizer, getParentPeer, Init, initiateDrag, isVisible, needsResizeNotify


Methods inherited from oracle.adf.view.js.base.AdfObject

adopt, clone, createCallback, createInitializedObject, createSubclass, ensureClassInitialization, equals, exportPrototypeSymbol, getClass, GetLazyArrayProperty, GetLazyMapProperty, getTypeName, toDebugString, toString


Field Detail


_AFR_GROUPID

private static Object _AFR_GROUPID

_BUSY

private static Object _BUSY

ComponentTextChanged

protected Object ComponentTextChanged

Handle change to the text property.

_DEPRESSED_STYLE_CLASS

private static Object _DEPRESSED_STYLE_CLASS

_POPUP_CONTAINER

private static Object _POPUP_CONTAINER

_POPUP_CONTENT_ID

private static Object _POPUP_CONTENT_ID

_POPUP_CONTEXT_AREA

private static Object _POPUP_CONTEXT_AREA

_POPUP_ELEMENT

private static Object _POPUP_ELEMENT

_POPUP_ID

private static Object _POPUP_ID

_SELECTED_STYLE_CLASS

private static Object _SELECTED_STYLE_CLASS

_SUB_ID_MAP

private static Object _SUB_ID_MAP

button component publishes the following sub ids [External Subid --> Internal Client SubId]:- 1. [dropdown --> popEl] - the dropdown indicator, present on a button with a popup facet 2. [icon --> icon] - the button icon, if present 3. [text --> the text value (mapped programmatically)] Note that "text" does not have a corresponding ID to map to. Instead it is determined programmatically in AdfDhtmlButtonPeer.GetSubIdDomElement().

Constructor Detail


AdfDhtmlButtonPeer

public AdfDhtmlButtonPeer()

Peer Implementation for button

Method Detail


BindToComponent

protected Object BindToComponent(AdfUIComponent component,
                                 HTMLElement domElement)

Update any state necessary to bind to the current DOM component.

Parameters:
component  -  the associated component
domElement  -  the dom element
Return:
Object
Overrides:
AdfRichUIPeer.BindToComponent(Object, Object)

ComponentDisabledChanged

protected Object ComponentDisabledChanged(AdfUIComponent component,
                                          HTMLElement domElement,
                                          boolean newValue,
                                          boolean oldValue)

Handle change to the disabled property.

Parameters:
component  -  the associated component
domElement  -  the dom element
newValue  -  the new disabled value
oldValue  -  the old disabled value
Return:
Object

ComponentSelectedChanged

protected Object ComponentSelectedChanged(AdfUIComponent component,
                                          HTMLElement domElement,
                                          boolean newValue,
                                          boolean oldValue)

Handle change to the selected property.

Parameters:
component  -  the associated component
domElement  -  the dom element
newValue  -  the new selected value
oldValue  -  the old selected value
Return:
Object

ComponentShortDescChanged

protected Object ComponentShortDescChanged(AdfUIComponent component,
                                           HTMLElement domElement,
                                           string newValue,
                                           string oldValue)

Handle change to the shortDesc property.

Parameters:
component  -  the associated component
domElement  -  the dom element
newValue  -  the new shortDesc value
oldValue  -  the old shortDesc value
Return:
Object

_displayDefaultIcon

private Object _displayDefaultIcon(AdfUIComponent component)

Display the default icon

Parameters:
component  -  The button component
Return:
Object

_displayDisabledIcon

private Object _displayDisabledIcon(AdfUIComponent component)

Display the disabled icon

Parameters:
component  -  The button component
Return:
Object

_displayIcon

private Object _displayIcon(AdfUIComponent component,
                            string icon)

Display the provided icon

Parameters:
component  -  The button component
icon  -  Icon location string
Return:
Object

_displayMouseDownIcon

private Object _displayMouseDownIcon(AdfUIComponent component)

Display the mousedown icon

Parameters:
component  -  The button component
Return:
Object

_displayMouseOverIcon

private Object _displayMouseOverIcon(AdfUIComponent component)

Display the mouseover icon

Parameters:
component  -  The button component
Return:
Object

_executeAction

private Object _executeAction()

Execute Action event for button.

Return:
Object

_executeDestination

private Object _executeDestination(AdfComponentEvent componentEvent)

Execute destination for button.

Parameters:
componentEvent  -  The component event being dispatched
Return:
Object

GetComponentText

protected Object GetComponentText(Object component,
                                  Object domElement)

Optimized getter for text property

Parameters:
component    
domElement    
Return:
Object

_getGroupId

private Object _getGroupId(HTMLElement domElement)

Get the groupId for the specified domElement. Return null if domElement doesn't have a group id.

Parameters:
domElement  -  The DOM element.
Return:
Object

_getIconElement

private HTMLElement _getIconElement(AdfUIComponent component)

Get the icon element

Parameters:
component  -  The button component to unselect
Return:
HTMLElement - the icon element

GetInlineEditor

protected Object GetInlineEditor(Object event)

Given the component this peer is bound to and the optional DOM event to start editing, return the AdfRichInlineEditor for this component at the event location, if any. Subclasses should override GetInlineEditor.

Parameters:
event    
Return:
Object
Overrides:
AdfRichUIPeer.getInlineEditor(AdfUIComponent, Object)

_getPopupId

private string _getPopupId()

If available, returns the popup's id.

Return:
string - popupId if found, otherwise null

GetSubIdDomElement

protected Object GetSubIdDomElement(Object subElementId)

Returns the DOM element identified by the passed in subId.

Parameters:
subElementId    
Return:
Object - the DOM element
Overrides:
AdfRichUIPeer.getSubIdDomElement(Object, Object)

HandleComponentClick

protected Object HandleComponentClick(AdfComponentEvent componentEvent)

Handle a click on the button

Parameters:
componentEvent  -  The component event being dispatched
Return:
Object

HandleComponentKeyDown

protected Object HandleComponentKeyDown(AdfComponentEvent componentEvent)

Handles keydown event to allow the popup facet popup to open by keyboard

Parameters:
componentEvent  -  The component event being dispatched
Return:
Object

HandleComponentMouseDown

protected Object HandleComponentMouseDown(AdfComponentEvent componentEvent)

Handles the mousedown either on the button or its dropdown, and adjusts the mousedown state accordingly.

Parameters:
componentEvent  -  The component event being dispatched
Return:
Object

HandleComponentMouseOut

protected Object HandleComponentMouseOut(AdfComponentEvent componentEvent)

On mouseout, the default icon is displayed.

Parameters:
componentEvent  -  The component event being dispatched
Return:
Object

HandleComponentMouseOver

protected Object HandleComponentMouseOver(AdfComponentEvent componentEvent)

On mouseover, the mouseover icon is displayed.

Parameters:
componentEvent  -  The component event being dispatched
Return:
Object

HandleComponentMouseUp

protected Object HandleComponentMouseUp(AdfComponentEvent componentEvent)

On mouse up, the mouseover icon is displayed.

Parameters:
componentEvent  -  The component event being dispatched
Return:
Object

_handleTypeChange

private Object _handleTypeChange(AdfUIComponent component)

Handle type changes on button click.

Parameters:
component  -  The menu component
Return:
Object

InitSubclass

protected static Object InitSubclass()

Init button peer.

Return:
Object

isBusy

public Object isBusy()

Overridden to return the busy state of the component.

Return:
Object
Overrides:
AdfRichUIPeer.isBusy()

_isDestinationButton

private Object _isDestinationButton()

Returns true if this is a destination type button

Return:
Object - true if destination type button

_isEventInRootElement

private boolean _isEventInRootElement(AdfComponentEvent componentEvent)

Checks if the event target is within the root dom element. This method is useful to determine if the event is registered inside popup facet

Parameters:
componentEvent  -  The component event
Return:
boolean - true if the event target is within root dom element

_isInPopupSelector

private Object _isInPopupSelector(AdfComponentEvent componentEvent)

Sees if the event is in the popup target.

Parameters:
componentEvent  -  The componentEvent
Return:
Object

_openPopupMenu

private Object _openPopupMenu(string popupId,
                              boolean autoFocus)

Opens the popup facet popup and aligns it after_start with the selector button

Parameters:
popupId  -  The component id of the popup to open
autoFocus  -  If true, then the first focusable
Return:
Object

PopupClosed

protected Object PopupClosed(Object component,
                             Object contentDom,
                             Object popupId)

Hook for notifying a peer that a popup of its was just closed.

Parameters:
component    
contentDom    
popupId    
Return:
Object
Overrides:
AdfRichUIPeer.PopupClosed(AdfUIComponent, HTMLElement, String)

__preferredSizeChangeNotify

Object __preferredSizeChangeNotify(AdfUIComponent component)

Notification that the components preferred size has changed. This is needed for toolbars and toolboxes that used cached size values, and need to be notified when sizes change due to delayed image delivery. This is a temporary method and fix for bug 9035962, to be replaced by er 9491549 fix.

Parameters:
component  -  the associated component (not necessarily bound) identified as having a preferred size change.
Return:
Object

SetBusy

protected Object SetBusy(Object isBusy)

Override to disable the button when in busy state.

Parameters:
isBusy    
Return:
Object
Overrides:
AdfRichUIPeer.setBusy(Object, Object)

_setDepressedStyle

private Object _setDepressedStyle(AdfUIComponent component,
                                  boolean depressed)

Button uses depressed instead of active, in order to have finer control over depressed highlighting. This method sets the depressed style state.

Parameters:
component  -  The button component
depressed  -  Is depressed
Return:
Object

_toggleComponentUnselected

private Object _toggleComponentUnselected(AdfUIComponent buttonComponent)

Called to toggle a button to off (unselected) when a new item is selected in a group of radio buttons. NOTE: We could look to promote this to a public interface class if we want to implement a generic radio items implementation across different component types.

Parameters:
buttonComponent  -  The button component to unselect
Return:
Object

_toggleRadioGroupItems

private Object _toggleRadioGroupItems()

When a radio type item is selected, the other radio items in the group are unselected.

Return:
Object

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

 

Generated on 2014.03.27 12:59 UTC
Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.