Java Code Examples for javax.swing.plaf.metal.MetalComboBoxUI

The following examples show how to use javax.swing.plaf.metal.MetalComboBoxUI. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: openjdk-jdk9   Source File: bug6632953.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static void main(String... args) throws Exception {
    SwingUtilities.invokeAndWait(new Runnable() {

        @Override
        public void run() {

            for (UIManager.LookAndFeelInfo lafInfo
                    : UIManager.getInstalledLookAndFeels()) {
                try {
                    UIManager.setLookAndFeel(lafInfo.getClassName());
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
                MetalComboBoxUI ui = new MetalComboBoxUI();
                ui.installUI(new JComboBox());
                ui.getBaseline(new JComboBox(), 0, 0);
                ui.getBaseline(new JComboBox(), 1, 1);
                ui.getBaseline(new JComboBox(), 2, 2);
                ui.getBaseline(new JComboBox(), 3, 3);
                ui.getBaseline(new JComboBox(), 4, 4);
            }
        }
    });
}
 
Example 2
Source Project: dragonwell8_jdk   Source File: bug6632953.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static void main(String... args) throws Exception {
    MetalComboBoxUI ui = new MetalComboBoxUI();
    ui.installUI(new JComboBox());
    ui.getBaseline(new JComboBox(), 0, 0);
    ui.getBaseline(new JComboBox(), 1, 1);
    ui.getBaseline(new JComboBox(), 2, 2);
    ui.getBaseline(new JComboBox(), 3, 3);
    ui.getBaseline(new JComboBox(), 4, 4);
}
 
Example 3
Source Project: TencentKona-8   Source File: bug6632953.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static void main(String... args) throws Exception {
    MetalComboBoxUI ui = new MetalComboBoxUI();
    ui.installUI(new JComboBox());
    ui.getBaseline(new JComboBox(), 0, 0);
    ui.getBaseline(new JComboBox(), 1, 1);
    ui.getBaseline(new JComboBox(), 2, 2);
    ui.getBaseline(new JComboBox(), 3, 3);
    ui.getBaseline(new JComboBox(), 4, 4);
}
 
Example 4
Source Project: jdk8u60   Source File: bug6632953.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static void main(String... args) throws Exception {
    MetalComboBoxUI ui = new MetalComboBoxUI();
    ui.installUI(new JComboBox());
    ui.getBaseline(new JComboBox(), 0, 0);
    ui.getBaseline(new JComboBox(), 1, 1);
    ui.getBaseline(new JComboBox(), 2, 2);
    ui.getBaseline(new JComboBox(), 3, 3);
    ui.getBaseline(new JComboBox(), 4, 4);
}
 
Example 5
Source Project: openjdk-jdk8u   Source File: bug6632953.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static void main(String... args) throws Exception {
    MetalComboBoxUI ui = new MetalComboBoxUI();
    ui.installUI(new JComboBox());
    ui.getBaseline(new JComboBox(), 0, 0);
    ui.getBaseline(new JComboBox(), 1, 1);
    ui.getBaseline(new JComboBox(), 2, 2);
    ui.getBaseline(new JComboBox(), 3, 3);
    ui.getBaseline(new JComboBox(), 4, 4);
}
 
Example 6
public static void main(String... args) throws Exception {
    MetalComboBoxUI ui = new MetalComboBoxUI();
    ui.installUI(new JComboBox());
    ui.getBaseline(new JComboBox(), 0, 0);
    ui.getBaseline(new JComboBox(), 1, 1);
    ui.getBaseline(new JComboBox(), 2, 2);
    ui.getBaseline(new JComboBox(), 3, 3);
    ui.getBaseline(new JComboBox(), 4, 4);
}
 
Example 7
Source Project: jdk8u-jdk   Source File: bug6632953.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static void main(String... args) throws Exception {
    MetalComboBoxUI ui = new MetalComboBoxUI();
    ui.installUI(new JComboBox());
    ui.getBaseline(new JComboBox(), 0, 0);
    ui.getBaseline(new JComboBox(), 1, 1);
    ui.getBaseline(new JComboBox(), 2, 2);
    ui.getBaseline(new JComboBox(), 3, 3);
    ui.getBaseline(new JComboBox(), 4, 4);
}
 
Example 8
Source Project: hottub   Source File: bug6632953.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static void main(String... args) throws Exception {
    MetalComboBoxUI ui = new MetalComboBoxUI();
    ui.installUI(new JComboBox());
    ui.getBaseline(new JComboBox(), 0, 0);
    ui.getBaseline(new JComboBox(), 1, 1);
    ui.getBaseline(new JComboBox(), 2, 2);
    ui.getBaseline(new JComboBox(), 3, 3);
    ui.getBaseline(new JComboBox(), 4, 4);
}
 
Example 9
Source Project: openjdk-8-source   Source File: bug6632953.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static void main(String... args) throws Exception {
    MetalComboBoxUI ui = new MetalComboBoxUI();
    ui.installUI(new JComboBox());
    ui.getBaseline(new JComboBox(), 0, 0);
    ui.getBaseline(new JComboBox(), 1, 1);
    ui.getBaseline(new JComboBox(), 2, 2);
    ui.getBaseline(new JComboBox(), 3, 3);
    ui.getBaseline(new JComboBox(), 4, 4);
}
 
Example 10
Source Project: openjdk-8   Source File: bug6632953.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static void main(String... args) throws Exception {
    MetalComboBoxUI ui = new MetalComboBoxUI();
    ui.installUI(new JComboBox());
    ui.getBaseline(new JComboBox(), 0, 0);
    ui.getBaseline(new JComboBox(), 1, 1);
    ui.getBaseline(new JComboBox(), 2, 2);
    ui.getBaseline(new JComboBox(), 3, 3);
    ui.getBaseline(new JComboBox(), 4, 4);
}
 
Example 11
Source Project: jdk8u_jdk   Source File: bug6632953.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static void main(String... args) throws Exception {
    MetalComboBoxUI ui = new MetalComboBoxUI();
    ui.installUI(new JComboBox());
    ui.getBaseline(new JComboBox(), 0, 0);
    ui.getBaseline(new JComboBox(), 1, 1);
    ui.getBaseline(new JComboBox(), 2, 2);
    ui.getBaseline(new JComboBox(), 3, 3);
    ui.getBaseline(new JComboBox(), 4, 4);
}
 
Example 12
Source Project: WorldGrower   Source File: JComboBoxFactory.java    License: GNU General Public License v3.0 5 votes vote down vote up
private static<T> void setComboBoxProperties(JComboBox<T> comboBox, ImageInfoReader imageInfoReader) {
	comboBox.setOpaque(false);
	comboBox.setBackground(ColorPalette.FOREGROUND_COLOR);
	comboBox.setForeground(ColorPalette.FOREGROUND_COLOR);
	comboBox.setFont(Fonts.FONT);
	
	comboBox.setUI(new MetalComboBoxUI() {

		@Override
		protected ComboPopup createPopup() {
			return new TiledImageComboPopup( comboBox, imageInfoReader );
		}
	});
}
 
Example 13
Source Project: jdk8u-jdk   Source File: bug6632953.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static void main(String... args) throws Exception {
    MetalComboBoxUI ui = new MetalComboBoxUI();
    ui.installUI(new JComboBox());
    ui.getBaseline(new JComboBox(), 0, 0);
    ui.getBaseline(new JComboBox(), 1, 1);
    ui.getBaseline(new JComboBox(), 2, 2);
    ui.getBaseline(new JComboBox(), 3, 3);
    ui.getBaseline(new JComboBox(), 4, 4);
}
 
Example 14
Source Project: jdk8u-dev-jdk   Source File: bug6632953.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static void main(String... args) throws Exception {
    MetalComboBoxUI ui = new MetalComboBoxUI();
    ui.installUI(new JComboBox());
    ui.getBaseline(new JComboBox(), 0, 0);
    ui.getBaseline(new JComboBox(), 1, 1);
    ui.getBaseline(new JComboBox(), 2, 2);
    ui.getBaseline(new JComboBox(), 3, 3);
    ui.getBaseline(new JComboBox(), 4, 4);
}
 
Example 15
Source Project: java-swing-tips   Source File: MainPanel.java    License: MIT License 5 votes vote down vote up
@Override public void updateUI() {
  super.updateUI();
  EventQueue.invokeLater(() -> {
    setUI(new MetalComboBoxUI() {
      @Override protected ComboPopup createPopup() {
        return new ComboTablePopup(comboBox, table);
      }
    });
    setEditable(false);
  });
}