|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cosylab.gui.displayers.DisplayerUtilities
public final class DisplayerUtilities
DisplayerUtilities
contains set of usefull methods and fields
which help to implement various Displayer
interfaces.
Field Summary | |
---|---|
static java.lang.String[] |
COMMON_NUMERIC_DISPLAYER_CHARACTERISTICS
List of commonly supporter characteristics for numeric displayers (double, long). |
static java.lang.String[] |
COMMON_NUMERIC_DISPLAYER_PROPERTIES
List of commonly supported Java Bean properties for numeric displayers (double, long). |
static java.lang.String[] |
COMMON_OBJECT_DISPLAYER_CHARACTERISTICS
List of commonly supporter characteristics for object displayer. |
static java.lang.String[] |
PATTERN_DISPLAYER_CHARACTERISTICS
List of commonly supporter characteristics for numeric displayers (double, long). |
Method Summary | |
---|---|
static java.lang.String[] |
combineCharacteristics(java.lang.String[] char1,
java.lang.String charName)
Combines arrays of characteristics names with singe characteristic name in to one. |
static java.lang.String[] |
combineCharacteristics(java.lang.String[] char1,
java.lang.String[] char2)
Combines two arrays of characteristics names in to one. |
static double |
extract(int index,
double[] array)
Extracts single value from an array. |
static java.lang.String |
extract(int index,
java.lang.String[] array)
Extracts single value from an array. |
static void |
prepareNewConverter(Converter converter,
ConvertibleDisplayer disp)
This method can be used from setConverter() method from convertible displayer, which
is passed as parameter. |
static void |
prepareNewDataSource(DataSource dataSource,
ConvertibleDisplayer disp)
This method can be used from setDataSource() method from displayer, which
is passed as parameter. |
static void |
prepareNewDataSource(DataSource dataSource,
Displayer disp)
This method can be used from setDataSource() method from displayer, which
is passed as parameter. |
static void |
setCharacteristics(java.util.Map characteristics,
DoubleDisplayer disp)
Sets characteristics from Map to the displayer. |
static void |
setCharacteristics(java.util.Map characteristics,
LongDisplayer disp)
Sets characteristics from Map to the displayer. |
static void |
setCharacteristics(java.util.Map characteristics,
PatternDisplayer disp)
Sets characteristics from Map to the displayer. |
static java.lang.String |
toLongFormat(java.lang.String format)
Trys to transform double format string to long format string. |
static java.lang.String |
toString(java.lang.Object[] value)
Converts the array to string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String[] COMMON_NUMERIC_DISPLAYER_CHARACTERISTICS
public static final java.lang.String[] COMMON_NUMERIC_DISPLAYER_PROPERTIES
public static final java.lang.String[] PATTERN_DISPLAYER_CHARACTERISTICS
public static final java.lang.String[] COMMON_OBJECT_DISPLAYER_CHARACTERISTICS
Method Detail |
---|
public static final java.lang.String[] combineCharacteristics(java.lang.String[] char1, java.lang.String[] char2)
char1
- array to be combinedchar2
- array to be combined
public static final java.lang.String[] combineCharacteristics(java.lang.String[] char1, java.lang.String charName)
char1
- array to be combinedcharName
- characteeristic name to be combined
public static final void setCharacteristics(java.util.Map characteristics, DoubleDisplayer disp)
Map
to the displayer.
characteristics
- the Map with characteristicsdisp
- the displayer to which characteristics will be set
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
public static final void setCharacteristics(java.util.Map characteristics, LongDisplayer disp)
Map
to the displayer.
characteristics
- the Map with characteristicsdisp
- the displayer to which characteristics will be set
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
public static final void setCharacteristics(java.util.Map characteristics, PatternDisplayer disp)
Map
to the displayer.
characteristics
- the Map with characteristicsdisp
- the displayer to which characteristics will be set
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
public static java.lang.String toLongFormat(java.lang.String format)
format
- double prinf format string
public static void prepareNewConverter(Converter converter, ConvertibleDisplayer disp) throws java.beans.PropertyVetoException
setConverter()
method from convertible displayer, which
is passed as parameter. This method must be called before new converter was
stored in local field and after this method new converter must be stored in local field.
converter
- new converter to be set to displayerdisp
- displayer which receives new converter
java.beans.PropertyVetoException
public static void prepareNewDataSource(DataSource dataSource, ConvertibleDisplayer disp) throws java.beans.PropertyVetoException
setDataSource()
method from displayer, which
is passed as parameter. This method must be called before new datasource was
stored in local field and after this method new datasource must be stored in local field.
dataSource
- new datasource to be set to displayerdisp
- displayer which receives new converter
java.beans.PropertyVetoException
public static void prepareNewDataSource(DataSource dataSource, Displayer disp) throws java.beans.PropertyVetoException
setDataSource()
method from displayer, which
is passed as parameter. This method must be called before new datasource was
stored in local field and after this method new datasource must be stored in local field.
dataSource
- new datasource to be set to displayerdisp
- displayer which receives new converter
java.beans.PropertyVetoException
public static double extract(int index, double[] array)
index
- an index of value to returnarray
- source array
public static java.lang.String extract(int index, java.lang.String[] array)
index
- an index of value to returnarray
- source array
public static java.lang.String toString(java.lang.Object[] value)
value
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |