com.sas.swing.visuals.dataselectors
Class Util

com.sas.swing.visuals.dataselectors.Util

public class Util

Utility class to hold static, re-usable methods uses by Selectors.

Since:
3.1

Field Summary
static java.lang.String RB_KEY
           
 
Constructor Summary
Util()
           
 
Method Summary
static javax.swing.ComboBoxModel getKeysComboModel(java.util.Map map)
          Given a Map returns a ComboBoxModel containing the keys of the map.
static javax.swing.ComboBoxModel getValuesComboModel(java.util.Map map)
          Given a Map returns a ComboBoxModel containing the values of the map.
static java.lang.String localizeBasedOnMeasureDesc(java.lang.String measureDesc, java.lang.String[] whereClauses)
          Using the JVM locale, generates a localized description of a based on measure with where clauses applied.
static java.lang.String localizeBasedOnMeasureDesc(java.lang.String measureDesc, java.lang.String[] whereClauses, java.util.Locale locale)
          Generates a localized description of a based on measure with where clauses applied.
static java.lang.String localizeRankStatus(java.lang.String rankOrder, int rankValue, java.lang.String rankType, boolean isIncludeTies)
          Deprecated. use getLocalizedRankStatus() instead
static java.lang.String localizeRankStatus(java.lang.String rankOrder, int rankValue, java.lang.String rankType, boolean isIncludeTies, java.lang.String byRankName)
          Deprecated. use getLocalizedRankStatus() instead
static java.lang.String localizeRankStatus(java.lang.String rankOrder, int rankValue, java.lang.String rankType, boolean isIncludeTies, java.lang.String byRankName, java.util.Locale locale)
          Deprecated. use getLocalizedRankStatus() instead
static java.lang.String localizeRankStatus(java.lang.String rankOrder, int rankValue, java.lang.String rankType, java.lang.String isIncludeTies, java.lang.String byRankName)
          Deprecated. use getLocalizedRankStatus() instead
static java.lang.String localizeRankStatus(java.lang.String rankOrder, int rankValue, java.lang.String rankType, java.lang.String isIncludeTies, java.lang.String byRankName, java.util.Locale locale)
          Deprecated. use getLocalizedRankStatus() instead
static java.lang.String localizeWhereClause(java.lang.String dataItemDescription, java.lang.String whereClauseDescription)
          Using the JVM locale, generates a localized description of a where clause.
static java.lang.String localizeWhereClause(java.lang.String dataItemDescription, java.lang.String whereClauseDescription, java.util.Locale locale)
          Generates a localized description of a where clause.
 

Field Detail

RB_KEY

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

Util

public Util()
Method Detail

getKeysComboModel

public static javax.swing.ComboBoxModel getKeysComboModel(java.util.Map map)
Given a Map returns a ComboBoxModel containing the keys of the map.

Parameters:
map - The Map to read
Returns:
a ComboBoxModel containing the keys of the map
See Also:
Map, ComboBoxModel

getValuesComboModel

public static javax.swing.ComboBoxModel getValuesComboModel(java.util.Map map)
Given a Map returns a ComboBoxModel containing the values of the map.

Parameters:
map - The Map to read
Returns:
a ComboBoxModel containing the values of the map
See Also:
Map, ComboBoxModel

localizeRankStatus

public static java.lang.String localizeRankStatus(java.lang.String rankOrder,
                                                  int rankValue,
                                                  java.lang.String rankType,
                                                  boolean isIncludeTies,
                                                  java.lang.String byRankName)
Deprecated. use getLocalizedRankStatus() instead

Given a set of ranking parameters and using the JVM locale, returns a localized string containing the description of the ranking.

Parameters:
rankOrder - either Top or Bottom
rankValue - how much to rank
rankType - either Count Percent or Sum
isIncludeTies - true if the ties must be included, false otherwise
byRankName - the name of the measure on which the rank is based on
Returns:
a localized string containing the description of the ranking

localizeRankStatus

public static java.lang.String localizeRankStatus(java.lang.String rankOrder,
                                                  int rankValue,
                                                  java.lang.String rankType,
                                                  boolean isIncludeTies,
                                                  java.lang.String byRankName,
                                                  java.util.Locale locale)
Deprecated. use getLocalizedRankStatus() instead

Given a set of ranking parameters and a locale returns a localized string containing the description of the ranking. If the locale is null the JVM locale is used.

Parameters:
rankOrder - either Top or Bottom (comes in already localized)
rankValue - how much to rank
rankType - either Count Percent or Sum (comes in already localized)
isIncludeTies - true if the ties must be included, false otherwise
byRankName - the name of the measure on which the rank is based on
locale - the locale to use to localize the string to be returned
Returns:
a localized string containing the description of the ranking

localizeRankStatus

public static java.lang.String localizeRankStatus(java.lang.String rankOrder,
                                                  int rankValue,
                                                  java.lang.String rankType,
                                                  boolean isIncludeTies)
Deprecated. use getLocalizedRankStatus() instead

Given a set of ranking parameters and using the JVM locale, returns a localized string containing the description of the ranking.

Parameters:
rankOrder - either Top or Bottom
rankValue - how much to rank
rankType - either Count Percent or Sum
isIncludeTies - true if the ties must be included, false otherwise
Returns:
a localized string containing the description of the ranking

localizeRankStatus

public static java.lang.String localizeRankStatus(java.lang.String rankOrder,
                                                  int rankValue,
                                                  java.lang.String rankType,
                                                  java.lang.String isIncludeTies,
                                                  java.lang.String byRankName)
Deprecated. use getLocalizedRankStatus() instead

Given a set of ranking parameters and using the JVM locale, returns a localized string containing the description of the ranking.

Parameters:
rankOrder - typically Top or Bottom
rankValue - how much to rank
rankType - typically Count Percent or Sum
isIncludeTies - either one of the following: RankingSelectorComponents.INCLUDE_TIES, RankingSelectorComponents.NOT_INCLUDE_TIES, RankingSelectorComponents.TIES_NOT_APPLICABLE
byRankName - the name of the measure on which the rank is based on
Returns:
a localized string containing the description of the ranking

localizeRankStatus

public static java.lang.String localizeRankStatus(java.lang.String rankOrder,
                                                  int rankValue,
                                                  java.lang.String rankType,
                                                  java.lang.String isIncludeTies,
                                                  java.lang.String byRankName,
                                                  java.util.Locale locale)
Deprecated. use getLocalizedRankStatus() instead

Given a set of ranking parameters and a locale returns a localized string containing the description of the ranking. If the locale is null the JVM locale is used.

Parameters:
rankOrder - typically Top or Bottom (comes in already localized)
rankValue - how much to rank
rankType - typically Count Percent or Sum (comes in already localized)
isIncludeTies - either one of the following: RankingSelectorComponents.INCLUDE_TIES, RankingSelectorComponents.NOT_INCLUDE_TIES, RankingSelectorComponents.TIES_NOT_APPLICABLE
byRankName - the name of the measure on which the rank is based on
locale - the locale to use to localize the string to be returned
Returns:
a localized string containing the description of the ranking

localizeBasedOnMeasureDesc

public static java.lang.String localizeBasedOnMeasureDesc(java.lang.String measureDesc,
                                                          java.lang.String[] whereClauses)
Using the JVM locale, generates a localized description of a based on measure with where clauses applied. Used by the Ranking Selector.

Parameters:
measureDesc - the description of the based on measure
whereClauses - the already localized set of where clauses
Returns:
String localized description of a based on measure with where clauses applied Something like: ACTUAL_SUM ( for 1994 SOFA)

localizeBasedOnMeasureDesc

public static java.lang.String localizeBasedOnMeasureDesc(java.lang.String measureDesc,
                                                          java.lang.String[] whereClauses,
                                                          java.util.Locale locale)
Generates a localized description of a based on measure with where clauses applied. Used by the Ranking Selector.

Parameters:
measureDesc - the description of the based on measure
whereClauses - the already localized set of where clauses
locale - the locale to use to localize the string to be returned
Returns:
the localized description of a based on measure with where clauses applied Something like: ACTUAL_SUM ( for 1994 SOFA)

localizeWhereClause

public static java.lang.String localizeWhereClause(java.lang.String dataItemDescription,
                                                   java.lang.String whereClauseDescription)
Using the JVM locale, generates a localized description of a where clause. Used by the Ranking Selector.

Parameters:
dataItemDescription - the description of the DataItem which the where clause applies to (like Time)
whereClauseDescription - the description of the where clause applied to the DataItem (like Jan)
Returns:
String the localized description of a where clause Something like: Time=Jan

localizeWhereClause

public static java.lang.String localizeWhereClause(java.lang.String dataItemDescription,
                                                   java.lang.String whereClauseDescription,
                                                   java.util.Locale locale)
Generates a localized description of a where clause. Used by the Ranking Selector.

Parameters:
dataItemDescription - the description of the DataItem which the where clause applies to (like Time)
whereClauseDescription - the description of the where clause applied to the DataItem (like Jan)
locale - the locale to use to localize the string to be returned
Returns:
the localized description of a where clause Something like: Time=Jan



Copyright © 2009 SAS Institute Inc. All Rights Reserved.