public class TokenSubstitutionAdapter extends java.lang.Object implements TokenSubstitution
JTextField
that the end user can edit in the Title panelModifier and Type | Field and Description |
---|---|
static int |
ALL
Support all tokens.
|
protected oracle.dss.dataView.TokenSubstitutionAdapter.Variable |
date |
static int |
DATE
Support token for Date
|
protected java.lang.String |
DATE_KEY |
protected oracle.dss.dataView.TokenSubstitutionAdapter.Variable |
dim_mem |
protected java.lang.String |
DIM_MEM_KEY |
protected oracle.dss.dataView.TokenSubstitutionAdapter.Variable |
dimension |
static int |
DIMENSION
Support token for Dimension.
|
protected java.lang.String |
DIMENSION_KEY |
static int |
DIMENSION_MEMBER
Support token for Dimension_Member.
|
protected DataviewCommon |
m_dataview |
protected int |
m_item |
protected java.util.Locale |
m_locale |
protected oracle.dss.dataView.TokenSubstitutionAdapter.Variable[] |
m_variable |
protected oracle.dss.dataView.TokenSubstitutionAdapter.Variable |
member |
static int |
MEMBER
Support token for Member.
|
protected java.lang.String |
MEMBER_KEY |
protected oracle.dss.dataView.TokenSubstitutionAdapter.Variable |
page |
static int |
PAGE
Support token for Page.
|
protected java.lang.String |
PAGE_KEY |
protected oracle.dss.dataView.TokenSubstitutionAdapter.Variable |
time |
static int |
TIME
Support token for Time.
|
protected java.lang.String |
TIME_KEY |
Constructor and Description |
---|
TokenSubstitutionAdapter() |
TokenSubstitutionAdapter(DataviewCommon view)
Constructor.
|
TokenSubstitutionAdapter(ViewPrinter printer, int item)
Deprecated.
use TokenSubstitutionExtendedAdapter instead
|
Modifier and Type | Method and Description |
---|---|
protected void |
_init()
initialize member variables
|
java.lang.String |
getKey(java.lang.String listItem)
Retrieves a keyword for a list item.
|
java.lang.String |
getKeyString(java.lang.String tokenString)
Retrieves a
String that includes unlocalizable keywords instead of localizable tokens. |
java.lang.String[] |
getListItems()
Retrieves an array of items for the "Insert" drop-down list box.
|
protected java.lang.String |
getParsedKey(java.lang.String subStr)
given a key return the parsed string
|
java.lang.String |
getParsedString(java.lang.String keyString)
Retrieves a parsed
String that is displayed in the view. |
java.lang.String |
getToken(java.lang.String listItem)
Retrieves a token that corresponds to a list item.
|
java.lang.String |
getTokenString(java.lang.String keyString)
Retrieves a
String that includes localizable tokens instead of unlocalizable keywords. |
protected void |
localizeVariablesArray() |
void |
setLocale(java.util.Locale locale)
Specifies the
Locale for this TokenSubstitution . |
void |
updateResourceBundle() |
protected oracle.dss.dataView.TokenSubstitutionAdapter.Variable[] m_variable
protected DataviewCommon m_dataview
protected java.util.Locale m_locale
protected int m_item
protected final java.lang.String DIMENSION_KEY
protected final java.lang.String MEMBER_KEY
protected final java.lang.String DIM_MEM_KEY
protected final java.lang.String DATE_KEY
protected final java.lang.String TIME_KEY
protected final java.lang.String PAGE_KEY
protected oracle.dss.dataView.TokenSubstitutionAdapter.Variable dimension
protected oracle.dss.dataView.TokenSubstitutionAdapter.Variable member
protected oracle.dss.dataView.TokenSubstitutionAdapter.Variable dim_mem
protected oracle.dss.dataView.TokenSubstitutionAdapter.Variable date
protected oracle.dss.dataView.TokenSubstitutionAdapter.Variable time
protected oracle.dss.dataView.TokenSubstitutionAdapter.Variable page
public static final int DIMENSION
public static final int MEMBER
public static final int DIMENSION_MEMBER
public static final int DATE
public static final int TIME
public static final int PAGE
public static final int ALL
public TokenSubstitutionAdapter()
public TokenSubstitutionAdapter(ViewPrinter printer, int item)
printer
-item
-public TokenSubstitutionAdapter(DataviewCommon view)
view
- The DataviewCommon
for which this adapter provides token substitution support.public java.lang.String[] getListItems()
getListItems
in interface BaseTokenSubstitution
public java.lang.String getToken(java.lang.String listItem)
JTextField
. The token usually includes an indicator that it will be replaced in the actual view. For example, if the list item is "Dimension", the token is "&Dimension". The UI places this token in the text field with any other text. For example, the text field might then display "Sales by &Dimension".getToken
in interface BaseTokenSubstitution
listItem
- The list item that the user selected from the drop-down list.JTextField
. If listItem
does not contain any items in the array that getListItems
returns, then this method returns null
.public java.lang.String getKeyString(java.lang.String tokenString)
String
that includes unlocalizable keywords instead of localizable tokens. When the view saves itself in XML, it uses this string to identify the text that it represents. Currently, this key string is also passed to setText
methods in graph components. If you present your own UI that allows token substitution, and you call setText
methods, you should call this method in your implementation of this interface to get the String
to pass to setText
.getKeyString
in interface BaseTokenSubstitution
tokenString
- The String
that the JTextField
displays. This is the String
that the user has entered into the text field, including any tokens for replaceable text.String
that has unlocalizable keys instead of any localizable tokens. If tokenString
does not contain any tokens, then this method returns tokenString
.public java.lang.String getTokenString(java.lang.String keyString)
String
that includes localizable tokens instead of unlocalizable keywords. The String
that this method returns is displayed in the JTextField
. The view calls this method when it applies XML that includes a setting for the Text
property. The view uses the key string as the Text
value in XML.getTokenString
in interface BaseTokenSubstitution
keyString
- The String
that can include unlocalizable keys.String
that contains localizable tokens instead of any keys in keyString
. If keyString
does not include any tokens, then this method returns keyString
.public java.lang.String getParsedString(java.lang.String keyString)
String
that is displayed in the view. The String
that this method returns has replacement text in place of the keys in keyString
. The setText
methods in a graph call this method to retrieve the text to display in the graph text component. If you call setText
, be sure to pass a key string and not a token string.getParsedString
in interface BaseTokenSubstitution
keyString
- The string
that the view stores as the setting of the Text
property.String
that contains localized text instead of any keys in keyString
. If keyString
does not include any keys, then this method returns keyString
.getKeyString(java.lang.String)
public java.lang.String getKey(java.lang.String listItem)
String
. This method is not used in the 1.5 graph.getKey
in interface BaseTokenSubstitution
listItem
- A String
that represents a list item from the drop-down "Insert" list.String
.protected java.lang.String getParsedKey(java.lang.String subStr)
protected void _init()
public void setLocale(java.util.Locale locale)
Locale
for this TokenSubstitution
.setLocale
in interface BaseTokenSubstitution
locale
- The Locale
for this TokenSubstitution
.public void updateResourceBundle()
protected void localizeVariablesArray()