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

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

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

JComboBox.invalidate介绍

暂无

代码示例

代码示例来源:origin: com.bbossgroups/bboss-htmlparser

/**
 * Background thread task to get the available locales.
 */
public void run ()
{
  String locale;
  synchronized (mLocale)
  {
    mLocales = Locale.getAvailableLocales ();
    locale = mFilter.getLocale ().getDisplayName ();
    for (int i = 0; i < mLocales.length; i++)
      if (!locale.equals (mLocales[i].getDisplayName ()))
        mLocale.addItem (mLocales[i].getDisplayName ());
    mLocale.invalidate ();
  }
}

代码示例来源:origin: LibraryOfCongress/bagger

@Override
 public void actionPerformed(ActionEvent e) {
  String name = itemName.getText().trim();
  boolean b = false;
  for (int i = 0; i < itemList.getItemCount(); i++) {
   String s = itemList.getItemAt(i);
   if (s != null && name.equalsIgnoreCase(s.trim())) {
    b = true;
    break;
   }
  }
  setVisible(false);
  if (b) {
   bagView.showWarningErrorDialog("New Item Dialog", "Item already exists!");
   return;
  }
  itemList.addItem(name);
  itemList.invalidate();
  itemList.setSelectedItem(name);
 }
}

代码示例来源:origin: entertailion/Fling

public void run() {
    try {
      showProgressDialog(resourceBundle.getString("progress.discoveringDevices"));
      broadcastClientThread.start();
      // wait a while...
      // TODO do this better
      Thread.sleep(BroadcastDiscoveryClient.PROBE_INTERVAL_MS-1);
      broadcastClient.stop();
      hideProgressDialog();
      Log.d(LOG_TAG, "size=" + trackedServers.size());
      for (DialServer dialServer : trackedServers) {
        deviceList.addItem(dialServer);
        servers.add(dialServer);
      }
      // Now add user's manual servers
      for (DialServer dialServer : manualServers) {
        deviceList.addItem(dialServer);
      }
      deviceList.invalidate();
      if (deviceList.getItemCount() == 1) {
        JOptionPane.showMessageDialog(FlingFrame.this, resourceBundle.getString("device.notfound"));
      } else if (deviceList.getItemCount() == 2) {
        // Automatically select single device
        deviceList.setSelectedIndex(1);
      }
    } catch (InterruptedException e) {
      Log.e(LOG_TAG, "discoverDevices", e);
    }
  }
}).start();

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby-railsprojects

public void run() {
  // Refresh generator list
  RubyPlatform.platformFor(project).recomputeRoots();
  typeCombo.setModel(getTypeModel());
  
  typeCombo.invalidate();
  typeCombo.repaint();
  Generator generator = getSelectedGenerator();
  if (generator != Generator.NONE) {
    showGenerator(generator);
  }
}

相关文章

JComboBox类方法