# JavaScript API Reference for Oracle ADF Faces

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Fusion Middleware Javascript API Reference for Oracle ADF Faces 12c (12.2.1.4.0) E81451-01
PREV NEXT | FRAMES NO FRAMES Warning: private items are visible |

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

# oracle.adfinternal.view.js.laf.dhtml.rich
Class AdfDhtmlInputColorPeer

## Warning:

- This is an unsupported, internal implementation class.
- Use an API class that might provide equivalent functionality instead.
- This class will change without notice.
- It is not recommended that you use anything in this class.

    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.AdfDhtmlInputColorPeer

    public class AdfDhtmlInputColorPeer
    extends AdfDhtmlInputBasePeer

## Field Summary
`private static Object` | `_colorFormat`
`private static Object` | `_GLYPH_ID`
`static Object` | `__LAST_USED_COLOR`
`private static Object` | `_POPUP_CHOOSECOLOR_ID`
`private static Object` | `_POPUP_WRAPPER_CHOOSECOLOR_ID`
`private static Object` | `_POPUP_WRAPPER_ID`
`private static Object` | `_SWATCH_ID`

### Fields inherited from oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlEditableValuePeer
`ComponentLabelChanged, ComponentShowRequiredChanged`

### 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` | `AdfDhtmlInputColorPeer()`

## Method Summary
`protected Object` | `ComponentCustomColorDataChanged(Object component, Object domElement, Object newValue, Object oldValue)` CustomColorData is displayed by chooseColor, push changes to the chooser.
`protected Object` | `ComponentDisabledChanged(Object component, Object domElement, Object newValue, Object oldValue)`
`protected Object` | `ComponentValueChanged(Object component, Object domElement, Object newValue, Object oldValue)` value property change handler.
`private static Object` | `_convertToColorString(Object colorObj)`
`private Object` | `_createDefaultClientSideConverter(Object component)` Helper function to create a default client side converter.
`private Object` | `_delegatePopupChooseColorGetter(Object inputColor, Object propertyName)` This is used to delegate a chooseColor related property getter call to the popup chooseColor.
`protected Object` | `GetComponentColorData(Object component, Object domElement)` colorData property getter.
`protected Object` | `GetComponentCustomColorData(Object component, Object domElement)` customColorData property getter.
`protected Object` | `GetComponentDefaultColor(Object component, Object domElement)` defaultColor property getter.
`protected Object` | `GetComponentLastUsedColor(Object component, Object domElement)` lastUsedColor property getter.
`protected Object` | `GetComponentWidth(Object component, Object domElement)` width property getter.
`protected Object` | `GetInlineEditor(Event event)` Override to return an inline editor that edits the AdfDhtmlInputColorPeer's label property
`protected Object` | `GetNoteWindowAlignmentNode(Object component, Object rootNode)` Returns the node for which to align the note help window
`private Object` | `_getPopup(Object component)` Returns the popup corresponding to this component, if it exists.
`private Object` | `_getPopupChooseColor(Object inputColor)`
`private String` | `_getPopupId(Object component)` ID for the popup corresponding to this inputColor.
`private Object` | `_getRuntimeChooseColorId(Object thisComponent)`
`private Object` | `_handleColorPopup(Object component, Object componentEvent, Object bShow)` Show/hide color popup
`protected Object` | `HandleComponentClick(Object componentEvent)` component mouse click event handler.
`protected Object` | `HandleComponentFocus(Object componentEvent)` Component focus event handler.
`protected Object` | `HandleComponentKeyDown(Object componentEvent)` component keyboard up event handler.
`protected Object` | `HandleComponentKeyPress(Object componentEvent)` Component keyboard key press event handler
`public Object` | `handleReturnFromChooseComponent(Object inputColorComponent, Object bHidePopup)` Once a color has been selected from the associated chooseColor, no matter whether the chooseColor is popup type or not, this method is called.
`public Object` | `handleUpdateFromChooseComponent(Object inputColorComponent, Object propertyName, Object newValue)` Call back method called by choose component (directly called by AdfDhtmlInputChooseBindingUtils).
`private Object` | `_hidePopup(Object inputComponent)`
`private Object` | `_hookUpChooseColor(Object clientId)` ChooseColor is associated with inputColor by registering a mapping from chooseColor id to inputColor id.
`public Object` | `initChooseComponentValue(Object inputComponent)` Called to initialize the properties of the associated chooseColor
`protected Object` | `InitDomElement(Object component, Object domElement)` Initialize the associated domElement when the peer is created.
`protected static Object` | `InitSubclass()`
`private Object` | `_isCompact(Object component)`
`private Object` | `_isGlyphElement(Object eventTarget, Object glyphId)`
`private Object` | `_isPopupVisible(Object component)` Whether there is a popup for this component, and if it is visible.
`protected Object` | `LazyInitialize(Object component, Object domElement)` LazyInitialize implementation that calls its super function and creates a default client side converter lazily.
`protected Object` | `PopupClosed(Object component, Object contentDom, Object popupId)` Call back method called when the popup chooseColor is closed.
`public Object` | `returnFocus(Object inputColorComponent)` Hide the popup chooseColor and move focus back to the input field
`protected Object` | `SetDisplayValue(Object component, Object domElement, Object newValue)` set the display string
`protected Object` | `ShouldShowHint(Object component, Object domElement)` Show hint in note window for this component.
`private Object` | `_updateSwatchDisplay(Object component, Object newValue)` Update the swatch color
`protected Object` | `VetoShowNoteWindow(Object component)`

### Methods inherited from oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlInputBasePeer
`CheckLength, getLastValue, GetSubmittedValue, HandleComponentBlur, initialize, needsFocusTargetStyleClass, NeedsSpuriousDirtyValueTracking, preventNextValueSubmission, RunValidation, setLastValue, __simulateBlur, UpdateLastValue, VetoBlurValidation, WasSubmitted`

### Methods inherited from oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlEditableValuePeer
`autoSubmit, BindToComponent, ComponentChanged, __componentLabelChanged, ComponentSubmittedValueChanged, disableBrowserAutoComplete, Focus, GetComponentLabel, GetComponentSubmittedValue, GetComponentValue, getContentNode, GetContentNode, GetContentNodeId, getContentNodeText, GetDisplayValue, GetLabelElement, GetLabelText, getLastSubmittedValue, getMarkDirtyFlag, GetNoteWindowAlignmentHint, GetValidatorHints, HandleComponentKeyUp, HideNoteWindow, IsInitialized, IsNoteWindowVisible, __isSpuriousDirtyValue, MessageNotify, MessageShow, __resetSpuriousDirtyValue, __restoreDirtyDisplayValue, setLastSubmittedValue, setMarkDirtyFlag, ShowNoteWindow, ShowNoteWindowMouseOver, StashOldValue, StopArrowKeyBubbling, Validate, ValidateAndStashNewValue, ValidateIfStashedOldValue`

### Methods inherited from oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlValuePeer
`GetBestMatchSubId, getConvertedObject, getConvertedValue, getFormatHint, GetFormattedDisplayValue, GetNullDefault, GetSubIdDomElement, isEmpty, setDisplayValue`

### 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, getAbsoluteId, getAbsoluteLocator, getAccessibleName, GetAccessibleName, getAllPopups, getComponent, GetComponent, GetComponentId, getComponentParent, getComponentProperty, GetComponentVisible, getDescendantComponents, getDomContentElement, getDomContentElementForComponent, GetDomContentElementForNode, getDomDocument, getDomElement, getDomElementForComponent, getDomNode, GetDomNodeForCommentComponent, getDomNodeForComponent, getDomRootNodes, GetDomRootNodes, getDragOverFeedback, GetDragOverFeedback, getDragTransferable, GetDragTransferable, GetElementToReplaceWithSVG, getFallbackDomElement, GetFallbackDomElement, getFirstAncestorComponent, getInlineEditor, getInlineStyleProperty, getLocatorByDomElement, getPagePosition, getPopupWindow, getReadyState, GetReadyState, GetRichResourceURL, getSubIdDomElement, hideAllPopups, hidePopup, InitClass, isAbsoluteLocatorCacheable, isActive, isBusy, isComponentContainedByElement, isInActiveHeirarchy, isInlineSVGIcon, isPopupVisible, messageNotify, messageShow, needsChildVisibilityChanges, processPushData, ProcessPushData, registerADSAccessibility, RegisterADSAccessibility, registerKeyStroke, replaceDomElement, ReplaceDomElement, resizeNotify, ResizeNotify, scrollIntoView, ScrollIntoView, setBusy, SetBusy, setInlineStyleProperty, showContextMenu, showPopup, simulateMouse, SimulateMouseOnDescendant, TruncateClientId, TruncateClientIdOnceImpl, UnbindFromComponent, unregisterKeyStroke, UpdateMessageType, 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

### _colorFormat

`private static Object _colorFormat`

### _GLYPH_ID

`private static Object _GLYPH_ID`

### __LAST_USED_COLOR

`static Object __LAST_USED_COLOR`

### _POPUP_CHOOSECOLOR_ID

`private static Object _POPUP_CHOOSECOLOR_ID`

### _POPUP_WRAPPER_CHOOSECOLOR_ID

`private static Object _POPUP_WRAPPER_CHOOSECOLOR_ID`

### _POPUP_WRAPPER_ID

`private static Object _POPUP_WRAPPER_ID`

### _SWATCH_ID

`private static Object _SWATCH_ID`

## Constructor Detail

### AdfDhtmlInputColorPeer

`public AdfDhtmlInputColorPeer()`

## Method Detail

### ComponentCustomColorDataChanged

`protected Object ComponentCustomColorDataChanged(Object component,
Object domElement,
Object newValue,
Object oldValue)`
  CustomColorData is displayed by chooseColor, push changes to the chooser.
  Parameters:

    `component` |  |
    `domElement` |  |
    `newValue` |  |
    `oldValue` |  |

  Return:
    `Object`

### ComponentDisabledChanged

`protected Object ComponentDisabledChanged(Object component,
Object domElement,
Object newValue,
Object oldValue)`
  Parameters:

    `component` |  |
    `domElement` |  |
    `newValue` |  |
    `oldValue` |  |

  Return:
    `Object`

### ComponentValueChanged

`protected Object ComponentValueChanged(Object component,
Object domElement,
Object newValue,
Object oldValue)`
  value property change handler.
  Parameters:

    `component` | - | the AdfRichInputColor component
    `domElement` |  |
    `newValue` |  |
    `oldValue` |  |

  Return:
    `Object`
  Overrides:
    `AdfDhtmlValuePeer.ComponentValueChanged(Object, Object, Object, Object)`

### _convertToColorString

`private static Object _convertToColorString(Object colorObj)`
  Parameters:

    `colorObj` | - | the Color object to convert from

  Return:
    `Object` - the color string in #RRGGBB format that represent the colorObj.

### _createDefaultClientSideConverter

`private Object _createDefaultClientSideConverter(Object component)`
  Helper function to create a default client side converter.
  Parameters:

    `component` |  |

  Return:
    `Object`

### _delegatePopupChooseColorGetter

`private Object _delegatePopupChooseColorGetter(Object inputColor,
Object propertyName)`
  This is used to delegate a chooseColor related property getter call to the popup chooseColor. When chooseId is NOT null, the chooseColor related property values are sent from the server and no delegation is needed. When chooseId is null, since the property values is available through the popup chooseColor DOM, the property values are not sent from server. So the client side getter of inuptColor must get the property value from the popup chooseColor using this method
  Parameters:

    `inputColor` | - | the inputColor component
    `propertyName` |  |

  Return:
    `Object` - the popup chooseColor component in the passed in inputColor

### GetComponentColorData

`protected Object GetComponentColorData(Object component,
Object domElement)`
  colorData property getter.
  Parameters:

    `component` | - | Component that this peer is associated with
    `domElement` | - | Root DOM element of this peer

  Return:
    `Object` - colorData array

### GetComponentCustomColorData

`protected Object GetComponentCustomColorData(Object component,
Object domElement)`
  customColorData property getter.
  Parameters:

    `component` | - | Component that this peer is associated with
    `domElement` | - | Root DOM element of this peer

  Return:
    `Object` - customColorData array

### GetComponentDefaultColor

`protected Object GetComponentDefaultColor(Object component,
Object domElement)`
  defaultColor property getter.
  Parameters:

    `component` | - | Component that this peer is associated with
    `domElement` | - | Root DOM element of this peer

  Return:
    `Object` - the defaulColor property value

### GetComponentLastUsedColor

`protected Object GetComponentLastUsedColor(Object component,
Object domElement)`
  lastUsedColor property getter.
  Parameters:

    `component` | - | Component that this peer is associated with
    `domElement` | - | Root DOM element of this peer

  Return:
    `Object` - the lastUsedColor property value

### GetComponentWidth

`protected Object GetComponentWidth(Object component,
Object domElement)`
  width property getter.
  Parameters:

    `component` | - | Component that this peer is associated with
    `domElement` | - | Root DOM element of this peer

  Return:
    `Object` - the width property value

### GetInlineEditor

`protected Object GetInlineEditor(Event event)`
  Override to return an inline editor that edits the AdfDhtmlInputColorPeer's label property
  Parameters:

    `event` | - | DOM Event that triggered the inline edit

  Return:
    `Object`
  Overrides:
    `AdfRichUIPeer.getInlineEditor(AdfUIComponent, Object)`

### GetNoteWindowAlignmentNode

`protected Object GetNoteWindowAlignmentNode(Object component,
Object rootNode)`
  Returns the node for which to align the note help window
  Parameters:

    `component` |  |
    `rootNode` |  |

  Return:
    `Object`
  Overrides:
    `AdfDhtmlEditableValuePeer.GetNoteWindowAlignmentNode(Object, Object)`

### _getPopup

`private Object _getPopup(Object component)`
  Returns the popup corresponding to this component, if it exists. for testing visibility, but remember to test if it is null.
  Parameters:

    `component` |  |

  Return:
    `Object` - popup This can be null, e.g. if the inputColor has a chooseID so that it points to an embedded color-picker in the page. If testing for popup visibility, use _isPopupVisible() which calls this method.

### _getPopupChooseColor

`private Object _getPopupChooseColor(Object inputColor)`
  Parameters:

    `inputColor` | - | the inputColor component

  Return:
    `Object` - the popup chooseColor component in the passed in inputColor

### _getPopupId

`private String _getPopupId(Object component)`
  ID for the popup corresponding to this inputColor. Available if chooseID is not explicitly specified.
  Parameters:

    `component` | - | InputColor component to find the popup ID for

  Return:
    `String` - Element ID of the popup

### _getRuntimeChooseColorId

`private Object _getRuntimeChooseColorId(Object thisComponent)`
  Parameters:

    `thisComponent` |  |

  Return:
    `Object` - if chooseId property is present, return chooseId property. Otherwise return the popup chooseColor id of the popup is present.

### _handleColorPopup

`private Object _handleColorPopup(Object component,
Object componentEvent,
Object bShow)`
  Show/hide color popup
  Parameters:

    `component` | - | Component that this peer is associated with
    `componentEvent` | - | the component event invoked by key up or mouse down
    `bShow` | - | boolean vale used to show or hide color popup

  Return:
    `Object`

### HandleComponentClick

`protected Object HandleComponentClick(Object componentEvent)`
  component mouse click event handler.
  Parameters:

    `componentEvent` | - | the component event invoked by mouse click

  Return:
    `Object`
  Overrides:
    `AdfDhtmlEditableValuePeer.HandleComponentClick(Object)`

### HandleComponentFocus

`protected Object HandleComponentFocus(Object componentEvent)`
  Component focus event handler. This gets called when the field gains focus
  Parameters:

    `componentEvent` |  |

  Return:
    `Object`
  Overrides:
    `AdfDhtmlEditableValuePeer.HandleComponentFocus(Object)`

### HandleComponentKeyDown

`protected Object HandleComponentKeyDown(Object componentEvent)`
  component keyboard up event handler.
  Parameters:

    `componentEvent` | - | the component event invoked by key up, incuding key up on the custom color dialog

  Return:
    `Object`

### HandleComponentKeyPress

`protected Object HandleComponentKeyPress(Object componentEvent)`
  Component keyboard key press event handler
  Parameters:

    `componentEvent` | - | the component event invoked by key press

  Return:
    `Object`

### handleReturnFromChooseComponent

`public Object handleReturnFromChooseComponent(Object inputColorComponent,
Object bHidePopup)`
  Once a color has been selected from the associated chooseColor, no matter whether the chooseColor is popup type or not, this method is called.
  Parameters:

    `inputColorComponent` |  |
    `bHidePopup` |  |

  Return:
    `Object`

### handleUpdateFromChooseComponent

`public Object handleUpdateFromChooseComponent(Object inputColorComponent,
Object propertyName,
Object newValue)`
  Call back method called by choose component (directly called by AdfDhtmlInputChooseBindingUtils).
  Parameters:

    `inputColorComponent` |  |
    `propertyName` | - | the name of the property to update.
    `newValue` | - | the new value of the properties.

  Return:
    `Object`

### _hidePopup

`private Object _hidePopup(Object inputComponent)`
  Parameters:

    `inputComponent` | - | Client component for the inputColor Checks if the popup is open and hides it if so.

  Return:
    `Object`

### _hookUpChooseColor

`private Object _hookUpChooseColor(Object clientId)`
  ChooseColor is associated with inputColor by registering a mapping from chooseColor id to inputColor id. This method does the mapping, and tries to initialize the associated chooseColor if it exists.
  Parameters:

    `clientId` |  |

  Return:
    `Object`

### initChooseComponentValue

`public Object initChooseComponentValue(Object inputComponent)`
  Called to initialize the properties of the associated chooseColor
  Parameters:

    `inputComponent` |  |

  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)`

### InitSubclass

`protected static Object InitSubclass()`
  Return:
    `Object`
  Overrides:
    `AdfDhtmlValuePeer.InitSubclass()`

### _isCompact

`private Object _isCompact(Object component)`
  Parameters:

    `component` |  |

  Return:
    `Object`

### _isGlyphElement

`private Object _isGlyphElement(Object eventTarget,
Object glyphId)`
  Parameters:

    `eventTarget` |  |
    `glyphId` |  |

  Return:
    `Object` - the DOM element of the drop down icon TODO This will change once we have skinning/icons on the client, since with skinning we can't guarantee this is an img element.

### _isPopupVisible

`private Object _isPopupVisible(Object component)`
  Whether there is a popup for this component, and if it is visible.
  Parameters:

    `component` | - | InputColor component to find the popup for

  Return:
    `Object` - true if the popup exists and is visible

### LazyInitialize

`protected Object LazyInitialize(Object component,
Object domElement)`
  LazyInitialize implementation that calls its super function and creates a default client side converter lazily.
  Parameters:

    `component` |  |
    `domElement` |  |

  Return:
    `Object`
  Overrides:
    `AdfDhtmlEditableValuePeer.LazyInitialize(Object, Object)`

### PopupClosed

`protected Object PopupClosed(Object component,
Object contentDom,
Object popupId)`
  Call back method called when the popup chooseColor is closed. This is used to do clean up after close
  Parameters:

    `component` |  |
    `contentDom` |  |
    `popupId` |  |

  Return:
    `Object`
  Overrides:
    `AdfRichUIPeer.PopupClosed(AdfUIComponent, HTMLElement, String)`

### returnFocus

`public Object returnFocus(Object inputColorComponent)`
  Hide the popup chooseColor and move focus back to the input field
  Parameters:

    `inputColorComponent` |  |

  Return:
    `Object`

### SetDisplayValue

`protected Object SetDisplayValue(Object component,
Object domElement,
Object newValue)`
  set the display string
  Parameters:

    `component` |  |
    `domElement` |  |
    `newValue` | - | new string to be displayed

  Return:
    `Object`
  Overrides:
    `AdfDhtmlValuePeer.setDisplayValue(Object, Object)`

### ShouldShowHint

`protected Object ShouldShowHint(Object component,
Object domElement)`
  Show hint in note window for this component.
  Parameters:

    `component` |  |
    `domElement` |  |

  Return:
    `Object`
  Overrides:
    `AdfDhtmlEditableValuePeer.ShouldShowHint(Object, Object)`

### _updateSwatchDisplay

`private Object _updateSwatchDisplay(Object component,
Object newValue)`
  Update the swatch color
  Parameters:

    `component` |  |
    `newValue` |  |

  Return:
    `Object`

### VetoShowNoteWindow

`protected Object VetoShowNoteWindow(Object component)`
  Parameters:

    `component` |  |

  Return:
    `Object`
  Overrides:
    `AdfDhtmlEditableValuePeer.VetoShowNoteWindow(Object)`

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

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Fusion Middleware Javascript API Reference for Oracle ADF Faces 12c (12.2.1.4.0) E81451-01
PREV NEXT | FRAMES NO FRAMES Warning: private items are visible |

Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.