javax.swing.plaf.metal.MetalComboBoxUI Java Examples

The following examples show how to use javax.swing.plaf.metal.MetalComboBoxUI. 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 File: bug6632953.java    From openjdk-jdk9 with 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 File: bug6632953.java    From dragonwell8_jdk with 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 File: bug6632953.java    From TencentKona-8 with 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 File: bug6632953.java    From jdk8u60 with 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 File: bug6632953.java    From openjdk-jdk8u with 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
Source File: bug6632953.java    From openjdk-jdk8u-backup with 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 #7
Source File: bug6632953.java    From jdk8u-jdk with 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 File: bug6632953.java    From hottub with 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 File: bug6632953.java    From openjdk-8-source with 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 File: bug6632953.java    From openjdk-8 with 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 File: bug6632953.java    From jdk8u_jdk with 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 File: JComboBoxFactory.java    From WorldGrower with 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 File: bug6632953.java    From jdk8u-jdk with 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 File: bug6632953.java    From jdk8u-dev-jdk with 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 File: MainPanel.java    From java-swing-tips with 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);
  });
}