本文整理了Java中javax.swing.JComboBox.updateUI()
方法的一些代码示例,展示了JComboBox.updateUI()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JComboBox.updateUI()
方法的具体详情如下:
包路径:javax.swing.JComboBox
类名称:JComboBox
方法名:updateUI
暂无
代码示例来源:origin: com.github.insubstantial/substance
@Override
public void run() {
if (comboBox != null)
comboBox.updateUI();
}
});
代码示例来源:origin: org.java.net.substance/substance
public void run() {
if (comboBox != null)
comboBox.updateUI();
}
});
代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client
public void addFileFormat(FileFormat f) {
this.formatComboBox.addItem(f.getName());
formatMap.put(f.getName(),f);
this.formatComboBox.updateUI();
}
代码示例来源:origin: thiagotts/CloudReports
/**
* Updates the environments combo box.
*
* @since 1.0
*/
public static void updateEnvironmentsBox() {
environmentsBox.setModel(new javax.swing.DefaultComboBoxModel(getEnvironmentsNames()));
environmentsBox.updateUI();
HibernateUtil.setActiveDatabase(environmentsBox.getSelectedItem().toString() + ".cre");
cl.show(cardPanel, "overallUserGroupView");
}
代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client
private static void updateTagValues(String tagName, JComboBox tagValueCB) {
tagValueCB.removeAllItems();
if (tagName != null) {
List<String> values;
try {
values = MedSavantClient.VariantManager.getValuesForTagName(LoginController.getSessionID(), tagName);
for (String val : values) {
tagValueCB.addItem(val);
}
} catch (Exception ex) {
ClientMiscUtils.reportError("Error updating tag values: %s", ex);
}
}
tagValueCB.updateUI();
}
代码示例来源:origin: biojava/biojava
JComboBox field = (JComboBox) textFields.get(i);
field.setSelectedItem(data);
field.updateUI();
} else if ( type == Boolean.class){
JComboBox field = (JComboBox) textFields.get(i);
else
field.setSelectedIndex(0);
field.updateUI();
代码示例来源:origin: org.netbeans.api/org-openide-explorer
/** Overridden to use CleanComboUI on Metal L&F to avoid extra borders */
@Override
public void updateUI() {
LookAndFeel lf = UIManager.getLookAndFeel();
String id = lf.getID();
boolean useClean = tableUI && (lf instanceof MetalLookAndFeel
|| "GTK".equals(id) //NOI18N
|| ("Aqua".equals(id) && "10.5".compareTo(System.getProperty("os.version")) <= 0) //NOI18N
|| PropUtils.isWindowsVistaLaF() //#217957
|| "Kunststoff".equals(id)); //NOI18N
if (useClean) {
super.setUI(PropUtils.createComboUI(this, tableUI));
} else {
super.updateUI();
}
if (tableUI & getEditor().getEditorComponent() instanceof JComponent) {
((JComponent) getEditor().getEditorComponent()).setBorder(null);
}
}
代码示例来源:origin: nroduit/Weasis
comboTags.updateUI();
JMVUtils.addTooltipToComboList(comboTags);
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
/** Overridden to use CleanComboUI on Metal L&F to avoid extra borders */
public void updateUI() {
LookAndFeel lf = UIManager.getLookAndFeel();
String id = lf.getID();
boolean useClean = tableUI &&
(lf instanceof MetalLookAndFeel ||
"GTK".equals(id) || "Kunststoff".equals(id)); //NOI18N
if (useClean) {
super.setUI (PropUtils.createComboUI(this, tableUI));
} else {
super.updateUI();
}
if (tableUI & getEditor().getEditorComponent() instanceof JComponent) {
((JComponent) getEditor().getEditorComponent()).setBorder(null);
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
/** Overridden to use CleanComboUI on Metal L&F to avoid extra borders */
public void updateUI() {
LookAndFeel lf = UIManager.getLookAndFeel();
String id = lf.getID();
boolean useClean = tableUI &&
(lf instanceof MetalLookAndFeel ||
"GTK".equals(id) || "Kunststoff".equals(id)); //NOI18N
if (useClean) {
super.setUI (PropUtils.createComboUI(this, tableUI));
} else {
super.updateUI();
}
if (tableUI & getEditor().getEditorComponent() instanceof JComponent) {
((JComponent) getEditor().getEditorComponent()).setBorder(null);
}
}
代码示例来源:origin: org.trypticon.hex/hex-util
@Override
public void updateUI() {
setRenderer(null); // let the UI insert its own
super.updateUI();
@SuppressWarnings("unchecked") // it must be this type to support any model by default.
ListCellRenderer<Object> defaultRenderer = (ListCellRenderer<Object>) getRenderer();
setRenderer(createRenderer(defaultRenderer));
}
}
代码示例来源:origin: nroduit/Weasis
private static void initCombo(JComboBox<?> combo) {
// Set before tooltip, otherwise update UI => remove selection listener
combo.setFont(FontTools.getFont11());
combo.setMaximumRowCount(15);
JMVUtils.setPreferredWidth(combo, 80);
// Update UI before adding the Tooltip feature in the combobox list
combo.updateUI();
JMVUtils.addTooltipToComboList(combo);
}
代码示例来源:origin: net.java.truecommons/truecommons-key-swing
private void changeComboBox(
final @Nullable JComboBox<E> oldCB,
final @Nullable JComboBox<E> newCB,
final boolean update) {
if (newCB == oldCB) return;
ComboBoxEditor oldCBE = null;
if (null != oldCB) {
oldCB.removePropertyChangeListener("editor", listener);
oldCBE = oldCB.getEditor();
oldCB.setEditor(((AbstractComboBoxBrowser<?>.DecoratingComboBoxEditor) oldCBE).getEditor());
}
this.comboBox = newCB;
ComboBoxEditor newCBE = null;
if (null != newCB) {
newCB.updateUI(); // ensure comboBoxEditor is initialized
newCBE = new DecoratingComboBoxEditor(newCB.getEditor());
newCB.setEditor(newCBE);
newCB.addPropertyChangeListener("editor", listener);
}
changeEditor(oldCBE, newCBE, update);
}
代码示例来源:origin: com.haulmont.thirdparty/swingx-core
super.updateUI();
代码示例来源:origin: net.java.truevfs/truevfs-key-swing
private void changeComboBox(
final @CheckForNull JComboBox<E> oldCB,
final @CheckForNull JComboBox<E> newCB,
final boolean update) {
if (newCB == oldCB)
return;
ComboBoxEditor oldCBE = null;
if (null != oldCB) {
oldCB.removePropertyChangeListener("editor", listener);
oldCBE = oldCB.getEditor();
oldCB.setEditor(((AbstractComboBoxBrowser<?>.DecoratingComboBoxEditor) oldCBE).getEditor());
}
this.comboBox = newCB;
ComboBoxEditor newCBE = null;
if (null != newCB) {
newCB.updateUI(); // ensure comboBoxEditor is initialized
newCBE = new DecoratingComboBoxEditor(newCB.getEditor());
newCB.setEditor(newCBE);
newCB.addPropertyChangeListener("editor", listener);
}
changeEditor(oldCBE, newCBE, update);
}
代码示例来源:origin: de.schlichtherle.truezip/truezip-swing
private void changeComboBox(
final @CheckForNull JComboBox<E> oldCB,
final @CheckForNull JComboBox<E> newCB,
final boolean update) {
if (newCB == oldCB)
return;
ComboBoxEditor oldCBE = null;
if (null != oldCB) {
oldCB.removePropertyChangeListener("editor", listener);
oldCBE = oldCB.getEditor();
oldCB.setEditor(((AbstractComboBoxBrowser<?>.DecoratingComboBoxEditor) oldCBE).getEditor());
}
this.comboBox = newCB;
ComboBoxEditor newCBE = null;
if (null != newCB) {
newCB.updateUI(); // ensure comboBoxEditor is initialized
newCBE = new DecoratingComboBoxEditor(newCB.getEditor());
newCB.setEditor(newCBE);
newCB.addPropertyChangeListener("editor", listener);
}
changeEditor(oldCBE, newCBE, update);
}
代码示例来源:origin: org.swinglabs.swingx/swingx-core
super.updateUI();
代码示例来源:origin: org.swinglabs.swingx/swingx-all
super.updateUI();
代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core
super.updateUI();
代码示例来源:origin: nroduit/Weasis
mediaSourceSelectionCombo.updateUI();
JMVUtils.addTooltipToComboList(mediaSourceSelectionCombo);
内容来源于网络,如有侵权,请联系作者删除!