public class WidgetStyle extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
getStyleModifier(String widgetStyle,
String target)
Get the modifying value for a given style attribute in a style declaration.
|
static String[] |
getStyleModifiers(String widgetStyle,
String target)
Get an array of all modifying values for a given style attribute.
|
static boolean |
isStyle(ModuleItem<?> item,
String target)
Check whether a given
ModuleItem has the target style. |
static boolean |
isStyle(String widgetStyle,
String target)
Check whether a given widget style contains the target style.
|
public static boolean isStyle(String widgetStyle, String target)
widgetStyle - The style declaration to test, usually a comma-separated
String; trailing spaces are ignored.target - The style being checked, case-insensitive.true if the target style matches.public static boolean isStyle(ModuleItem<?> item, String target)
ModuleItem has the target style.item - The module item to test.target - The style being checked, case-insensitive.true if the module item has the target style.public static String getStyleModifier(String widgetStyle, String target)
For example, for style="format:#0.00", this will return
"#0.00".
widgetStyle - The style declaration string, e.g. "format:#0.00".target - The target style attribute, e.g. "format"."#0.00".public static String[] getStyleModifiers(String widgetStyle, String target)
For example, for style="extensions:png/gif/bmp", this will return ["png", "gif", "bmp"].
widgetStyle - The style declaration string, e.g. "extensions:png/gif/bmp".target - The target style attribute, e.g. "extensions".["png", "gif", "bmp"].Copyright © 2015–2022 SciJava. All rights reserved.