Package org.pushingpixels.lafwidget.ant
Class Utils
java.lang.Object
org.pushingpixels.lafwidget.ant.Utils
Utility functions.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetMethodDesc(Method method) Returns JNI-compliant description of the specified method.static StringgetTypeDesc(Class<?> clazz) Returns JNI-compliant description of the specified class (type).getUIDelegate(String uiKey, Class<?> origLafClazz) Returns fully-qualified class name for the UI delegate based on the specified parameters.getUIDelegate(String uiKey, String lafClassName) Returns fully-qualified class name for the UI delegate based on the specified parameters.static UtilsgetUtils()Returns instance.static voidTest app.
-
Field Details
-
lafMap
Maps the LAF names. -
instance
Singleton. -
UI_IDS
IDs of all UI delegates.
-
-
Method Details
-
getUtils
Returns instance.- Returns:
- Instance.
-
getUIDelegate
Returns fully-qualified class name for the UI delegate based on the specified parameters.- Parameters:
uiKey- UI key.lafClassName- Class name of the LAF.- Returns:
- Fully-qualified class name for the UI delegate. The LAF hierarchy
is searched starting from the specified class name and up. For
example, if the second parameter points to
MetalLookAndFeel, the metal delegate classname is returned if exists; otherwise the basic delegate classname is returned.
-
getUIDelegate
Returns fully-qualified class name for the UI delegate based on the specified parameters.- Parameters:
uiKey- UI key.origLafClazz- LAF class.- Returns:
- Fully-qualified class name for the UI delegate. The LAF hierarchy
is searched starting from the specified class and up. For
example, if the second parameter points to
MetalLookAndFeel, the metal delegate classname is returned if exists; otherwise the basic delegate classname is returned.
-
getTypeDesc
Returns JNI-compliant description of the specified class (type). For example, forJButton[]this function will return[Ljavax/swing/JButton;.- Parameters:
clazz- Class.- Returns:
- JNI-compliant class (type) description.
-
getMethodDesc
Returns JNI-compliant description of the specified method. For example, forvoid installUI(JButton button)this function will return(Ljavax/swing/JButton;)V.- Parameters:
method- Method.- Returns:
- JNI-compliant method description.
-
main
Test app.- Parameters:
args-
-