- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.tc.admin.common.XComboBox.getSelectedItem()
方法的一些代码示例,展示了XComboBox.getSelectedItem()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XComboBox.getSelectedItem()
方法的具体详情如下:
包路径:com.tc.admin.common.XComboBox
类名称: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();
}
}
}
我使用以下 String[] 数组调用 Spinner: String[] quantity = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "
我的 java 程序有问题,我正在尝试使用 JComboBox 和 JButton 获取 if 语句的一些信息。问题是 .getSelectedItem() 未定义,我不知道该怎么办。这些是组合框:
刚接触 java,我不明白为什么我的 Action 监听器不能在 jcombobox 上工作。我想我已经按照网上的其他示例来 getSelectedItem,但没有发生任何事情。仅供引用,我的项目是一
我正在尝试使用微调器控制结果,以便将其指向应用程序上的另一个屏幕。例如,在微调器控件中,如果用户选择 chevy,它会将您带到另一个在 chevy.xml 和 Chevy.class 中编码的屏幕。这
问你一个简单的问题,我输入了这段代码,我看到了组合框和标签,但在选择组合后,标签应该带有图像。这不会发生......当然我忘记了什么 import java.awt.*; import java.aw
我有一个带有类别列表的 Spinner,它从 JSON 获取数据。我想做的是,当选择 All Category 以外的项目时,子类别的另一个微调器变得可见,并根据其类别从 JSON 加载数据。 以前我
我正在将一个 JComboBox 绑定(bind)到一个可观察的 List。我从可观察列表中清除并添加 Objects。这工作正常并正确反射(reflect)了 JComboBox 中的更改。 问题是
我创建了一个 Spinner,带有 Custom 适配器,他看起来像这样。 但是,在我的 Activity 上,当我点击保存按钮时,我尝试 getSelectedItem() 或 getSelecte
蓝牙测试.java colourSpinner = (Spinner) findViewById(R.id.colourSpinner); ArrayAdapter adapter = Arr
我刚刚阅读了 JComboBox 的 JavaDoc(我保证我有自己的生活...我阅读并不是为了好玩。=P),我认为我的程序遇到的问题可以归因于getSelectedItem()方法。文档说: Ret
在 Swing 中使用 JComboBox 并读取所有接口(interface)和类及其各种属性时,我不会对 ComboBoxEditor 的 getItem 之间的问题感到困惑 方法,以及 JCom
我有一个由数组填充的组合框(不一定是)。一旦做出选择,我需要将其用作对类(它的对象)的引用并返回另一个对象值。 public class MenuItem { static int calories;
我只是刚开始学习 OOP,对于这篇基础文章,我深表歉意。我不知道为什么当我试图在我的 JComboBox 中获取所选项目的值时它会返回 null。 public class AddEmployee e
如果列表无法保持所选项目的状态,ListView 中的 getSelectedItem() 的目的是什么? 最佳答案 如果您要使用复选框或选中的 TextView ,它可以跟踪选定的项目,但是如果您想
我在尝试访问 spn_make 上的 getSelectedItem().toString() 时遇到 NULL 指针异常。 CustomAdapter adapter = new C
我有一个带有 listView 的 android Activity 。当我点击列表中的一个项目时,我想打印我点击的内容,所以我这样写: listView.setOnItemClickListener
我有一个 Spinner,并将所选项目放入邮件正文中。这是我的代码: @Override protected void onCreate(Bundle savedInstanceState) {
这是我的代码,用于获取在我的 CListViewCtrl 中选择的项目的名称: LVITEM item = { LVIF_PARAM }; CString itemText; clistViewCtr
我有一个 ListView 和一个 ListView 外的按钮。我希望用户在 ListView 中选择一个项目,然后在单击按钮时我想获取 ListView 的选定项目。我已将choiceMode 设置
我有一个带字符串的 JCombobox,我想选择一个。我按照 documetary 上的说明进行操作并按照那里的建议创建了数组。我需要字符串将其进一步传递给另一个类。如果我想传递 s,它将不起作用,因
我是一名优秀的程序员,十分优秀!