Class RadianceThemingWidgetRepository
java.lang.Object
org.pushingpixels.radiance.theming.internal.RadianceThemingWidgetRepository
Repository of Radiance look-and-feel widgets.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classInformation on a single class. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static RadianceThemingWidgetRepositorySingleton instance.Contains fully qualified class names of widgets that should not be installed on any components.private Map<Class<?>, Set<RadianceThemingWidgetRepository.WidgetClassInfo>> All registered widgets. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateCreates a new repository. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToIgnoreWidgets(String widgetClassName) Marks widget with the specified class name to never be installed on any components.<T extends JComponent>
Set<RadianceThemingWidget<T>> getMatchingWidgets(T jcomp) Returns a set of widgets that match the specified component.Returns the widget repository.voidregisterWidget(String widgetClassName, Class<?> supportedClass, boolean isExact) Registers a new widget for the specified UI class.voidregisterWidget(String widgetClassName, List<Class<?>> supportedClasses) Registers a new widget for the specified UI classes.
-
Field Details
-
widgets
-
widgetClassesToIgnore
-
repository
Singleton instance.
-
-
Constructor Details
-
RadianceThemingWidgetRepository
private RadianceThemingWidgetRepository()Creates a new repository. Marked private to enforce single instance.
-
-
Method Details
-
getRepository
Returns the widget repository.- Returns:
- Widget repository.
-
registerWidget
Registers a new widget for the specified UI classes. The list should containClassinstances.- Parameters:
widgetClassName- Full-qualified class name for the widget.supportedClasses- Classes supported by the widget.
-
registerWidget
Registers a new widget for the specified UI class.- Parameters:
widgetClassName- Full-qualified class name for the widget.supportedClass- Class supported by the widget.isExact- iftrue, the widget will be available only for the components of the specified class. Iffalse, the widget be available for the components of the specified class and all its descendants (as defined in theClass.isAssignableFrom(Class)).
-
getMatchingWidgets
Returns a set of widgets that match the specified component. The component hierarchy is scanned bottom-up and all matching widget classes are used to instantiate new instance of widgets.- Parameters:
jcomp- UI component.- Returns:
- Set of widgets that match the specified component.
-
addToIgnoreWidgets
Marks widget with the specified class name to never be installed on any components.- Parameters:
widgetClassName- Fully qualified widget class name.
-