- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.tc.admin.common.XObjectTableModel
类的一些代码示例,展示了XObjectTableModel
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XObjectTableModel
类的具体详情如下:
包路径:com.tc.admin.common.XObjectTableModel
类名称:XObjectTableModel
暂无
代码示例来源: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.0
@Override
public String getToolTipText(MouseEvent me) {
int hitRowIndex = rowAtPoint(me.getPoint());
int hitColIndex = columnAtPoint(me.getPoint());
if (hitRowIndex != -1) {
if (hitColIndex == 0) {
CacheStatisticsModel crs = (CacheStatisticsModel) cacheTableModel.getObjectAt(hitRowIndex);
return crs.getCacheName();
} else if (hitColIndex > 1) {
int sum = 0;
for (int i = 0; i < cacheTableModel.getRowCount(); i++) {
Number n = (Number) cacheTableModel.getValueAt(i, hitColIndex);
sum += n.intValue();
}
return Integer.toString(sum) + " Total " + cacheTableModel.getColumnName(hitColIndex);
}
}
return super.getToolTipText(me);
}
};
代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.x-ui
public void clusteredCacheModelChanged(ClusteredCacheModel cacheModel) {
for (int i = 0; i < clusteredCacheTableModel.getRowCount(); i++) {
IMutableCacheSettings settings = (IMutableCacheSettings) clusteredCacheTableModel.getObjectAt(i);
if (settings.getCacheName().equals(cacheModel.getCacheName())) {
clusteredCacheTableModel.remove(i);
clusteredCacheTableModel.add(i, cacheModel.getCacheSettings());
clusteredCacheTableModel.fireTableRowsUpdated(i, i);
break;
}
}
}
代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.x-ui
public void clusteredCacheModelAdded(ClusteredCacheModel cacheModel) {
clusteredCacheTableModel.add(cacheModel.getCacheSettings());
clusteredCacheTableModel.sortColumn(0, XObjectTableModel.DOWN);
clusteredCacheTableModel.fireTableDataChanged();
evaluateVisibility();
}
代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.0-hibernate-ui
@Override
protected void finished() {
if (tornDown.get()) { return; }
Exception e = getException();
if (e != null) {
appContext.log(ExceptionHelper.getRootCause(e));
} else {
Map<String, ? extends CacheRegionStats> result = getResult();
regionTableModel.clear();
if (result != null) {
Iterator<String> iter = result.keySet().iterator();
while (iter.hasNext()) {
CacheRegionStats cacheRegionStats = result.get(iter.next());
if (cacheRegionStats != null) {
regionTableModel.add(cacheRegionStats);
}
}
sortTable(regionTable);
}
}
refreshRegionsButton.setEnabled(true);
}
}
代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.0
private int indexOf(CacheModel cacheModel) {
int rowCount = cacheTableModel.getRowCount();
for (int i = 0; i < rowCount; i++) {
CacheStatisticsModel cacheStatisticsModel = (CacheStatisticsModel) cacheTableModel.getObjectAt(i);
if (cacheStatisticsModel.getCacheName().equals(cacheModel.getCacheName())) { return i; }
}
return -1;
}
代码示例来源:origin: org.terracotta.modules/tim-hibernate-cache-provider-3.2
private void sortTable(final XObjectTable table) {
table.sort();
((XObjectTableModel) table.getModel()).fireTableDataChanged();
}
代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.x-ui
@Override
public void tearDown() {
if (!tornDown.compareAndSet(false, true)) { return; }
cacheManagerModel.removeCacheManagerModelListener(this);
super.tearDown();
synchronized (this) {
cacheManagerModel = null;
cacheTable = null;
cacheTableModel.clear();
cacheTableModel = null;
refreshStatisticsAction = null;
clearStatisticsAction = null;
}
}
}
代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.x-ui
public void clusteredCacheModelRemoved(ClusteredCacheModel cacheModel) {
for (int i = 0; i < clusteredCacheTableModel.getRowCount(); i++) {
IMutableCacheSettings settings = (IMutableCacheSettings) clusteredCacheTableModel.getObjectAt(i);
if (settings.getCacheName().equals(cacheModel.getCacheName())) {
clusteredCacheTableModel.remove(i);
clusteredCacheTableModel.fireTableRowsDeleted(i, i);
break;
}
}
evaluateVisibility();
}
代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.0
public void valueChanged(ListSelectionEvent e) {
if (!e.getValueIsAdjusting()) {
CacheModel cacheModel = null;
int row = cacheTable.getSelectedRow();
if (row != -1) {
CacheStatisticsModel cacheStatisticsModel = (CacheStatisticsModel) cacheTableModel.getObjectAt(row);
cacheModel = cacheManagerModel.getCacheModel(cacheStatisticsModel.getCacheName());
}
setSelectedCacheModel(cacheModel);
}
}
代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.x-ui
private XContainer createClusteredPanel() {
clusteredCacheTableModel = new XObjectTableModel(IMutableCacheSettings.class, ATTRS, HEADERS);
Iterator<ClusteredCacheModel> cacheModelIter = cacheManagerModel.clusteredCacheModelIterator();
while (cacheModelIter.hasNext()) {
clusteredCacheTableModel.add(cacheModelIter.next().getCacheSettings());
}
clusteredCacheTable = new SettingsTable(clusteredCacheTableModel);
clusteredCacheTable.getColumnModel().getColumn(0).setCellRenderer(new CacheNameRenderer(true));
clusteredCacheTable.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
Point p = e.getPoint();
int col = clusteredCacheTable.columnAtPoint(p);
int row = clusteredCacheTable.rowAtPoint(p);
if (col != -1 && row != -1) {
clusteredCacheTable.editCellAt(row, col, null);
}
}
});
XScrollPane scroller = new XScrollPane(clusteredCacheTable);
XContainer result = new XContainer(new BorderLayout());
result.setBorder(BorderFactory.createTitledBorder("Terracotta-clustered Caches"));
result.add(scroller);
return result;
}
代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.x-hibernate-ui
@Override
protected void finished() {
if (tornDown.get()) { return; }
Exception e = getException();
if (e != null) {
appContext.log(ExceptionHelper.getRootCause(e));
} else {
Map<String, ? extends CacheRegionStats> result = getResult();
regionTableModel.clear();
if (result != null) {
Iterator<String> iter = result.keySet().iterator();
while (iter.hasNext()) {
CacheRegionStats cacheRegionStats = result.get(iter.next());
if (cacheRegionStats != null) {
regionTableModel.add(cacheRegionStats);
}
}
sortTable(regionTable);
}
}
refreshRegionsButton.setEnabled(true);
}
}
代码示例来源: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
private int indexOf(CacheModel cacheModel) {
int rowCount = cacheTableModel.getRowCount();
for (int i = 0; i < rowCount; i++) {
CacheStatisticsModel cacheStatisticsModel = (CacheStatisticsModel) cacheTableModel.getObjectAt(i);
if (cacheStatisticsModel.getCacheName().equals(cacheModel.getCacheName())) { return i; }
}
return -1;
}
代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.x-hibernate-ui
private void sortTable(final XObjectTable table) {
table.sort();
((XObjectTableModel) table.getModel()).fireTableDataChanged();
}
代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.x-hibernate-ui
tabbedPane = null;
entityTable = null;
entityTableModel.clear();
entityTableModel = null;
refreshEntitiesButton = null;
collectionTable = null;
collectionTableModel.clear();
collectionTableModel = null;
refreshCollectionsButton = null;
queryTable = null;
queryTableModel.clear();
queryTableModel = null;
refreshQueriesButton = null;
代码示例来源: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-2.x-ui
public void valueChanged(ListSelectionEvent e) {
if (!e.getValueIsAdjusting()) {
CacheModel cacheModel = null;
int row = cacheTable.getSelectedRow();
if (row != -1) {
CacheStatisticsModel cacheStatisticsModel = (CacheStatisticsModel) cacheTableModel.getObjectAt(row);
cacheModel = cacheManagerModel.getCacheModel(cacheStatisticsModel.getCacheName());
}
setSelectedCacheModel(cacheModel);
}
}
代码示例来源:origin: org.terracotta.modules/tim-ehcache-2.0-hibernate-ui
@Override
public String getToolTipText(MouseEvent me) {
int hitRowIndex = rowAtPoint(me.getPoint());
int hitColIndex = columnAtPoint(me.getPoint());
if (hitRowIndex != -1) {
if (hitColIndex == 0) {
EntityStats es = (EntityStats) entityTableModel.getObjectAt(hitRowIndex);
return es.getName();
} else {
int sum = 0;
for (int i = 0; i < entityTableModel.getRowCount(); i++) {
Number n = (Number) entityTableModel.getValueAt(i, hitColIndex);
sum += n.intValue();
}
return Integer.toString(sum) + " Total " + entityTableModel.getColumnName(hitColIndex);
}
}
return super.getToolTipText(me);
}
};
本文整理了Java中com.tc.admin.common.XObjectTableModel.getColumnName()方法的一些代码示例,展示了XObjectTableModel.getCol
本文整理了Java中com.tc.admin.common.XObjectTableModel.getObjectAt()方法的一些代码示例,展示了XObjectTableModel.getObjec
本文整理了Java中com.tc.admin.common.XObjectTableModel.add()方法的一些代码示例,展示了XObjectTableModel.add()的具体用法。这些代码示
本文整理了Java中com.tc.admin.common.XObjectTableModel.fireTableDataChanged()方法的一些代码示例,展示了XObjectTableModel
本文整理了Java中com.tc.admin.common.XObjectTableModel.getValueAt()方法的一些代码示例,展示了XObjectTableModel.getValueA
本文整理了Java中com.tc.admin.common.XObjectTableModel.getRowCount()方法的一些代码示例,展示了XObjectTableModel.getRowCo
我是一名优秀的程序员,十分优秀!