public class Utils
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
protected static Utils |
instance |
Singleton.
|
protected java.util.Map<java.lang.String,java.lang.String> |
lafMap |
Maps the LAF names.
|
static java.lang.String[] |
UI_IDS |
IDs of all UI delegates.
|
Modifier and Type | Method | Description |
---|---|---|
static java.lang.String |
getMethodDesc(java.lang.reflect.Method method) |
Returns JNI-compliant description of the specified method.
|
static java.lang.String |
getTypeDesc(java.lang.Class<?> clazz) |
Returns JNI-compliant description of the specified class (type).
|
java.lang.String |
getUIDelegate(java.lang.String uiKey,
java.lang.Class<?> origLafClazz) |
Returns fully-qualified class name for the UI delegate based on the
specified parameters.
|
java.lang.String |
getUIDelegate(java.lang.String uiKey,
java.lang.String lafClassName) |
Returns fully-qualified class name for the UI delegate based on the
specified parameters.
|
static Utils |
getUtils() |
Returns instance.
|
static void |
main(java.lang.String[] args) |
Test app.
|
protected java.util.Map<java.lang.String,java.lang.String> lafMap
protected static Utils instance
public static final java.lang.String[] UI_IDS
public static Utils getUtils()
public java.lang.String getUIDelegate(java.lang.String uiKey, java.lang.String lafClassName)
uiKey
- UI key.lafClassName
- Class name of the LAF.MetalLookAndFeel
, the metal delegate classname is
returned if exists; otherwise the basic delegate classname is
returned.public java.lang.String getUIDelegate(java.lang.String uiKey, java.lang.Class<?> origLafClazz)
uiKey
- UI key.origLafClazz
- LAF class.MetalLookAndFeel
, the metal delegate classname is
returned if exists; otherwise the basic delegate classname is
returned.public static java.lang.String getTypeDesc(java.lang.Class<?> clazz)
JButton[]
this function will return
[Ljavax/swing/JButton;
.clazz
- Class.public static java.lang.String getMethodDesc(java.lang.reflect.Method method)
void installUI(JButton button)
this function will
return (Ljavax/swing/JButton;)V
.method
- Method.public static void main(java.lang.String[] args)
args
-