javax.swing.JComboBox.repaint()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(234)

本文整理了Java中javax.swing.JComboBox.repaint()方法的一些代码示例,展示了JComboBox.repaint()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JComboBox.repaint()方法的具体详情如下:
包路径:javax.swing.JComboBox
类名称:JComboBox
方法名:repaint

JComboBox.repaint介绍

暂无

代码示例

代码示例来源:origin: nodebox/nodebox

public void setValueForControl(Object v) {
  String fontName = (String) v;
  if (value != null && value.equals(fontName)) return;
  fontChooser.setSelectedItem(fontModel.getFont(fontName));
  fontChooser.repaint();
  value = fontName;
}

代码示例来源:origin: nodebox/nodebox

public void setValueForControl(Object v) {
  String key = (String) v;
  if (value != null && value.equals(key)) return;
  Object item = menuModel.getMenuItem(key);
  if (menuBox.getSelectedItem() == item) return;
  menuBox.setSelectedItem(item);
  // The menuBox does not update automatically
  menuBox.repaint();
  value = key;
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/skinlf

public void mouseEntered(MouseEvent event) {
 rollover = true;
 comboBox.repaint();
}
public void mouseExited(MouseEvent event) {

代码示例来源:origin: com.github.arnabk/pgslookandfeel

public void focusLost(FocusEvent e) {
    iconPaintPressed = false;
    comboBox.repaint();
  }
}

代码示例来源:origin: khuxtable/seaglass

/** Invoked when a component loses the keyboard focus. */
public void focusLost(FocusEvent e) {
  // repaint whole combo on focus loss
  comboBox.repaint();
}

代码示例来源:origin: khuxtable/seaglass

/** Invoked when a component gains the keyboard focus. */
public void focusGained(FocusEvent e) {
  // repaint whole combo on focus gain
  comboBox.repaint();
}

代码示例来源:origin: openpnp/openpnp

@Override
  public void synced(Binding binding) {
    SwingUtilities.invokeLater(() -> feederCb.repaint());
  }
});

代码示例来源:origin: openpnp/openpnp

@Override
  public void synced(Binding binding) {
    SwingUtilities.invokeLater(() -> bankCb.repaint());
  }
});

代码示例来源:origin: org.geotools/gt2-widgets-swing

/**
 * Set the kernel by its name. It must be one of the name registered with {@link #addKernel}.
 * If {@code name} is not found, then nothing is done.
 *
 * @param name The name of the kernel to select.
 */
public void setKernel(final String name) {
  kernelSelector.setSelectedItem(name);
  kernelSelector.repaint();
}

代码示例来源:origin: com.jidesoft/jide-oss

@Override
public void mouseEntered(MouseEvent e) {
  setRollOver(true);
  comboBox.repaint();
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf

/**
 * Repaint the currently selected item.
 */
void repaintMyCurrentValue()
{
  Rectangle r= rectangleForCurrentValue();
  comboBox.repaint(r.x, r.y, r.width, r.height);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-webui-designtime

public void instanceNameChanged(DesignBean designBean, String oldInstanceName){
  if (designBean.getInstance() instanceof TableDataProvider){
    //System.out.println("Instance Name changed - " + oldInstanceName + " to " + designBean.getInstanceName());
    cbxTableDataprovider.repaint();
  }
}

代码示例来源:origin: cytoscape.coreplugins/filters

public void refreshFilterSelectCMB() {
  ComboBoxModel cbm;
  // Whatever change caused the refresh may have altered the longest display String
  // so need to have the model recalculate it.
  cbm = cmbSelectFilter.getModel();
  if (cbm instanceof WidestStringProvider) {
    ((WidestStringProvider)cbm).resetWidest();
  }
  this.cmbSelectFilter.repaint();
}

代码示例来源:origin: openpnp/openpnp

@Override
public void machineHeadActivity(Machine machine, Head head) {
  EventQueue.invokeLater(() -> updateDros());
  EventQueue.invokeLater(() -> comboBoxHeadMountable.repaint());
}

代码示例来源:origin: freeplane/freeplane

private void updateCalendar(final long reminderTime) {
  TimeManagement.this.calendar.setTimeInMillis(reminderTime);
  calendarComponent.setCalendar(TimeManagement.this.calendar);
  dateFormatChooser.repaint();
}

代码示例来源:origin: org.zaproxy/zap

private void updateDriverComboBox() {
  driverComboBox.removeAllItems();
  for (String name : driverConfig.getNames() ) {
    driverComboBox.addItem(name);
  }
  driverComboBox.repaint();
}
/**

代码示例来源:origin: edu.stanford.protege/protege-editor-owl

private void updateTitleBar() {
  Frame f = ProtegeManager.getInstance().getFrame(this);
  if (f != null) {
    f.setTitle(getTitle());
  }
  ontologiesList.repaint();
}

代码示例来源:origin: protegeproject/protege

private void updateTitleBar() {
  Frame f = ProtegeManager.getInstance().getFrame(this);
  if (f != null) {
    f.setTitle(getTitle());
  }
  ontologiesList.repaint();
}

代码示例来源:origin: edu.stanford.protege/org.protege.editor.owl

private void updateTitleBar() {
  Frame f = ProtegeManager.getInstance().getFrame(this);
  if (f != null) {
    f.setTitle(getTitle());
  }
  ontologiesList.repaint();
}

代码示例来源:origin: aterai/java-swing-tips

protected static void repaintComboBox(JComboBox<?> combo, int row) {
 if (combo.getSelectedIndex() == row) {
  combo.repaint();
 }
 Accessible a = combo.getAccessibleContext().getAccessibleChild(0);
 if (a instanceof ComboPopup) {
  JList<?> list = ((ComboPopup) a).getList();
  if (list.isShowing()) {
   list.repaint(list.getCellBounds(row, row));
  }
 }
}

相关文章

JComboBox类方法