Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1)
E10684-01

oracle.adf.view.rich.component.rich.input
Class RichChooseColor

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by org.apache.myfaces.trinidad.component.UIXComponent
          extended by org.apache.myfaces.trinidad.component.UIXComponentBase
              extended by org.apache.myfaces.trinidad.component.UIXChoose
                  extended by oracle.adf.view.rich.component.rich.input.RichChooseColor
All Implemented Interfaces:
javax.faces.component.StateHolder

public class RichChooseColor
extends org.apache.myfaces.trinidad.component.UIXChoose

The chooseColor component is used in conjunction with a inputColor to allow the user to quickly select a color value without having to navigate to a secondary window. The chooseColor is typically used for tasks where selecting a color value is a critical part of the task flow. Instead of requiring the user to select the color from a secondary window, a chooseColor can be displayed inline in the page contents. Users can then select a color directly within the chooseColor, which will cause the currently focused inputColor to be updated with the selected color. In order to indicate that a particular inputColor should be updated in response to chooseColor selection changes, the the inputColor's "chooseId" attribute must be set to the id of the associated chooseColor component.

Events:

Type Phases Description
org.apache.myfaces.trinidad.event.AttributeChangeEvent Invoke Application
Apply Request Values
Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change events might include the width of a column that supported client-side resizing.


Field Summary
static org.apache.myfaces.trinidad.bean.PropertyKey CLIENT_ATTRIBUTES_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey CLIENT_COMPONENT_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey CLIENT_LISTENERS_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey COLOR_DATA_KEY
           
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
static org.apache.myfaces.trinidad.bean.PropertyKey CUSTOM_COLOR_DATA_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey CUSTOM_VISIBLE_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey CUSTOMIZATION_ID_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey DEFAULT_COLOR_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey DEFAULT_VISIBLE_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey INLINE_STYLE_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey LAST_USED_VISIBLE_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey PARTIAL_TRIGGERS_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey SHORT_DESC_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey STYLE_CLASS_KEY
           
static org.apache.myfaces.trinidad.bean.FacesBean.Type TYPE
           
static org.apache.myfaces.trinidad.bean.PropertyKey VISIBLE_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey WIDTH_KEY
           
static java.lang.String WIDTH11
           
static java.lang.String WIDTH7
           
static java.lang.String WIDTH8
           
 
Fields inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase
BINDING_KEY, ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
Constructor Summary
  RichChooseColor()
          Construct an instance of the RichChooseColor.
protected RichChooseColor(java.lang.String rendererType)
          Construct an instance of the RichChooseColor.
 
Method Summary
protected  org.apache.myfaces.trinidad.bean.FacesBean.Type getBeanType()
           
 java.util.Set getClientAttributes()
          Gets a set of client attribute names.
 ClientListenerSet getClientListeners()
          Gets a set of client listeners.
 java.util.List<java.awt.Color> getColorData()
          Gets the list of colors to be displayed in the standard color palette.
 java.util.List<java.awt.Color> getCustomColorData()
          Gets the list of custom defined colors.
 java.lang.String getCustomizationId()
          Gets This attribute is deprecated.
 java.awt.Color getDefaultColor()
          Gets the default color.
 java.lang.String getFamily()
           
 java.lang.String getInlineStyle()
          Gets the CSS styles to use for this component.
 java.lang.String[] getPartialTriggers()
          Gets the IDs of the components that should trigger a partial update.
 java.lang.String getShortDesc()
          Gets the short description of the component.
 java.lang.String getStyleClass()
          Gets a CSS style class to use for this component.
 int getWidth()
          Gets the width of the standard palette in cells.
 boolean isClientComponent()
          Gets whether a client-side component will be generated.
 boolean isCustomVisible()
          Gets whether the Custom Color button and custom color row are displayed.
 boolean isDefaultVisible()
          Gets whether the Default button is displayed.
 boolean isLastUsedVisible()
          Gets whether the Last Used button is displayed.
 boolean isVisible()
          Gets the visibility of the component.
 void setClientAttributes(java.util.Set clientAttributes)
          Sets a set of client attribute names.
 void setClientComponent(boolean clientComponent)
          Sets whether a client-side component will be generated.
 void setClientListeners(ClientListenerSet clientListeners)
          Sets a set of client listeners.
 void setColorData(java.util.List<java.awt.Color> colorData)
          Sets the list of colors to be displayed in the standard color palette.
 void setCustomColorData(java.util.List<java.awt.Color> customColorData)
          Sets the list of custom defined colors.
 void setCustomizationId(java.lang.String customizationId)
          Sets This attribute is deprecated.
 void setCustomVisible(boolean customVisible)
          Sets whether the Custom Color button and custom color row are displayed.
 void setDefaultColor(java.awt.Color defaultColor)
          Sets the default color.
 void setDefaultVisible(boolean defaultVisible)
          Sets whether the Default button is displayed.
 void setInlineStyle(java.lang.String inlineStyle)
          Sets the CSS styles to use for this component.
 void setLastUsedVisible(boolean lastUsedVisible)
          Sets whether the Last Used button is displayed.
 void setPartialTriggers(java.lang.String[] partialTriggers)
          Sets the IDs of the components that should trigger a partial update.
 void setShortDesc(java.lang.String shortDesc)
          Sets the short description of the component.
 void setStyleClass(java.lang.String styleClass)
          Sets a CSS style class to use for this component.
 void setVisible(boolean visible)
          Sets the visibility of the component.
 void setWidth(int width)
          Sets the width of the standard palette in cells.
 
Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase
adaptMethodBinding, addAttributeChange, addAttributeChangeListener, addFacesListener, broadcast, broadcastToMethodBinding, broadcastToMethodExpression, createFacesBean, decode, decodeChildren, decodeChildrenImpl, encodeAll, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributeChangeListener, getAttributeChangeListeners, getAttributes, getBooleanProperty, getChildCount, getChildren, getClientId, getContainerClientId, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacetNames, getFacets, getFacetsAndChildren, getId, getIntProperty, getLifecycleRenderer, getParent, getProperty, getPropertyKey, getRenderer, getRendererType, getRendersChildren, getValueBinding, getValueExpression, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeAttributeChangeListener, removeFacesListener, restoreState, saveState, setAttributeChangeListener, setAttributeChangeListener, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setValueBinding, setValueExpression, toString, updateChildren, updateChildrenImpl, validateChildren, validateChildrenImpl
 
Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponent
processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren
 
Methods inherited from class javax.faces.component.UIComponent
getContainerClientId, invokeOnComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WIDTH7

public static final java.lang.String WIDTH7
See Also:
Constant Field Values

WIDTH8

public static final java.lang.String WIDTH8
See Also:
Constant Field Values

WIDTH11

public static final java.lang.String WIDTH11
See Also:
Constant Field Values

TYPE

public static final org.apache.myfaces.trinidad.bean.FacesBean.Type TYPE

INLINE_STYLE_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey INLINE_STYLE_KEY

STYLE_CLASS_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey STYLE_CLASS_KEY

SHORT_DESC_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey SHORT_DESC_KEY

VISIBLE_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey VISIBLE_KEY

CUSTOMIZATION_ID_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey CUSTOMIZATION_ID_KEY

CLIENT_COMPONENT_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey CLIENT_COMPONENT_KEY

CLIENT_ATTRIBUTES_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey CLIENT_ATTRIBUTES_KEY

CLIENT_LISTENERS_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey CLIENT_LISTENERS_KEY

PARTIAL_TRIGGERS_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey PARTIAL_TRIGGERS_KEY

COLOR_DATA_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey COLOR_DATA_KEY

CUSTOM_COLOR_DATA_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey CUSTOM_COLOR_DATA_KEY

DEFAULT_COLOR_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey DEFAULT_COLOR_KEY

WIDTH_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey WIDTH_KEY

LAST_USED_VISIBLE_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey LAST_USED_VISIBLE_KEY

DEFAULT_VISIBLE_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey DEFAULT_VISIBLE_KEY

CUSTOM_VISIBLE_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey CUSTOM_VISIBLE_KEY

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
See Also:
Constant Field Values

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
See Also:
Constant Field Values
Constructor Detail

RichChooseColor

public RichChooseColor()
Construct an instance of the RichChooseColor.


RichChooseColor

protected RichChooseColor(java.lang.String rendererType)
Construct an instance of the RichChooseColor.

Method Detail

getInlineStyle

public final java.lang.String getInlineStyle()
Gets the CSS styles to use for this component. This is intended for basic style changes. The inlineStyle is a set of CSS styles that are applied to the root DOM element of the component. If the inlineStyle's CSS properties do not affect the DOM element you want affected, then you will have to create a skin and use the skinning keys which are meant to target particular DOM elements, like ::label or ::icon-style.

Returns:
the new inlineStyle value

setInlineStyle

public final void setInlineStyle(java.lang.String inlineStyle)
Sets the CSS styles to use for this component. This is intended for basic style changes. The inlineStyle is a set of CSS styles that are applied to the root DOM element of the component. If the inlineStyle's CSS properties do not affect the DOM element you want affected, then you will have to create a skin and use the skinning keys which are meant to target particular DOM elements, like ::label or ::icon-style.

Parameters:
inlineStyle - the new inlineStyle value

getStyleClass

public final java.lang.String getStyleClass()
Gets a CSS style class to use for this component. The style class can be defined in your jspx page or in a skinning CSS file, for example, or you can use one of our public style classes, like 'AFInstructionText'.

Returns:
the new styleClass value

setStyleClass

public final void setStyleClass(java.lang.String styleClass)
Sets a CSS style class to use for this component. The style class can be defined in your jspx page or in a skinning CSS file, for example, or you can use one of our public style classes, like 'AFInstructionText'.

Parameters:
styleClass - the new styleClass value

getShortDesc

public final java.lang.String getShortDesc()
Gets the short description of the component. This text is commonly used by user agents to display tooltip help text, in which case the behavior for the tooltip is controlled by the user agent, e.g. Firefox 2 truncates long tooltips. For form components, the shortDesc is displayed in a note window.

Returns:
the new shortDesc value

setShortDesc

public final void setShortDesc(java.lang.String shortDesc)
Sets the short description of the component. This text is commonly used by user agents to display tooltip help text, in which case the behavior for the tooltip is controlled by the user agent, e.g. Firefox 2 truncates long tooltips. For form components, the shortDesc is displayed in a note window.

Parameters:
shortDesc - the new shortDesc value

isVisible

public final boolean isVisible()
Gets the visibility of the component. If it is "false", the component will be hidden on the client. Unlike "rendered", this does not affect the lifecycle on the server - the component may have its bindings executed, etc. - and the visibility of the component can be toggled on and off on the client, or toggled with PPR. When "rendered" is false, the component will not in any way be rendered, and cannot be made visible on the client. In most cases, use the "rendered" property instead of the "visible" property.

Returns:
the new visible value

setVisible

public final void setVisible(boolean visible)
Sets the visibility of the component. If it is "false", the component will be hidden on the client. Unlike "rendered", this does not affect the lifecycle on the server - the component may have its bindings executed, etc. - and the visibility of the component can be toggled on and off on the client, or toggled with PPR. When "rendered" is false, the component will not in any way be rendered, and cannot be made visible on the client. In most cases, use the "rendered" property instead of the "visible" property.

Parameters:
visible - the new visible value

getCustomizationId

public final java.lang.String getCustomizationId()
Gets This attribute is deprecated. The 'id' attribute should be used when applying persistent customizations. This attribute will be removed in the next release.

Returns:
the new customizationId value

setCustomizationId

public final void setCustomizationId(java.lang.String customizationId)
Sets This attribute is deprecated. The 'id' attribute should be used when applying persistent customizations. This attribute will be removed in the next release.

Parameters:
customizationId - the new customizationId value

isClientComponent

public final boolean isClientComponent()
Gets whether a client-side component will be generated. A component may be generated whether or not this flag is set, but if client Javascript requires the component object, this must be set to true to guarantee the component's presence. Client component objects that are generated today by default may not be present in the future; setting this flag is the only way to guarantee a component's presence, and clients cannot rely on implicit behavior. However, there is a performance cost to setting this flag, so clients should avoid turning on client components unless absolutely necessary.

Returns:
the new clientComponent value

setClientComponent

public final void setClientComponent(boolean clientComponent)
Sets whether a client-side component will be generated. A component may be generated whether or not this flag is set, but if client Javascript requires the component object, this must be set to true to guarantee the component's presence. Client component objects that are generated today by default may not be present in the future; setting this flag is the only way to guarantee a component's presence, and clients cannot rely on implicit behavior. However, there is a performance cost to setting this flag, so clients should avoid turning on client components unless absolutely necessary.

Parameters:
clientComponent - the new clientComponent value

getClientAttributes

public final java.util.Set getClientAttributes()
Gets a set of client attribute names.

Returns:
the new clientAttributes value

setClientAttributes

public final void setClientAttributes(java.util.Set clientAttributes)
Sets a set of client attribute names.

Parameters:
clientAttributes - the new clientAttributes value

getClientListeners

public final ClientListenerSet getClientListeners()
Gets a set of client listeners.

Returns:
the new clientListeners value

setClientListeners

public final void setClientListeners(ClientListenerSet clientListeners)
Sets a set of client listeners.

Parameters:
clientListeners - the new clientListeners value

getPartialTriggers

public final java.lang.String[] getPartialTriggers()
Gets the IDs of the components that should trigger a partial update. This component will listen on the trigger components. If one of the trigger components receives an event that will cause it to update in some way, this component will request to be updated too. Identifiers are relative to the source component (this component), and must account for NamingContainers. If your component is already inside of a naming container, you can use a single colon to start the search from the root of the page, or multiple colons to move up through the NamingContainers - "::" will pop out of the component's naming container (or itself if the component is a naming container) and begin the search from there, ":::" will pop out of two naming containers (including itself if the component is a naming container) and begin the search from there, etc.

Returns:
the new partialTriggers value

setPartialTriggers

public final void setPartialTriggers(java.lang.String[] partialTriggers)
Sets the IDs of the components that should trigger a partial update. This component will listen on the trigger components. If one of the trigger components receives an event that will cause it to update in some way, this component will request to be updated too. Identifiers are relative to the source component (this component), and must account for NamingContainers. If your component is already inside of a naming container, you can use a single colon to start the search from the root of the page, or multiple colons to move up through the NamingContainers - "::" will pop out of the component's naming container (or itself if the component is a naming container) and begin the search from there, ":::" will pop out of two naming containers (including itself if the component is a naming container) and begin the search from there, etc.

Parameters:
partialTriggers - the new partialTriggers value

getColorData

public final java.util.List<java.awt.Color> getColorData()
Gets the list of colors to be displayed in the standard color palette. The number of provided colors can be 49, 64 and 121, depending on the width attribute. For example, if width is 7, the number should be 49. If the number does not match the width, extra color element in the list will be ignored and missing color elements will be displayed as no-color. The color list must be of an array of type TrColor in the client side. On the server side, it must be a java.util.List of java.awt.Color objects or a java.util.List of hex color code strings (in the tag only). Customer may define their own color palette, such as show 169 color palette with width of value 13.

Returns:
the new colorData value

setColorData

public final void setColorData(java.util.List<java.awt.Color> colorData)
Sets the list of colors to be displayed in the standard color palette. The number of provided colors can be 49, 64 and 121, depending on the width attribute. For example, if width is 7, the number should be 49. If the number does not match the width, extra color element in the list will be ignored and missing color elements will be displayed as no-color. The color list must be of an array of type TrColor in the client side. On the server side, it must be a java.util.List of java.awt.Color objects or a java.util.List of hex color code strings (in the tag only). Customer may define their own color palette, such as show 169 color palette with width of value 13.

Parameters:
colorData - the new colorData value

getCustomColorData

public final java.util.List<java.awt.Color> getCustomColorData()
Gets the list of custom defined colors. The number of colors can be 7, 8, 11, equivalent to the width attribute. The color list must be of an array of type TrColor in the client side. On the server side, it must be a java.util.List of java.awt.Color objects or a java.util.List of hex color code strings (in the tag only).

Returns:
the new customColorData value

setCustomColorData

public final void setCustomColorData(java.util.List<java.awt.Color> customColorData)
Sets the list of custom defined colors. The number of colors can be 7, 8, 11, equivalent to the width attribute. The color list must be of an array of type TrColor in the client side. On the server side, it must be a java.util.List of java.awt.Color objects or a java.util.List of hex color code strings (in the tag only).

Parameters:
customColorData - the new customColorData value

getDefaultColor

public final java.awt.Color getDefaultColor()
Gets the default color. When setting using the tag it could take a type java.lang.String of hex color code.

Returns:
the new defaultColor value

setDefaultColor

public final void setDefaultColor(java.awt.Color defaultColor)
Sets the default color. When setting using the tag it could take a type java.lang.String of hex color code.

Parameters:
defaultColor - the new defaultColor value

getWidth

public final int getWidth()
Gets the width of the standard palette in cells. The supported values listed above will show the palette with 49, 64 and 121 colors respectively. In case the width is not supported values, the color palette with closest and less number of colors will be used in case customer does not define their own color palette.

Returns:
the new width value

setWidth

public final void setWidth(int width)
Sets the width of the standard palette in cells. The supported values listed above will show the palette with 49, 64 and 121 colors respectively. In case the width is not supported values, the color palette with closest and less number of colors will be used in case customer does not define their own color palette.

Parameters:
width - the new width value

isLastUsedVisible

public final boolean isLastUsedVisible()
Gets whether the Last Used button is displayed. When set to true, the Last Used Button will be rendered. Last used color information does not persist across browser sessions.

Returns:
the new lastUsedVisible value

setLastUsedVisible

public final void setLastUsedVisible(boolean lastUsedVisible)
Sets whether the Last Used button is displayed. When set to true, the Last Used Button will be rendered. Last used color information does not persist across browser sessions.

Parameters:
lastUsedVisible - the new lastUsedVisible value

isDefaultVisible

public final boolean isDefaultVisible()
Gets whether the Default button is displayed. When set to true, the Default Button will be rendered.

Returns:
the new defaultVisible value

setDefaultVisible

public final void setDefaultVisible(boolean defaultVisible)
Sets whether the Default button is displayed. When set to true, the Default Button will be rendered.

Parameters:
defaultVisible - the new defaultVisible value

isCustomVisible

public final boolean isCustomVisible()
Gets whether the Custom Color button and custom color row are displayed. When set to true, the Custom Color Button and custom color row will be rendered.

Returns:
the new customVisible value

setCustomVisible

public final void setCustomVisible(boolean customVisible)
Sets whether the Custom Color button and custom color row are displayed. When set to true, the Custom Color Button and custom color row will be rendered.

Parameters:
customVisible - the new customVisible value

getFamily

public java.lang.String getFamily()
Overrides:
getFamily in class org.apache.myfaces.trinidad.component.UIXChoose

getBeanType

protected org.apache.myfaces.trinidad.bean.FacesBean.Type getBeanType()
Overrides:
getBeanType in class org.apache.myfaces.trinidad.component.UIXChoose

Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1)
E10684-01

Copyright © 1998, 2008, Oracle. All rights reserved.