Package com._1c.g5.v8.dt.ui.util
Class LabelUtil
java.lang.Object
com._1c.g5.v8.dt.ui.util.LabelUtil
Miscellaneous utilities for obtaining model labels for UI-related purposes.
- Restriction:
- This class is not intended to be sub-classed by clients.
- Restriction:
- This class is not intended to be instantiated by clients.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringObtains label for a given object.static StringObtains path string for a given object.static StringObtains path string for a given object.static StringObtains path string for a given object.static StringgetPath(Object object, String pathSeparator, Class<?> stopAfter, int fromIndex, Predicate<Object> filter) Obtains path string for a given object.
-
Method Details
-
getLabel
Obtains label for a given object.- Parameters:
object- the object to obtain label for, cannot benull- Returns:
- obtained label or empty string if object has no label, never
null
-
getPath
Obtains path string for a given object.- Parameters:
object- the object to obtain path for, cannot benullpathSeparator- the path separator to use, cannot benull- Returns:
- obtained path or empty string if object has no path, never
null
-
getPath
Obtains path string for a given object.- Parameters:
object- the object to obtain path for, cannot benullpathSeparator- the path separator to use, cannot benullstopAfter- path generation will be stopped after object of this class is encountered among parents ornullif not needed- Returns:
- obtained path or empty string if object has no path, never
null
-
getPath
public static String getPath(Object object, String pathSeparator, Class<?> stopAfter, int fromIndex) Obtains path string for a given object.- Parameters:
object- the object to obtain path for, cannot benullpathSeparator- the path separator to use, cannot benullstopAfter- path generation will be stopped after object of this class is encountered among parents ornullif not neededfromIndex- the index of the occurrence of thestopAfterto use to stop, must be positive- Returns:
- obtained path or empty string if object has no path, never
null
-
getPath
public static String getPath(Object object, String pathSeparator, Class<?> stopAfter, int fromIndex, Predicate<Object> filter) Obtains path string for a given object.- Parameters:
object- the object to obtain path for, cannot benullpathSeparator- the path separator to use, cannot benullstopAfter- path generation will be stopped after object of this class is encountered among parents ornullif not neededfromIndex- the index of the occurrence of thestopAfterto use to stop, must be positivefilter- whether need to skip objects and don't add to result path, separator will aslo be skipped, can benullif not needed; filter will be applied to each path element- Returns:
- obtained path or empty string if object has no path.
-