OracleJavaScript API Reference for Oracle ADF Faces

 

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

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

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.AdfDhtmlValuePeer
                           |
                           +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlEditableValuePeer
                                 |
                                 +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlInputBasePeer
                                       |
                                       +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlInputNumberSpinboxBasePeer
                                             |
                                             +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlInputNumberSpinboxPeer
Direct Known Subclasses:
AdfDhtmlInputNumberSliderPeer

public class AdfDhtmlInputNumberSpinboxPeer
extends AdfDhtmlInputNumberSpinboxBasePeer
AdfDhtmlInputNumberSpinboxPeer a subclass of AdfDhtmlInputNumberSpinboxBasePeer



Field Summary

private static Object
_currentSpinMode
private static Object
_DEC
private static Object
_DEC_ID
private static Object
_INC
private static Object
_INC_ID
private static Object
_timerId


Fields inherited from oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlEditableValuePeer

ComponentLabelChanged


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

addComponentPropertyChanges, addComponentPropertyGetters, BUSY_STYLECLASS, DISABLED_STYLECLASS, DRAG_SOURCE_STYLECLASS, DROP_TARGET_STYLECLASS, FOCUS_TARGET_STYLECLASS, HOVER_TARGET_STYLECLASS, READONLY_STYLECLASS


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

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfDhtmlInputNumberSpinboxPeer()
AdfDhtmlInputNumberSpinboxPeer a subclass of AdfDhtmlInputNumberSpinboxBasePeer


Method Summary

protected Object
ComponentDisabledChanged(Object component, Object domElement, Object newValue, Object oldValue)
private Object
_getAnchor(Object node)
Get the anchor, used by the increment/decrement buttons.
protected Object
GetInlineEditor(Event event)
Override to return an inline editor that edits the component's label property
private Object
_getMax(Object component)
Function to calculate the maximum value on the client
private Object
_getMin(Object component)
Function to calculate the minimum value on the client
private Object
_getSpinboxValue(Object component)
Helper function, that gets the visibleValue of the InputNumberSpinbox component and returns it.
protected Object
GetStepSize(Object component)
Method to calculate the stepsize to increase or decrease the value of the Spinbox.
private Object
_handleButtonClicks(Object component, Object value, Object increase)
Controller function that handles the click of the +/- button and increases (or decreases) the value.
protected Object
HandleComponentBlur(Object componentEvent)
We need to update the buttons on blur just in case the value changed
protected Object
HandleComponentClick(Object componentEvent)
component on click event handler used to decrease or increase the current number value
protected Object
HandleComponentKeyDown(Object componentEvent)
component key down event handler used to decrease or increase the current number value.
protected Object
HandleComponentMouseDown(Object componentEvent)
This mouse down event handler initializes the auto spin function for the spinbox, when doing a "mouse down" at the increase or decrease button.
protected Object
HandleComponentMouseOut(Object componentEvent)
This component mouse out event handler is needed to stop the timer of the auto spin, when moving the mouse away from the decrease/increas button.
protected Object
HandleComponentMouseUp(Object componentEvent)
component mouse out event handler.
protected Object
InitDomElement(Object component, Object domElement)
Initialize the associated domElement when the peer is created.
private Object
_initRepeat()
Callback function, started by an interval.
protected static Object
InitSubclass()
private Object
_isActionButton(Object element)
helper function which checks if the given element is a decrease or increase button.
private Object
_manipulateValue(Object incrementor)
Function that is called, when the +/- buttons of the Spinbox are clicked.
private Object
_repeatSpinbox()
Controller for the main increment or decrement function.
private Object
_setVisibleValue(Object component, Object newValue)
Function to set the new visible value of the InputNumberSpinbox component.
private Object
_updateButtons(Object domElement, Object atMax, Object atMin)
Helper function that is used to set the CSS style for the disabled and enabled states of the increase and decrease buttons.


Methods inherited from oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlInputNumberSpinboxBasePeer

getLeadingZero, GetValidatorHints, LazyInitialize, SetDisplayValue, ShouldShowHint


Methods inherited from oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlInputBasePeer

GetSubmittedValue, HandleComponentFocus, RunValidation, __simulateBlur, VetoBlurValidation


Methods inherited from oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlEditableValuePeer

autoSubmit, BindToComponent, ComponentChanged, __componentLabelChanged, ComponentSubmittedValueChanged, disableBrowserAutoComplete, Focus, GetComponentLabel, GetComponentSubmittedValue, GetComponentValue, GetContentNode, GetContentNodeId, GetDisplayValue, GetNoteWindowAlignmentHint, GetNoteWindowAlignmentNode, HandleComponentKeyUp, HideNoteWindow, IsInitialized, IsNoteWindowVisible, MessageNotify, MessageShow, ShowNoteWindow, ShowNoteWindowMouseOver, StashOldValue, Validate, ValidateAndStashNewValue, ValidateIfStashedOldValue, VetoShowNoteWindow, WasSubmitted


Methods inherited from oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlValuePeer

ComponentValueChanged, getConvertedObject, getConvertedValue, getFormatHint, GetNullDefault, isEmpty


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

addComponentEventHandlers, addComponentPropertyChanges, addComponentPropertyGetters, addDomEventHandlers, addEventHandlerToDomInstance, addSuppressedPPRAttributes, bind, cancelAllPopups, cancelPopup, ChildVisibilityChanged, ComponentInlineStyleChanged, ComponentPropertyChanged, componentRemoved, ComponentRemoved, ComponentStyleClassChanged, ComponentVisibleChanged, ConvertClientIdToLocator, convertLocatorToClientId, CreateDraggableNode, createPeerClass, createSubId, CreateSubId, DefaultInitClass, DispatchComponentEvent, domReplaceNotify, DomReplaceNotify, 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, GetSubIdDomElement, hideAllPopups, hidePopup, Init, InitClass, initialize, isActive, isInActiveHeirarchy, isPopupVisible, messageNotify, messageShow, needsChildVisibilityChanges, PopupClosed, processPushData, ProcessPushData, registerKeyStroke, replaceDomElement, ReplaceDomElement, resizeNotify, ResizeNotify, scrollIntoView, ScrollIntoView, setBusy, SetBusy, setInlineStyleProperty, showContextMenu, showPopup, TruncateClientId, TruncateClientIdOnceImpl, UnbindFromComponent, unregisterKeyStroke, visitChildren


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

getDefaultDragRecognizer, getParentPeer, initiateDrag, isVisible, needsResizeNotify


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

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


Field Detail


_currentSpinMode

private static Object _currentSpinMode

_DEC

private static Object _DEC

_DEC_ID

private static Object _DEC_ID

_INC

private static Object _INC

_INC_ID

private static Object _INC_ID

_timerId

private static Object _timerId

Constructor Detail


AdfDhtmlInputNumberSpinboxPeer

public AdfDhtmlInputNumberSpinboxPeer()

AdfDhtmlInputNumberSpinboxPeer a subclass of AdfDhtmlInputNumberSpinboxBasePeer

Method Detail


ComponentDisabledChanged

protected Object ComponentDisabledChanged(Object component,
                                          Object domElement,
                                          Object newValue,
                                          Object oldValue)

Parameters:
component    
domElement    
newValue    
oldValue    
Return:
Object

_getAnchor

private Object _getAnchor(Object node)

Get the anchor, used by the increment/decrement buttons. When using Icons, there is another DOM structure, so that we need to get the A element.

Parameters:
node    
Return:
Object

GetInlineEditor

protected Object GetInlineEditor(Event event)

Override to return an inline editor that edits the component's label property

Parameters:
event  -  DOM Event that triggered the inline edit
Return:
Object
Overrides:
AdfRichUIPeer.getInlineEditor(AdfUIComponent, Object)

_getMax

private Object _getMax(Object component)

Function to calculate the maximum value on the client

Parameters:
component    
Return:
Object

_getMin

private Object _getMin(Object component)

Function to calculate the minimum value on the client

Parameters:
component    
Return:
Object

_getSpinboxValue

private Object _getSpinboxValue(Object component)

Helper function, that gets the visibleValue of the InputNumberSpinbox component and returns it. If a converter is attached to the component, the converted value will be returned.

Parameters:
component    
Return:
Object

GetStepSize

protected Object GetStepSize(Object component)

Method to calculate the stepsize to increase or decrease the value of the Spinbox. Default implementation just returns the stepSize from the client side Spinbox component

Parameters:
component    
Return:
Object

_handleButtonClicks

private Object _handleButtonClicks(Object component,
                                   Object value,
                                   Object increase)

Controller function that handles the click of the +/- button and increases (or decreases) the value. This function is called by the _manipulateValue function.

Parameters:
component  -  the client InputNumberSpinbox component
value  -  the current value of the InputNumberSpinbox component
increase    
Return:
Object

HandleComponentBlur

protected Object HandleComponentBlur(Object componentEvent)

We need to update the buttons on blur just in case the value changed

Parameters:
componentEvent    
Return:
Object
Overrides:
AdfDhtmlInputBasePeer.HandleComponentBlur(Object)

HandleComponentClick

protected Object HandleComponentClick(Object componentEvent)

component on click event handler used to decrease or increase the current number value

Parameters:
componentEvent  -  the event invoked by on click
Return:
Object
Overrides:
AdfDhtmlEditableValuePeer.HandleComponentClick(Object)

HandleComponentKeyDown

protected Object HandleComponentKeyDown(Object componentEvent)

component key down event handler used to decrease or increase the current number value.

Parameters:
componentEvent  -  the event invoked by key down
Return:
Object

HandleComponentMouseDown

protected Object HandleComponentMouseDown(Object componentEvent)

This mouse down event handler initializes the auto spin function for the spinbox, when doing a "mouse down" at the increase or decrease button. This function also creates a callback for the _initRepeat function to manage to real auto spin mechanismn.

Parameters:
componentEvent  -  the component event invoked by mouse down
Return:
Object

HandleComponentMouseOut

protected Object HandleComponentMouseOut(Object componentEvent)

This component mouse out event handler is needed to stop the timer of the auto spin, when moving the mouse away from the decrease/increas button.

Parameters:
componentEvent  -  the component event invoked by mouse out
Return:
Object

HandleComponentMouseUp

protected Object HandleComponentMouseUp(Object componentEvent)

component mouse out event handler.

Parameters:
componentEvent  -  the component event invoked by mouse out
Return:
Object

InitDomElement

protected Object InitDomElement(Object component,
                                Object domElement)

Initialize the associated domElement when the peer is created. Stateless peers are not bound at the time that this method is called.

Parameters:
component  -  Component that this peer will be associated with
domElement  -  Root DOM element of this peer
Return:
Object
Overrides:
AdfRichUIPeer.InitDomElement(AdfUIComponent, Object)

_initRepeat

private Object _initRepeat()

Callback function, started by an interval. This function removes itself from the interval and starts a new one, which will only removed, by the mouseup event. That one calls a function de- or increase the spinbox by a 100 ms interval.

Return:
Object

InitSubclass

protected static Object InitSubclass()

Return:
Object
Overrides:
AdfDhtmlValuePeer.InitSubclass()

_isActionButton

private Object _isActionButton(Object element)

helper function which checks if the given element is a decrease or increase button. In case of increase it returns 'inc' and in case of a decrease button 'dec' is returned. Otherwise, this function returns null.

Parameters:
element    
Return:
Object

_manipulateValue

private Object _manipulateValue(Object incrementor)

Function that is called, when the +/- buttons of the Spinbox are clicked. It first gets the visible value and pushes this to the _handleButtonClicks controller function, in case of a not empty visible value. This function also calls the _setVisibleValue to set the new visible value and update the CSS styles for the +/ buttons, like adding p_AFDisabled when the minimum or the maximum has reached.

Parameters:
incrementor  -  true when the increase button was clicked and false when decrease button was clicked
Return:
Object

_repeatSpinbox

private Object _repeatSpinbox()

Controller for the main increment or decrement function. This method is called by the AdfObject.createCallback method.

Return:
Object
See also:
AdfObject.createCallback(Object)

_setVisibleValue

private Object _setVisibleValue(Object component,
                                Object newValue)

Function to set the new visible value of the InputNumberSpinbox component. This function calls the _updateButtons function to ensure that the propper CSS classes are applied to the +/- buttons.

Parameters:
component    
newValue    
Return:
Object

_updateButtons

private Object _updateButtons(Object domElement,
                              Object atMax,
                              Object atMin)

Helper function that is used to set the CSS style for the disabled and enabled states of the increase and decrease buttons. To set these style, this function uses the max/min parameters.

Parameters:
domElement  -  the rootDomElement of the spinbox, only used as param, when called by InitDomElement.
atMax  -  is the current value>=max
atMin  -  is the current value<=min
Return:
Object

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

 

Generated on 2010.12.10 19:37 UTC
Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.