Example usage for javax.swing LookAndFeel getID

List of usage examples for javax.swing LookAndFeel getID

Introduction

In this page you can find the example usage for javax.swing LookAndFeel getID.

Prototype

public abstract String getID();

Source Link

Document

Return a string that identifies this look and feel.

Usage

From source file:phex.gui.common.LookAndFeelUtils.java

public static void setLookAndFeel(LookAndFeel laf) throws LookAndFeelFailedException {
    try {//from   w ww.j a  va 2 s .c om
        // don't update LAF if already set...
        if (laf.getID().equals(UIManager.getLookAndFeel().getID())) {
            return;
        }
        UIManager.setLookAndFeel(laf);
        GUIUtils.updateComponentsUI();
    } catch (UnsupportedLookAndFeelException exp) {
        NLogger.error(LookAndFeelUtils.class, "Instantiation faield: " + laf.getName(), exp);
        throw new LookAndFeelFailedException("Instantiation faield: " + laf.getName());
    }
}