Example usage for javax.swing JComponent getUIClassID

List of usage examples for javax.swing JComponent getUIClassID

Introduction

In this page you can find the example usage for javax.swing JComponent getUIClassID.

Prototype

@BeanProperty(bound = false, expert = true, description = "UIClassID")
public String getUIClassID() 

Source Link

Document

Returns the UIDefaults key used to look up the name of the swing.plaf.ComponentUI class that defines the look and feel for this component.

Usage

From source file:net.sf.nmedit.jtheme.JTContext.java

public static boolean hasUIClass(JComponent component, UIDefaults defaults) {
    String uiClassID = component.getUIClassID();
    if (uiClassID == null)
        return false;

    Object cl = defaults.get(UIDefaultsClassLoaderKey);
    ClassLoader uiClassLoader = (cl != null) ? (ClassLoader) cl : component.getClass().getClassLoader();

    Class uiClass = defaults.getUIClass(uiClassID, uiClassLoader);
    return uiClass != null;
}