gpt4 book ai didi

com.tc.admin.common.XComboBox.getItemCount()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 19:37:05 24 4
gpt4 key购买 nike

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

XComboBox.getItemCount介绍

暂无

代码示例

代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.x-hibernate-ui

@Override
public boolean isReady() {
 return puSelector != null && puSelector.getItemCount() > 0;
}

代码示例来源:origin: org.terracotta.modules/tim-quartz-ui

@Override
public boolean isReady() {
 return schedulerSelector != null && schedulerSelector.getItemCount() > 0;
}

代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.x-ui

@Override
public boolean isReady() {
 return cacheManagerSelector != null && cacheManagerSelector.getItemCount() > 0;
}

代码示例来源:origin: org.terracotta.modules/tim-ehcache-1.7-ui

@Override
public boolean isReady() {
 return cacheManagerSelector != null && cacheManagerSelector.getItemCount() > 0;
}

代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.x-ui

private void updateCacheManageSelector() {
 int selIndex = cacheManagerSelector.getSelectedIndex();
 Map<CacheModelInstance, StandaloneCacheModel> standaloneCacheModels = cacheManagerModel.standaloneCacheModels();
 Set<CacheManagerInstance> cmis = new HashSet<CacheManagerInstance>();
 for (CacheModelInstance cacheModelInstance : standaloneCacheModels.keySet()) {
  cmis.add(cacheModelInstance.getCacheManagerInstance());
 }
 cacheManagerSelector.setModel(new DefaultComboBoxModel(cmis.toArray(new CacheManagerInstance[0])));
 if (selIndex != -1 && selIndex < cacheManagerSelector.getItemCount()) {
  cacheManagerSelector.setSelectedIndex(selIndex);
 }
}

代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.x-ui

private void updateClusteredCacheSelector() {
 int index = clusteredCacheSelector.getSelectedIndex();
 List<ClusteredCacheModel> list = new ArrayList<ClusteredCacheModel>(cacheManagerModel.clusteredCacheModels());
 ClusteredCacheModel[] a = list.toArray(new ClusteredCacheModel[0]);
 Arrays.sort(a);
 clusteredCacheSelector.setModel(new DefaultComboBoxModel(a));
 if (index != -1 && index < clusteredCacheSelector.getItemCount()) {
  clusteredCacheSelector.setSelectedIndex(index);
 }
}

代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.x-ui

private void updateCacheManagerSelector() {
 int selIndex = cacheManagerInstanceSelector.getSelectedIndex();
 Map<CacheModelInstance, StandaloneCacheModel> standaloneCacheModels = cacheManagerModel.standaloneCacheModels();
 Set<CacheManagerInstance> cmis = new HashSet<CacheManagerInstance>();
 for (CacheModelInstance cacheModelInstance : standaloneCacheModels.keySet()) {
  cmis.add(cacheModelInstance.getCacheManagerInstance());
 }
 cacheManagerInstanceSelector.setModel(new DefaultComboBoxModel(cmis.toArray(new CacheManagerInstance[0])));
 if (selIndex != -1 && selIndex < cacheManagerInstanceSelector.getItemCount()) {
  cacheManagerInstanceSelector.setSelectedIndex(selIndex);
 }
}

代码示例来源:origin: org.terracotta.modules/tim-ehcache-1.7-ui

public void run() {
  if (tornDown.get()) { return; }
  String cacheManagerName = cacheManagerModel.getName();
  DefaultComboBoxModel puModel = (DefaultComboBoxModel) cacheManagerSelector.getModel();
  if (puModel.getIndexOf(cacheManagerName) == -1) {
   puModel.addElement(cacheManagerName);
   appContext.setStatus("Added Ehcache CacheManager '" + cacheManagerName + "'");
  }
  testAnyCacheManagers();
  if (cacheManagerSelector.getItemCount() == 1) {
   firePropertyChange(Presentation.PROP_PRESENTATION_READY, false, true);
  }
 }
});

代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.x-ui

public void run() {
  if (tornDown.get()) { return; }
  String cacheManagerName = cacheManagerModel.getName();
  DefaultComboBoxModel comboBoxModel = (DefaultComboBoxModel) cacheManagerSelector.getModel();
  if (comboBoxModel.getIndexOf(cacheManagerName) == -1) {
   comboBoxModel.addElement(cacheManagerName);
   appContext.setStatus("Added Ehcache CacheManager '" + cacheManagerName + "'");
   testAnyCacheManagers();
   if (cacheManagerSelector.getItemCount() == 1) {
    firePropertyChange(Presentation.PROP_PRESENTATION_READY, false, true);
   }
  }
 }
});

代码示例来源:origin: org.terracotta.modules/tim-quartz-ui

public void run() {
  if (tornDown.get()) { return; }
  String schedulerName = schedulerModel.getName();
  DefaultComboBoxModel comboModel = (DefaultComboBoxModel) schedulerSelector.getModel();
  if (comboModel.getIndexOf(schedulerName) == -1) {
   comboModel.addElement(schedulerName);
   appContext.setStatus("Added Quartz Scheduler '" + schedulerName + "'");
  }
  testAnySchedulers();
  if (schedulerSelector.getItemCount() == 1) {
   firePropertyChange(Presentation.PROP_PRESENTATION_READY, false, true);
  }
 }
});

代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.x-hibernate-ui

private boolean testRegisterPersistenceUnit(ObjectName on) {
 boolean result = false;
 if (!tornDown.get()) {
  try {
   if (statsBeanPattern.apply(on)) {
    DefaultComboBoxModel puModel = (DefaultComboBoxModel) puSelector.getModel();
    String persistenceUnit = on.getKeyProperty("name");
    if (puModel.getIndexOf(persistenceUnit) == -1) {
     puModel.addElement(persistenceUnit);
     appContext.setStatus("Added Hibernate persistence-unit '" + persistenceUnit + "'");
     result = true;
    }
    testAnyPersistenceUnits();
    if (puSelector.getItemCount() == 1) {
     firePropertyChange(Presentation.PROP_PRESENTATION_READY, false, true);
    }
   }
  } catch (Exception e) {
   appContext.log(e);
  }
 }
 return result;
}

代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.x-hibernate-ui

if (puSelector.getItemCount() == 0) {
 firePropertyChange(Presentation.PROP_PRESENTATION_READY, true, false);

代码示例来源:origin: org.terracotta.modules/tim-ehcache-1.7-ui

public void run() {
  if (tornDown.get()) { return; }
  String cacheManagerName = cacheManagerModel.getName();
  DefaultComboBoxModel comboBoxModel = (DefaultComboBoxModel) cacheManagerSelector.getModel();
  int index = comboBoxModel.getIndexOf(cacheManagerName);
  if (index != -1) {
   CacheManagerPanel page = (CacheManagerPanel) pagedView.getComponent(index);
   pagedView.remove(index);
   comboBoxModel.removeElementAt(index);
   page.tearDown();
   appContext.setStatus("Removed Ehcache CacheManager '" + cacheManagerName + "'");
  }
  if (cacheManagerSelector.getItemCount() == 0) {
   firePropertyChange(Presentation.PROP_PRESENTATION_READY, true, false);
  }
 }
});

代码示例来源:origin: org.terracotta.modules/tim-quartz-ui

public void run() {
  if (tornDown.get()) { return; }
  String schedulerName = schedulerModel.getName();
  DefaultComboBoxModel comboBoxModel = (DefaultComboBoxModel) schedulerSelector.getModel();
  int index = comboBoxModel.getIndexOf(schedulerName);
  if (index != -1) {
   SchedulerPanel page = (SchedulerPanel) pagedView.getComponent(index);
   pagedView.remove(index);
   comboBoxModel.removeElementAt(index);
   page.tearDown();
   appContext.setStatus("Removed Quartz Scheduler '" + schedulerName + "'");
  }
  testAnySchedulers();
  if (schedulerSelector.getItemCount() == 0) {
   firePropertyChange(Presentation.PROP_PRESENTATION_READY, true, false);
  }
 }
});

代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.x-ui

public void run() {
  if (tornDown.get()) { return; }
  String cacheManagerName = cacheManagerModel.getName();
  DefaultComboBoxModel comboBoxModel = (DefaultComboBoxModel) cacheManagerSelector.getModel();
  int index = comboBoxModel.getIndexOf(cacheManagerName);
  if (index != -1) {
   CacheManagerPanel page = (CacheManagerPanel) pagedView.getPage(cacheManagerName);
   if (page != null) {
    pagedView.removePage(cacheManagerName);
    page.tearDown();
   }
   comboBoxModel.removeElementAt(index);
   appContext.setStatus("Removed Ehcache CacheManager '" + cacheManagerName + "'");
   testAnyCacheManagers();
   if (cacheManagerSelector.getItemCount() == 0) {
    firePropertyChange(Presentation.PROP_PRESENTATION_READY, true, false);
   }
  }
 }
});

代码示例来源:origin: org.terracotta.modules/tim-quartz-ui

private void testAnySchedulers() {
 boolean changedHierarchy = false;
 if (schedulerSelector.getItemCount() == 0) {
  if (mainPanel.isShowing()) {
   removeAll();
  }
  messageLabel.setText(bundle.getString("no.schedulers.msg"));
  if (!messagePanel.isShowing()) {
   add(messagePanel);
   changedHierarchy = true;
  }
 } else {
  if (messagePanel.isShowing()) {
   removeAll();
  }
  if (!mainPanel.isShowing()) {
   add(mainPanel);
   changedHierarchy = true;
  }
 }
 if (changedHierarchy) {
  revalidate();
  repaint();
 }
}

代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.x-hibernate-ui

private void testAnyPersistenceUnits() {
 boolean changedHierarchy = false;
 if (puSelector.getItemCount() == 0) {
  if (mainPanel.isShowing()) {
   removeAll();
  }
  messageLabel.setText(bundle.getString("no.session-factories.msg"));
  if (!messagePanel.isShowing()) {
   add(messagePanel);
   changedHierarchy = true;
  }
 } else {
  if (messagePanel.isShowing()) {
   removeAll();
  }
  if (!mainPanel.isShowing()) {
   add(mainPanel);
   changedHierarchy = true;
  }
 }
 if (changedHierarchy) {
  revalidate();
  repaint();
 }
}

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com