@Override public void installUI(JComponent c) { super.installUI(c); c.putClientProperty(SubstanceCoreUtilities.TEXT_COMPONENT_AWARE, new TextComponentAware<JComboBox>() { @Override public JTextComponent getTextComponent(JComboBox t) { if (t.isEditable()) { Component editorComp = t.getEditor() .getEditorComponent(); if (editorComp instanceof JTextComponent) { return (JTextComponent) editorComp; } } return null; } }); }
@Override public void installUI(JComponent c) { super.installUI(c); c.putClientProperty(SubstanceCoreUtilities.TEXT_COMPONENT_AWARE, new TextComponentAware<JComboBox>() { @Override public JTextComponent getTextComponent(JComboBox t) { if (t.isEditable()) { Component editorComp = t.getEditor() .getEditorComponent(); if (editorComp instanceof JTextComponent) { return (JTextComponent) editorComp; } } return null; } }); }
/** * Overridden to ensure that ButtonHandler is created prior to any of the * other installXXX methods, since several of them reference buttonHandler. */ @Override public void installUI(JComponent c) { buttonHandler = new ButtonHandler(); super.installUI(c); }
@Override public void installUI(JComponent a) { super.installUI(a); if(popup instanceof ScalableComboPopup) { ((ScalableComboPopup)popup).onInstall(); } }
@Override public void installUI(JComponent c) { super.installUI(c); c.setOpaque(false); ((JComboBox<?>) c).setRenderer(new SettlersListCellRenderer()); c.setBorder(BorderFactory.createLineBorder(Color.WHITE)); }
@Override public void installUI (JComponent c) { super.installUI (c); JComboBox<?> comboBox = (JComboBox<?>) c; comboBox.setFont (UIManager.getFont ("ComboBox.font")); comboBox.setBackground (UIManager.getColor ("ComboBox.background")); comboBox.setForeground (UIManager.getColor ("ComboBox.foreground")); comboBox.setBorder (UIManager.getBorder ("ComboBox.border")); comboBox.setLightWeightPopupEnabled (true); comboBox.setRenderer (new MaterialComboBoxRenderer ()); }
@Override public void installUI(JComponent c) { super.installUI(c); oldBorder = c.getBorder(); c.setBorder(new NapkinCompoundBorder(new NapkinLineBorder(false), new EmptyBorder(0, 0, 3, 0))); NapkinUtil.installUI(c); wasLightWeightPopupEnabled = comboBox.isLightWeightPopupEnabled(); comboBox.setLightWeightPopupEnabled(false); }
public void installUI(JComponent c) { super.installUI(c); comboBox.setRequestFocusEnabled(true); if (comboBox.getEditor() != null) { if (comboBox.getEditor().getEditorComponent() instanceof JTextField) { ((JTextField) (comboBox.getEditor().getEditorComponent())).setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1)); } } }