gpt4 book ai didi

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

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

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

XComboBox.getSelectedItem介绍

暂无

代码示例

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

private int getBatchSize() {
 return ((Integer) batchSizeSelector.getSelectedItem()).intValue();
}

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

private CacheManagerModel getSelection() {
 String cacheManagerName = (String) cacheManagerSelector.getSelectedItem();
 return cacheManagerName != null ? ehcacheModel.getCacheManagerModel(cacheManagerName) : null;
}

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

public void actionPerformed(ActionEvent e) {
  Set<StandaloneCacheModel> set = new HashSet<StandaloneCacheModel>();
  CacheManagerInstance cacheManagerInstance = (CacheManagerInstance) cacheManagerInstanceSelector
    .getSelectedItem();
  for (CacheModelInstance cacheModelInstance : cacheManagerInstance.cacheModelInstances()) {
   StandaloneCacheModel cacheModel = cacheManagerModel.standaloneCacheModel(cacheModelInstance);
   if (cacheModel != null) {
    set.add(cacheModel);
   }
  }
  DefaultComboBoxModel comboModel = new DefaultComboBoxModel(set.toArray(new StandaloneCacheModel[0]));
  standaloneCacheSelector.setModel(comboModel);
 }
});

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

public void actionPerformed(ActionEvent ae) {
  stopCellEditing();
  standaloneCacheTableModel.clear();
  CacheManagerInstance cacheManagerInstance = (CacheManagerInstance) cacheManagerSelector.getSelectedItem();
  standaloneCacheTableModel.add(getSettingsList(cacheManagerInstance));
  standaloneCacheTableModel.fireTableDataChanged();
 }
});

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

public ContentsRetrievalResult call() throws Exception {
  ContentsRetrievalResult result = null;
  if (!tornDown.get()) {
   long minElapsedTime = 500;
   long startTime = System.currentTimeMillis();
   if (clusteredCacheToggle.isSelected()) {
    CacheModel selectedCacheModel = (CacheModel) clusteredCacheSelector.getSelectedItem();
    String cacheName = selectedCacheModel.getCacheName();
    result = new ContentsRetrievalResult();
    result.data = cacheManagerModel.toMap(cacheName, query, batchSize);
    result.totalElements = selectedCacheModel.getSize();
   } else {
    StandaloneCacheModel cacheModel = (StandaloneCacheModel) standaloneCacheSelector.getSelectedItem();
    result = new ContentsRetrievalResult();
    result.data = cacheModel.toMap(query, batchSize);
    result.totalElements = cacheModel.getSize();
   }
   long elapsedTime = System.currentTimeMillis() - startTime;
   if (elapsedTime < minElapsedTime) {
    Thread.sleep(minElapsedTime - elapsedTime);
   }
  }
  return result;
 }
});

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

public void actionPerformed(ActionEvent e) {
  String pu = (String) puSelector.getSelectedItem();
  if (pu != null) {
   if (pagedView.hasPage(pu)) {
    PersistenceUnitPanel puPage = (PersistenceUnitPanel) pagedView.getPage(pu);
    puPage.setViewBy(viewButtonSet.getSelected());
   }
  }
 }
}

代码示例来源:origin: org.terracotta.modules/tim-hibernate-cache-provider-3.2

public void actionPerformed(ActionEvent e) {
  String pu = (String) puSelector.getSelectedItem();
  if (pu != null) {
   if (pagedView.hasPage(pu)) {
    PersistenceUnitPanel puPage = (PersistenceUnitPanel) pagedView.getPage(pu);
    puPage.setViewBy(viewButtonSet.getSelected());
   }
  }
 }
}

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

public void actionPerformed(ActionEvent e) {
  String pu = (String) puSelector.getSelectedItem();
  if (pu != null) {
   if (pagedView.hasPage(pu)) {
    PersistenceUnitPanel puPage = (PersistenceUnitPanel) pagedView.getPage(pu);
    puPage.setViewBy(viewButtonSet.getSelected());
   }
  }
 }
}

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

public void standaloneCacheModelChanged(StandaloneCacheModel cacheModel) {
  CacheModelInstance cacheModelInstance = cacheModel.cacheModelInstance();
  CacheManagerInstance cacheManagerInstance = cacheModelInstance.getCacheManagerInstance();
  List<IMutableCacheSettings> settingsList = getSettingsList(cacheManagerInstance);
  for (int i = 0; i < settingsList.size(); i++) {
   IMutableCacheSettings settings = settingsList.get(i);
   if (settings.getCacheName().equals(cacheModel.getCacheName())) {
    settingsList.set(i, settings);
    break;
   }
  }

  if (cacheManagerInstance.equals(cacheManagerSelector.getSelectedItem())) {
   for (int i = 0; i < standaloneCacheTableModel.getRowCount(); i++) {
    IMutableCacheSettings settings = (IMutableCacheSettings) standaloneCacheTableModel.getObjectAt(i);
    if (settings.getCacheName().equals(cacheModel.getCacheName())) {
     standaloneCacheTableModel.remove(i);
     standaloneCacheTableModel.add(i, cacheModel.getCacheSettings());
     standaloneCacheTableModel.fireTableRowsUpdated(i, i);
     break;
    }
   }
  }
 }
}

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

public void standaloneCacheModelRemoved(StandaloneCacheModel cacheModel) {
 CacheModelInstance cacheModelInstance = cacheModel.cacheModelInstance();
 CacheManagerInstance cacheManagerInstance = cacheModelInstance.getCacheManagerInstance();
 removeStandaloneCacheSettings(cacheManagerInstance, cacheModel);
 if (cacheManagerInstance.equals(cacheManagerSelector.getSelectedItem())) {
  for (int i = 0; i < standaloneCacheTableModel.getRowCount(); i++) {
   IMutableCacheSettings settings = (IMutableCacheSettings) standaloneCacheTableModel.getObjectAt(i);
   if (settings.getCacheName().equals(cacheModel.getCacheName())) {
    standaloneCacheTableModel.remove(i);
    standaloneCacheTableModel.fireTableRowsDeleted(i, i);
    break;
   }
  }
 }
 evaluateVisibility();
 // If the settingsList is now null, there are no more standalone caches in the containing
 // CacheManagerInstance, so update the selector model so the CacheManagerInstance is removed.
 List<IMutableCacheSettings> settingsList = standaloneCacheSettings.get(cacheManagerInstance);
 if (settingsList == null) {
  updateCacheManageSelector();
 }
}

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

public void standaloneCacheModelAdded(StandaloneCacheModel cacheModel) {
 CacheModelInstance cacheModelInstance = cacheModel.cacheModelInstance();
 CacheManagerInstance cacheManagerInstance = cacheModelInstance.getCacheManagerInstance();
 boolean haveCacheManagerInstance = haveCacheManagerInstance(cacheManagerInstance);
 List<IMutableCacheSettings> settingsList = getSettingsList(cacheManagerInstance);
 // If we already have CacheManagerInstance in the selector model, then we need to update the settingsList
 // here, else getSettingsList properly set everything up already.
 if (haveCacheManagerInstance) {
  settingsList.add(cacheModel.getCacheSettings());
  sort(settingsList);
 }
 // If we didn't already have CacheManagerInstance in the selector model, update the selector model.
 if (!haveCacheManagerInstance) {
  updateCacheManageSelector();
 } else if (cacheManagerInstance.equals(cacheManagerSelector.getSelectedItem())) {
  standaloneCacheTableModel.add(cacheModel.getCacheSettings());
  standaloneCacheTableModel.sortColumn(0, XObjectTableModel.DOWN);
  standaloneCacheTableModel.fireTableDataChanged();
 }
 evaluateVisibility();
}

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

public void itemStateChanged(ItemEvent e) {
  IClusterModel theClusterModel = getClusterModel();
  if (theClusterModel == null) { return; }
  String cacheManagerName = (String) cacheManagerSelector.getSelectedItem();
  if (cacheManagerName != null) {
   CacheManagerPanel cacheManagerPage;
   if (!pagedView.hasPage(cacheManagerName)) {
    cacheManagerPage = new CacheManagerPanel();
    cacheManagerPage.setName(cacheManagerName);
    pagedView.addPage(cacheManagerPage);
    cacheManagerPage.setup(appContext, ehcacheModel.getCacheManagerModel(cacheManagerName));
   } else {
    cacheManagerPage = (CacheManagerPanel) pagedView.getPage(cacheManagerName);
   }
   pagedView.setPage(cacheManagerName);
  }
 }
}

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

public void itemStateChanged(ItemEvent e) {
  IClusterModel theClusterModel = getClusterModel();
  if (theClusterModel == null) { return; }
  String schedulerName = (String) schedulerSelector.getSelectedItem();
  if (schedulerName != null) {
   SchedulerPanel schedulerPage;
   if (!pagedView.hasPage(schedulerName)) {
    schedulerPage = new SchedulerPanel();
    schedulerPage.setName(schedulerName);
    pagedView.addPage(schedulerPage);
    schedulerPage.setup(appContext, quartzModel.getSchedulerModel(schedulerName));
   } else {
    schedulerPage = (SchedulerPanel) pagedView.getPage(schedulerName);
   }
   pagedView.setPage(schedulerName);
  }
 }
}

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

public void itemStateChanged(ItemEvent e) {
  IClusterModel theClusterModel = getClusterModel();
  if (theClusterModel == null) { return; }
  String cacheManagerName = (String) cacheManagerSelector.getSelectedItem();
  if (cacheManagerName != null) {
   CacheManagerPanel cacheManagerPage;
   if (!pagedView.hasPage(cacheManagerName)) {
    cacheManagerPage = new CacheManagerPanel();
    cacheManagerPage.setName(cacheManagerName);
    pagedView.addPage(cacheManagerPage);
    cacheManagerPage.setup(appContext, ehcacheModel.getCacheManagerModel(cacheManagerName));
   } else {
    cacheManagerPage = (CacheManagerPanel) pagedView.getPage(cacheManagerName);
   }
   pagedView.setPage(cacheManagerName);
  }
 }
}

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

public void itemStateChanged(ItemEvent e) {
  IClusterModel theClusterModel = getClusterModel();
  if (theClusterModel == null) { return; }
  String pu = (String) puSelector.getSelectedItem();
  if (pu != null) {
   PersistenceUnitPanel puPage;
   if (!pagedView.hasPage(pu)) {
    puPage = new PersistenceUnitPanel();
    puPage.setName(pu);
    pagedView.addPage(puPage);
    puPage.setup(appContext, theClusterModel, pu);
   } else {
    puPage = (PersistenceUnitPanel) pagedView.getPage(pu);
   }
   puPage.setViewBy(viewButtonSet.getSelected());
   pagedView.setPage(pu);
  } else {
   pagedView.setPage(EMPTY_PAGE_NAME);
  }
 }
}

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

public void itemStateChanged(ItemEvent e) {
  IClusterModel theClusterModel = getClusterModel();
  if (theClusterModel == null) { return; }
  String pu = (String) puSelector.getSelectedItem();
  if (pu != null) {
   PersistenceUnitPanel puPage;
   if (!pagedView.hasPage(pu)) {
    puPage = new PersistenceUnitPanel();
    puPage.setName(pu);
    pagedView.addPage(puPage);
    puPage.setup(appContext, theClusterModel, pu);
   } else {
    puPage = (PersistenceUnitPanel) pagedView.getPage(pu);
   }
   puPage.setViewBy(viewButtonSet.getSelected());
   pagedView.setPage(pu);
  } else {
   pagedView.setPage(EMPTY_PAGE_NAME);
  }
 }
}

代码示例来源:origin: org.terracotta.modules/tim-hibernate-cache-provider-3.2

public void itemStateChanged(ItemEvent e) {
  IClusterModel theClusterModel = getClusterModel();
  if (theClusterModel == null) { return; }
  String pu = (String) puSelector.getSelectedItem();
  if (pu != null) {
   PersistenceUnitPanel puPage;
   if (!pagedView.hasPage(pu)) {
    puPage = new PersistenceUnitPanel();
    puPage.setName(pu);
    pagedView.addPage(puPage);
    puPage.setup(appContext, theClusterModel, pu);
   } else {
    puPage = (PersistenceUnitPanel) pagedView.getPage(pu);
   }
   puPage.setViewBy(viewButtonSet.getSelected());
   pagedView.setPage(pu);
  } else {
   pagedView.setPage(EMPTY_PAGE_NAME);
  }
 }
}

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

public void itemStateChanged(ItemEvent e) {
  IClusterModel theClusterModel = getClusterModel();
  if (theClusterModel == null) { return; }
  String currentPage = pagedView.getPage();
  if (currentPage != null) {
   removeModelListeners(ehcacheModel.getCacheManagerModel(currentPage));
  }
  String cacheManagerName = (String) cacheManagerSelector.getSelectedItem();
  if (cacheManagerName != null) {
   CacheManagerPanel cacheManagerPage;
   if (!pagedView.hasPage(cacheManagerName)) {
    cacheManagerPage = new CacheManagerPanel();
    cacheManagerPage.setName(cacheManagerName);
    pagedView.addPage(cacheManagerPage);
    cacheManagerPage.setup(appContext, ehcacheModel.getCacheManagerModel(cacheManagerName));
   } else {
    cacheManagerPage = (CacheManagerPanel) pagedView.getPage(cacheManagerName);
   }
   pagedView.setPage(cacheManagerName);
   if (cacheManagerPage != null) {
    addModelListeners(cacheManagerPage.getCacheManagerModel());
   }
   handleSummaryText();
  }
 }
}

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