Java Swing UIManager traceSubstanceApiUsage(Component comp, String message)

Here you can find the source of traceSubstanceApiUsage(Component comp, String message)

Description

trace Substance Api Usage

License

Open Source License

Declaration

public static void traceSubstanceApiUsage(Component comp, String message) 

Method Source Code

//package com.java2s;
import java.awt.*;

import javax.swing.*;

public class Main {
    public static void traceSubstanceApiUsage(Component comp, String message) {
        Window w = SwingUtilities.getWindowAncestor(comp);
        String wTitle = null;/*w  w w.  j  a v a2  s.c  o m*/
        if (w instanceof Frame) {
            wTitle = ((Frame) w).getTitle();
        }
        if (w instanceof Dialog) {
            wTitle = ((Dialog) w).getTitle();
        }
        throw new IllegalArgumentException(message + " [component "
                + comp.getClass().getSimpleName() + " in window "
                + w.getClass().getSimpleName() + ":'" + wTitle + "' under "
                + UIManager.getLookAndFeel().getName() + "]");
    }
}

Related

  1. setupUI()
  2. shouldUpdateStyle(PropertyChangeEvent event)
  3. showDirSelect()
  4. showToolTip(Component contents, int x, int y, final int dismissDelay, int initialDelay)
  5. systemLF()
  6. useLNF()
  7. useLnf(String lnfClassName)
  8. usingLnf(String lnfClass)
  9. usingMetalLnf()