Search in sources :

Example 16 with MetalLookAndFeel

use of javax.swing.plaf.metal.MetalLookAndFeel in project jdk8u_jdk by JetBrains.

the class Test4783068 method test.

void test() {
    try {
        UIManager.setLookAndFeel(new MetalLookAndFeel());
    } catch (UnsupportedLookAndFeelException e) {
        throw new Error("Cannot set Metal LAF");
    }
    // Render text using background color
    UIManager.put("textInactiveText", TEST_COLOR);
    test(new JLabel(html));
    test(new JButton(html));
    JEditorPane pane = new JEditorPane("text/html", html);
    pane.setDisabledTextColor(TEST_COLOR);
    test(pane);
}
Also used : MetalLookAndFeel(javax.swing.plaf.metal.MetalLookAndFeel)

Example 17 with MetalLookAndFeel

use of javax.swing.plaf.metal.MetalLookAndFeel in project jdk8u_jdk by JetBrains.

the class bug6342301 method main.

public static void main(String[] args) throws Exception {
    tempDir = System.getProperty("java.io.tmpdir");
    if (tempDir.length() == 0) {
        //'java.io.tmpdir' isn't guaranteed to be defined
        tempDir = System.getProperty("user.home");
    }
    System.out.println("Temp directory: " + tempDir);
    UIManager.setLookAndFeel(new MetalLookAndFeel());
    SwingUtilities.invokeAndWait(new Runnable() {

        public void run() {
            HackedFileChooser openChooser = new HackedFileChooser();
            openChooser.setUI(new MetalFileChooserUI(openChooser));
            openChooser.setCurrentDirectory(new File(tempDir));
        }
    });
}
Also used : MetalFileChooserUI(javax.swing.plaf.metal.MetalFileChooserUI) MetalLookAndFeel(javax.swing.plaf.metal.MetalLookAndFeel) File(java.io.File)

Example 18 with MetalLookAndFeel

use of javax.swing.plaf.metal.MetalLookAndFeel in project jdk8u_jdk by JetBrains.

the class bug6559589 method main.

public static void main(String[] args) throws Exception {
    UIManager.setLookAndFeel(new MetalLookAndFeel());
    SwingUtilities.invokeAndWait(new Runnable() {

        public void run() {
            bug6559589.createGui();
        }
    });
}
Also used : MetalLookAndFeel(javax.swing.plaf.metal.MetalLookAndFeel)

Aggregations

MetalLookAndFeel (javax.swing.plaf.metal.MetalLookAndFeel)18 LookAndFeel (javax.swing.LookAndFeel)3 MetalTheme (javax.swing.plaf.metal.MetalTheme)3 ValueNamePair (org.compiere.util.ValueNamePair)3 DefaultComboBoxModel (javax.swing.DefaultComboBoxModel)2 UnsupportedLookAndFeelException (javax.swing.UnsupportedLookAndFeelException)2 AppContext (sun.awt.AppContext)2 SunToolkit (sun.awt.SunToolkit)2 DarculaLaf (com.intellij.ide.ui.laf.darcula.DarculaLaf)1 File (java.io.File)1 IOException (java.io.IOException)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 Method (java.lang.reflect.Method)1 Charset (java.nio.charset.Charset)1 Level (java.util.logging.Level)1 Preferences (java.util.prefs.Preferences)1 JFrame (javax.swing.JFrame)1 UIDefaults (javax.swing.UIDefaults)1 FontUIResource (javax.swing.plaf.FontUIResource)1 DefaultMetalTheme (javax.swing.plaf.metal.DefaultMetalTheme)1