gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-20 21:43:40 25 4
gpt4 key购买 nike

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

XObjectTableModel.add介绍

暂无

代码示例

代码示例来源: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-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-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-hibernate-cache-provider-3.2

@Override
 protected void finished() {
  if (tornDown.get()) { return; }
  Exception e = getException();
  if (e != null) {
   appContext.log(ExceptionHelper.getRootCause(e));
  } else {
   Map<String, EntityStats> result = getResult();
   entityTableModel.clear();
   if (result != null) {
    Iterator<String> iter = result.keySet().iterator();
    while (iter.hasNext()) {
     EntityStats entityStats = result.get(iter.next());
     if (entityStats != null) {
      entityTableModel.add(entityStats);
     }
    }
    sortTable(entityTable);
   }
  }
  refreshEntitiesButton.setText(appContext.getString("refresh"));
  refreshEntitiesButton.setEnabled(true);
 }
}

代码示例来源: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-hibernate-cache-provider-3.2

@Override
 protected void finished() {
  if (tornDown.get()) { return; }
  Exception e = getException();
  if (e != null) {
   appContext.log(ExceptionHelper.getRootCause(e));
  } else {
   collectionTableModel.clear();
   Map<String, CollectionStats> result = getResult();
   if (result != null) {
    Iterator<String> iter = result.keySet().iterator();
    while (iter.hasNext()) {
     CollectionStats collectionStats = result.get(iter.next());
     if (collectionStats != null) {
      collectionTableModel.add(collectionStats);
     }
    }
    sortTable(collectionTable);
   }
  }
  refreshCollectionsButton.setText(appContext.getString("refresh"));
  refreshCollectionsButton.setEnabled(true);
 }
}

代码示例来源: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 {
   collectionTableModel.clear();
   Map<String, CollectionStats> result = getResult();
   if (result != null) {
    Iterator<String> iter = result.keySet().iterator();
    while (iter.hasNext()) {
     CollectionStats collectionStats = result.get(iter.next());
     if (collectionStats != null) {
      collectionTableModel.add(collectionStats);
     }
    }
    sortTable(collectionTable);
   }
  }
  refreshCollectionsButton.setText(appContext.getString("refresh"));
  refreshCollectionsButton.setEnabled(true);
 }
}

代码示例来源: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, EntityStats> result = getResult();
   entityTableModel.clear();
   if (result != null) {
    Iterator<String> iter = result.keySet().iterator();
    while (iter.hasNext()) {
     EntityStats entityStats = result.get(iter.next());
     if (entityStats != null) {
      entityTableModel.add(entityStats);
     }
    }
    sortTable(entityTable);
   }
  }
  refreshEntitiesButton.setText(appContext.getString("refresh"));
  refreshEntitiesButton.setEnabled(true);
 }
}

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

@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.setText(appContext.getString("refresh"));
  refreshRegionsButton.setEnabled(true);
 }
}

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

@Override
 protected void finished() {
  if (tornDown.get()) { return; }
  Exception e = getException();
  if (e != null) {
   appContext.log(ExceptionHelper.getRootCause(e));
  } else {
   Map<String, QueryStats> result = getResult();
   queryTableModel.clear();
   if (result != null) {
    Iterator<String> iter = result.keySet().iterator();
    while (iter.hasNext()) {
     QueryStats queryStats = result.get(iter.next());
     if (queryStats != null) {
      queryTableModel.add(queryStats);
     }
    }
    sortTable(queryTable);
   }
  }
  refreshQueriesButton.setText(appContext.getString("refresh"));
  refreshQueriesButton.setEnabled(true);
 }
}

代码示例来源: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, QueryStats> result = getResult();
   queryTableModel.clear();
   if (result != null) {
    Iterator<String> iter = result.keySet().iterator();
    while (iter.hasNext()) {
     QueryStats queryStats = result.get(iter.next());
     if (queryStats != null) {
      queryTableModel.add(queryStats);
     }
    }
    sortTable(queryTable);
   }
  }
  refreshQueriesButton.setText(appContext.getString("refresh"));
  refreshQueriesButton.setEnabled(true);
 }
}

代码示例来源: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, QueryStats> result = getResult();
   queryTableModel.clear();
   if (result != null) {
    Iterator<String> iter = result.keySet().iterator();
    while (iter.hasNext()) {
     QueryStats queryStats = result.get(iter.next());
     if (queryStats != null) {
      queryTableModel.add(queryStats);
     }
    }
    sortTable(queryTable);
   }
  }
  refreshQueriesButton.setText(appContext.getString("refresh"));
  refreshQueriesButton.setEnabled(true);
 }
}

代码示例来源: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, EntityStats> result = getResult();
   entityTableModel.clear();
   if (result != null) {
    Iterator<String> iter = result.keySet().iterator();
    while (iter.hasNext()) {
     EntityStats entityStats = result.get(iter.next());
     if (entityStats != null) {
      entityTableModel.add(entityStats);
     }
    }
    sortTable(entityTable);
   }
  }
  refreshEntitiesButton.setText(appContext.getString("refresh"));
  refreshEntitiesButton.setEnabled(true);
 }
}

代码示例来源: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 {
   collectionTableModel.clear();
   Map<String, CollectionStats> result = getResult();
   if (result != null) {
    Iterator<String> iter = result.keySet().iterator();
    while (iter.hasNext()) {
     CollectionStats collectionStats = result.get(iter.next());
     if (collectionStats != null) {
      collectionTableModel.add(collectionStats);
     }
    }
    sortTable(collectionTable);
   }
  }
  refreshCollectionsButton.setText(appContext.getString("refresh"));
  refreshCollectionsButton.setEnabled(true);
 }
}

代码示例来源: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-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 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 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();
}

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