Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1.4.0)

E12063-05

oracle.dss.dataView
Class UIDataviewAdapter

java.lang.Object
  extended by oracle.dss.util.PagingControlAttributesAdapter
      extended by oracle.dss.dataView.UIDataviewAdapter
All Implemented Interfaces:
DataviewCommon, UIDataview, UIView, ComponentTypeConverter, PagingControlAttributes

public abstract class UIDataviewAdapter
extends PagingControlAttributesAdapter
implements UIDataview, DataviewCommon

Adapter class for the UIDataview interface. Create an instance of a concrete subclass of this proxy class so that the UI panels can be displayed before a view is constructed.


Field Summary
protected  boolean m_customColorsEnabled
           
protected  DataviewTitles m_dataViewFootnote
           
protected  DataviewTitles m_dataViewSubtitle
           
protected  DataviewTitles m_dataViewTitle
           
protected  ErrorHandler m_errorHandler
           
protected  javax.swing.event.EventListenerList m_listenerList
           
protected  java.util.Locale m_locale
           
protected  ComponentHandle m_selectedObject
           
protected  TokenSubstitution m_token
           
 
Fields inherited from class oracle.dss.util.PagingControlAttributesAdapter
m_bPagingControlVisible
 
Constructor Summary
UIDataviewAdapter()
          Constructor.
UIDataviewAdapter(UIDataview view)
          Constructor that initializes this adapter from an existing view or proxy.
 
Method Summary
 void addControllerListener(ControllerListener l)
          Adds a listener for user gestures that do not affect data, such as selecting or resizing a component.
protected  void applyTitleAttributes(UIDataview toView)
           
 void applyToDataview(UIDataview view)
          Applies properties of this adapter to a UIDataview.
protected  void cleanUp()
           
static void clearPropertyOverrideFlag(int attrID, java.util.BitSet overrideFlags)
           
 int convertComponentTypeToInteger(java.lang.String type)
          Retrieves an integer representation of a view component, from a String.
 java.lang.String convertComponentTypeToString(int type)
          Retrieves a String representation of a view component, from an integer.
 java.util.BitSet createPropertyOverrideFlags(int maxID)
           
 void dataFormatChanged()
           
 void dataStyleChanged()
           
protected  void fireComponentSelected(java.lang.Object source, ComponentHandle id)
           
protected  boolean fireComponentSelecting(java.lang.Object source, ComponentHandle id)
           
 DataSource getDataSource()
          Retrieves the data source for this view.
 DataviewTitles getDataviewFootnote()
          Retrieves the Footnote component for this adapter.
 DataviewTitles getDataviewSubtitle()
          Retrieves the Subtitle component for this adapter.
 DataviewTitles getDataviewTitle()
          Retrieves the Title component for this adapter.
 ErrorHandler getErrorHandler()
          Retrieves the current error handler for this view.
 FontList getFontList()
           
 int getHTMLPagingControlWidth()
          Retrieves the number of page items that are displayed before the paging control wraps.
 java.lang.String getIntlString(java.lang.String key)
           
 java.lang.String getIntlString(java.lang.String key, java.util.ResourceBundle rBundle)
           
 java.lang.String getLayerMetadataLabelType(int edge)
          Retrieves the type of labels to display for dimension names on the specified edge.
 java.util.Locale getLocale()
          Retrieves the Locale that this UIDataviewAdapter uses.
 java.lang.String getMemberMetadataLabelType(int edge)
          Retrieves the type of labels to display for dimension members on the specified edge.
 Model getModel()
          Retrieves the model for this view.
 ComponentHandle getSelectedObject()
          Retrieves the selected component.
 TokenSubstitution getTokenSubstitution()
          Retrieves the handler for token substitution in this view.
abstract  int getViewType()
          Get the specific type of the view that this adapter represents.
 WaitData getWaitDataForRow(int row)
           
 int getZoomFactor()
          Retrieves the default zoom factor for this view.
 void initFromDataview(UIDataview view)
          Initializes the properties of this adapter from a UIDataview.
protected  void initTitleAttributes(UIDataview fromView)
           
 boolean isCustomColorsEnabled()
          Return if the custom color option is enabled on all color choice pickers
 boolean isDataUnformattedSupported()
           
 boolean isDataViewFormatSupported()
           
 boolean isHTMLPagingControlAutosubmit()
          Indicates whether paging control changes are automatically submitted.
 boolean isLayerMetadataLabelTypeSupported(java.lang.String type)
           
 boolean isLayerMetaShortLabelSupported()
           
 boolean isLayerMetaViewStyleSupported()
           
 boolean isMemberMetadataLabelTypeSupported(java.lang.String type)
           
 boolean isMetadataShortLabelSupported()
           
 boolean isMetadataViewStyleSupported()
           
 boolean isPropertyOverrideFlag(int attrID, java.util.BitSet overrideFlags)
           
protected  boolean isStyleOverrideMode()
           
protected  boolean isUserOverrideMode()
           
 void metadataStyleChanged()
           
 void removeControllerListener(ControllerListener l)
          Removes a listener for user gestures that do not affect data.
 void repaint()
           
 java.awt.Font scaleFont(java.awt.Font f, int zoomFactor)
           
 boolean selectObject(ComponentHandle handle)
          Sets the selected component.
 void setCustomColorsEnabled(boolean enabled)
          Set custom color option enabled on all color choice pickers
 void setDataSource(DataSource ds)
          Specifies the data source for this view.
 void setHTMLPagingControlAutosubmit(boolean autosubmit)
          Specifies whether paging control changes are automatically submitted.
 void setHTMLPagingControlWidth(int width)
          Specifies the number of page items that are displayed before the paging control wraps to a new line.
 void setLocale(java.util.Locale loc)
          Sets the Locale that this UIDataviewAdapter uses.
 void setPropertyOverrideFlags(int attrID, java.util.BitSet userFlags, java.util.BitSet styleFlags)
           
protected  void setStyleOverrideMode(boolean flag)
           
 void setTokenSubstitution(TokenSubstitution token)
          Specifies a handler for token substitution in this view.
protected  void setUserOverrideMode(boolean flag)
           
 void setWaitDataForRow(int row, WaitData waitData)
           
 
Methods inherited from class oracle.dss.util.PagingControlAttributesAdapter
applyToPagingControlAttributes, initFromPagingControlAttributes, isPagingControlVisible, setPagingControlVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface oracle.dss.util.PagingControlAttributes
isPagingControlVisible, setPagingControlVisible
 
Methods inherited from interface oracle.dss.dataView.DataviewCommon
isPagingControlVisible, setPagingControlVisible
 

Field Detail

m_dataViewTitle

protected DataviewTitles m_dataViewTitle

m_dataViewSubtitle

protected DataviewTitles m_dataViewSubtitle

m_dataViewFootnote

protected DataviewTitles m_dataViewFootnote

m_locale

protected java.util.Locale m_locale

m_selectedObject

protected ComponentHandle m_selectedObject

m_listenerList

protected javax.swing.event.EventListenerList m_listenerList

m_token

protected TokenSubstitution m_token

m_errorHandler

protected ErrorHandler m_errorHandler

m_customColorsEnabled

protected boolean m_customColorsEnabled
Constructor Detail

UIDataviewAdapter

public UIDataviewAdapter()
Constructor.


UIDataviewAdapter

public UIDataviewAdapter(UIDataview view)
Constructor that initializes this adapter from an existing view or proxy.

Parameters:
view - The UIDataview to initialize this adapter from.
Method Detail

initFromDataview

public void initFromDataview(UIDataview view)
Initializes the properties of this adapter from a UIDataview. The view's Locale and SelectedObject will be set on this adapter. This method calls the initFromPagingControlAttributes method of the superclass.

Parameters:
view - The UIDataview to initialize this adapter from.

applyToDataview

public void applyToDataview(UIDataview view)
Applies properties of this adapter to a UIDataview. This method calls the applyToPagingControlAttributes method of the superclass.

Parameters:
view - The view to apply properties of this adapter to.

getLocale

public java.util.Locale getLocale()
Retrieves the Locale that this UIDataviewAdapter uses.

Specified by:
getLocale in interface DataviewCommon
Specified by:
getLocale in interface UIView
Returns:
loc The Locale for this UIDataviewAdapter.

setLocale

public void setLocale(java.util.Locale loc)
Sets the Locale that this UIDataviewAdapter uses.

Parameters:
loc - The Locale for this UIDataviewAdapter.

getSelectedObject

public ComponentHandle getSelectedObject()
Retrieves the selected component.

Specified by:
getSelectedObject in interface UIView
Returns:
A handle for the selected component. The return value should actually be a concrete subclass of ComponentHandle.

getDataviewTitle

public DataviewTitles getDataviewTitle()
Retrieves the Title component for this adapter.

Specified by:
getDataviewTitle in interface DataviewCommon
Specified by:
getDataviewTitle in interface UIDataview
Returns:
The Title component for this adapter.

getDataviewSubtitle

public DataviewTitles getDataviewSubtitle()
Retrieves the Subtitle component for this adapter.

Specified by:
getDataviewSubtitle in interface DataviewCommon
Specified by:
getDataviewSubtitle in interface UIDataview
Returns:
The Subtitle component for this adapter.

getDataviewFootnote

public DataviewTitles getDataviewFootnote()
Retrieves the Footnote component for this adapter.

Specified by:
getDataviewFootnote in interface DataviewCommon
Specified by:
getDataviewFootnote in interface UIDataview
Returns:
The Footnote component for this adapter.

selectObject

public boolean selectObject(ComponentHandle handle)
Sets the selected component.

Parameters:
handle - A handle for the selected component. The parameter should actually be a concrete subclass of ComponentHandle.
Returns:
true if the component is successfully selected, false if selection fails.

addControllerListener

public void addControllerListener(ControllerListener l)
Adds a listener for user gestures that do not affect data, such as selecting or resizing a component.

Specified by:
addControllerListener in interface UIView
Parameters:
l - The listener to add.
See Also:
ControllerListener.componentSelected(oracle.dss.dataView.ControllerEvent), ControllerListenerAdapter

removeControllerListener

public void removeControllerListener(ControllerListener l)
Removes a listener for user gestures that do not affect data.

Specified by:
removeControllerListener in interface UIView
Parameters:
l - The listener to remove.

getViewType

public abstract int getViewType()
Get the specific type of the view that this adapter represents. Subclasses of this class implement this method to return the specific type of view.

Specified by:
getViewType in interface DataviewCommon
Specified by:
getViewType in interface UIView
Returns:
A constant that represents the specific type of view.
See Also:
DataviewConstants.VIEW_TYPE_CROSSTAB, DataviewConstants.VIEW_TYPE_GRAPH, DataviewConstants.VIEW_TYPE_TABLE

setTokenSubstitution

public void setTokenSubstitution(TokenSubstitution token)
Specifies a handler for token substitution in this view. Token substitution handlers make it possible for users to insert tokens (such as a token for the current dimension member) in the title, subtitle, and footnote of this view. Most application developers will use the default TokenSubstitution. You need to call this method only if you provide your own handler for allowing users to insert tokens.

Specified by:
setTokenSubstitution in interface DataviewCommon
Specified by:
setTokenSubstitution in interface UIDataview
Parameters:
token - The token substitution handler for this view.

getTokenSubstitution

public TokenSubstitution getTokenSubstitution()
Retrieves the handler for token substitution in this view. Token substitution handlers make it possible for users to insert tokens (such as a token for the current dimension member) in the title, subtitle, and footnote of this view. Most application developers will use the default TokenSubstitution.

Specified by:
getTokenSubstitution in interface DataviewCommon
Specified by:
getTokenSubstitution in interface UIDataview
Returns:
The token substitution handler for this view. By default, this is a TokenSubstitutionAdapter.

getErrorHandler

public ErrorHandler getErrorHandler()
Description copied from interface: DataviewCommon
Retrieves the current error handler for this view.

Specified by:
getErrorHandler in interface DataviewCommon
Returns:
The current error handler for this view.

getFontList

public FontList getFontList()
Specified by:
getFontList in interface DataviewCommon
Returns:
The current font cache list.

getZoomFactor

public int getZoomFactor()
Retrieves the default zoom factor for this view. This number serves as the reference point for calls to the scaleFont method.

Specified by:
getZoomFactor in interface DataviewCommon
Returns:
The default zoom factor for this view.

scaleFont

public java.awt.Font scaleFont(java.awt.Font f,
                               int zoomFactor)
Specified by:
scaleFont in interface DataviewCommon
Parameters:
f - The font to scale.
zoomFactor - The percent of the default zoom factor to make the font. For example, to double the size of the font, pass 2 * (getZoomFactor()).

getIntlString

public java.lang.String getIntlString(java.lang.String key)
Specified by:
getIntlString in interface DataviewCommon
Parameters:
key - the String that needs to be translated.
Returns:
the translated String

getIntlString

public java.lang.String getIntlString(java.lang.String key,
                                      java.util.ResourceBundle rBundle)
Specified by:
getIntlString in interface DataviewCommon
Parameters:
key - the String that needs to be translated.
rBundle - the bundle to look in
Returns:
the translated String.

isLayerMetaShortLabelSupported

public boolean isLayerMetaShortLabelSupported()
Specified by:
isLayerMetaShortLabelSupported in interface DataviewCommon

isLayerMetaViewStyleSupported

public boolean isLayerMetaViewStyleSupported()
Specified by:
isLayerMetaViewStyleSupported in interface DataviewCommon

isMetadataViewStyleSupported

public boolean isMetadataViewStyleSupported()
Specified by:
isMetadataViewStyleSupported in interface DataviewCommon
Returns:
true if METADATA_VIEWSTYLE is supported, else false

isMetadataShortLabelSupported

public boolean isMetadataShortLabelSupported()
Specified by:
isMetadataShortLabelSupported in interface DataviewCommon

isDataUnformattedSupported

public boolean isDataUnformattedSupported()
Specified by:
isDataUnformattedSupported in interface DataviewCommon

isDataViewFormatSupported

public boolean isDataViewFormatSupported()
Specified by:
isDataViewFormatSupported in interface DataviewCommon
Returns:
true if DATA_VIEWFORMAT is supported, else false

isMemberMetadataLabelTypeSupported

public boolean isMemberMetadataLabelTypeSupported(java.lang.String type)
Specified by:
isMemberMetadataLabelTypeSupported in interface DataviewCommon
Parameters:
type - type of member metadata label
Returns:
true if the type is supported, false if not

isLayerMetadataLabelTypeSupported

public boolean isLayerMetadataLabelTypeSupported(java.lang.String type)
Specified by:
isLayerMetadataLabelTypeSupported in interface DataviewCommon
Parameters:
type - type of layer metadata label
Returns:
true if the type is supported, false if not

getLayerMetadataLabelType

public java.lang.String getLayerMetadataLabelType(int edge)
Retrieves the type of labels to display for dimension names on the specified edge. This method always returns the default label type, which is LAYER_METADATA_LONGLABEL.

Specified by:
getLayerMetadataLabelType in interface DataviewCommon
Parameters:
edge - A constant that represents the edge for which to get the metadata label type. Valid constants are listed in the See Also section, and they end with "EDGE".
Returns:
A constant that represents the type of layer metadata label to show. Valid constants are listed in the See Also section, and they begin with "LAYER_METADATA".
See Also:
DataDirector.COLUMN_EDGE, DataDirector.ROW_EDGE, DataDirector.PAGE_EDGE, LayerMetadataMap.LAYER_METADATA_LONGLABEL, LayerMetadataMap.LAYER_METADATA_MEDIUMLABEL, LayerMetadataMap.LAYER_METADATA_SHORTLABEL, LayerMetadataMap.LAYER_METADATA_NAME

getMemberMetadataLabelType

public java.lang.String getMemberMetadataLabelType(int edge)
Retrieves the type of labels to display for dimension members on the specified edge. This method always returns the default label type, which is METADATA_LONGLABEL.

Specified by:
getMemberMetadataLabelType in interface DataviewCommon
Parameters:
edge - A constant that represents the edge for which to get the metadata label type. Valid constants are listed in the See Also section, and they end with "EDGE".
Returns:
A constant that represents the type of metadata label to display. Valid constants are listed in the See Also section, and they begin with "METADATA".
See Also:
DataDirector.COLUMN_EDGE, DataDirector.ROW_EDGE, DataDirector.PAGE_EDGE, MetadataMap.METADATA_LONGLABEL, MetadataMap.METADATA_MEDIUMLABEL, MetadataMap.METADATA_SHORTLABEL, MetadataMap.METADATA_VALUE

repaint

public void repaint()
Specified by:
repaint in interface DataviewCommon

metadataStyleChanged

public void metadataStyleChanged()
Specified by:
metadataStyleChanged in interface DataviewCommon

dataStyleChanged

public void dataStyleChanged()
Specified by:
dataStyleChanged in interface DataviewCommon

dataFormatChanged

public void dataFormatChanged()
Specified by:
dataFormatChanged in interface DataviewCommon

getWaitDataForRow

public WaitData getWaitDataForRow(int row)
Specified by:
getWaitDataForRow in interface DataviewCommon
Parameters:
row - The index of the row that you want to know about.
Returns:
If the specified row is waiting for data, then this method will return a WaitData object for the row, otherwise this method will return null.

setWaitDataForRow

public void setWaitDataForRow(int row,
                              WaitData waitData)
Specified by:
setWaitDataForRow in interface DataviewCommon
Parameters:
row - The index of the row that is waiting for data.
waitData - The WaitData object that you want to use to display a message in each cell on the row.

getModel

public Model getModel()
Retrieves the model for this view.

Specified by:
getModel in interface DataviewCommon
Specified by:
getModel in interface UIView
Returns:
null.

convertComponentTypeToInteger

public int convertComponentTypeToInteger(java.lang.String type)
Retrieves an integer representation of a view component, from a String.

Specified by:
convertComponentTypeToInteger in interface ComponentTypeConverter
Parameters:
The - constant for a view component.
Returns:
0.

convertComponentTypeToString

public java.lang.String convertComponentTypeToString(int type)
Retrieves a String representation of a view component, from an integer.

Specified by:
convertComponentTypeToString in interface ComponentTypeConverter
Parameters:
type - An identifier for a view component.
Returns:
null.

setHTMLPagingControlAutosubmit

public void setHTMLPagingControlAutosubmit(boolean autosubmit)
Description copied from interface: DataviewCommon
Specifies whether paging control changes are automatically submitted. By default, these changes are not submitted automatically. This property is used for the thin beans only.

Specified by:
setHTMLPagingControlAutosubmit in interface DataviewCommon
Parameters:
autosubmit - true, if autosubmit is enabled, and false if autosubmit is disabled

isHTMLPagingControlAutosubmit

public boolean isHTMLPagingControlAutosubmit()
Description copied from interface: DataviewCommon
Indicates whether paging control changes are automatically submitted. This property is used for the thin beans only.

Specified by:
isHTMLPagingControlAutosubmit in interface DataviewCommon
Returns:
true, if autosubmit is enabled, and false if autosubmit is disabled

setHTMLPagingControlWidth

public void setHTMLPagingControlWidth(int width)
Description copied from interface: DataviewCommon
Specifies the number of page items that are displayed before the paging control wraps to a new line. The default value is 3. This property is used for the thin beans only.

Specified by:
setHTMLPagingControlWidth in interface DataviewCommon
Parameters:
width - the number of page items to display before wrapping

getHTMLPagingControlWidth

public int getHTMLPagingControlWidth()
Description copied from interface: DataviewCommon
Retrieves the number of page items that are displayed before the paging control wraps. This property is used for the thin beans only.

Specified by:
getHTMLPagingControlWidth in interface DataviewCommon
Returns:
the number of page items to display before wrapping

applyTitleAttributes

protected void applyTitleAttributes(UIDataview toView)

initTitleAttributes

protected void initTitleAttributes(UIDataview fromView)

fireComponentSelecting

protected boolean fireComponentSelecting(java.lang.Object source,
                                         ComponentHandle id)
Parameters:
source - the source of the event (usually this adapter)
id - the ComponentHandle of the object being selected
Returns:
false if user consumes event, otherwise true

fireComponentSelected

protected void fireComponentSelected(java.lang.Object source,
                                     ComponentHandle id)
Parameters:
source - the source of this event (usually this adapter)
id - the ComponentHandle of the object being selected

setDataSource

public void setDataSource(DataSource ds)
Specifies the data source for this view. This implementation does nothing.

Specified by:
setDataSource in interface DataviewCommon
Parameters:
ds - The data source for this view.

getDataSource

public DataSource getDataSource()
Retrieves the data source for this view.

Specified by:
getDataSource in interface DataviewCommon
Returns:
null.

cleanUp

protected void cleanUp()

createPropertyOverrideFlags

public java.util.BitSet createPropertyOverrideFlags(int maxID)
Specified by:
createPropertyOverrideFlags in interface DataviewCommon

setPropertyOverrideFlags

public void setPropertyOverrideFlags(int attrID,
                                     java.util.BitSet userFlags,
                                     java.util.BitSet styleFlags)
Specified by:
setPropertyOverrideFlags in interface DataviewCommon

isPropertyOverrideFlag

public boolean isPropertyOverrideFlag(int attrID,
                                      java.util.BitSet overrideFlags)
Specified by:
isPropertyOverrideFlag in interface DataviewCommon

clearPropertyOverrideFlag

public static void clearPropertyOverrideFlag(int attrID,
                                             java.util.BitSet overrideFlags)

setCustomColorsEnabled

public void setCustomColorsEnabled(boolean enabled)
Set custom color option enabled on all color choice pickers

Specified by:
setCustomColorsEnabled in interface UIView
Parameters:
enabled - true to enable custom color option on all color choice pickers false to disable it

isCustomColorsEnabled

public boolean isCustomColorsEnabled()
Return if the custom color option is enabled on all color choice pickers

Specified by:
isCustomColorsEnabled in interface UIView
Returns:
true custom color option is enabled on all color choice pickers false custom color option is disabled

setStyleOverrideMode

protected void setStyleOverrideMode(boolean flag)

isStyleOverrideMode

protected boolean isStyleOverrideMode()

setUserOverrideMode

protected void setUserOverrideMode(boolean flag)

isUserOverrideMode

protected boolean isUserOverrideMode()

Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1.4.0)

E12063-05

Copyright © 1997, 2011, Oracle. All rights reserved.