gpt4 book ai didi

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

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

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

XObjectTable.setSelectedRow介绍

暂无

代码示例

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

public void setSelectedCacheModel(CacheModel cacheModel) {
 int index = tableModel.getObjectIndex(cacheModel);
 if (index != -1) {
  table.setSelectedRow(index);
 }
}

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

public void run() {
  if (tornDown.get()) { return; }
  if (cacheModel != null) {
   tableModel.add(cacheModel);
   table.sort();
   int row = tableModel.getRowCount() - 1;
   tableModel.fireTableRowsInserted(row, row);
   if (row == 0) {
    table.setSelectedRow(0);
   }
   updateSummaryLabel();
  }
 }
});

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

public void run() {
  if (tornDown.get()) { return; }
  nodeSummaryTableModel.add(instance);
  int row = nodeSummaryTableModel.getRowCount() - 1;
  nodeSummaryTableModel.fireTableRowsInserted(row, row);
  if (row == 0 && instance.getInstanceCount() > 0) {
   nodeSummaryTable.setSelectedRow(0);
  }
  instance.addCacheManagerInstanceListener(CacheManagerTopologyPanel.this);
 }
});

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

@Override
 protected void finished() {
  if (tornDown.get()) { return; }
  Exception e = getException();
  if (e != null) {
   appContext.log(ExceptionHelper.getRootCause(e));
  } else {
   setCacheTableModel(getResult());
   if (selectedRow != -1) {
    cacheTable.setSelectedRow(selectedRow);
   } else if (selectedCacheModel != null) {
    selectedRow = indexOf(selectedCacheModel);
    if (selectedRow != -1) {
     cacheTable.setSelectedRow(selectedRow);
    }
   }
  }
  refreshButton.setEnabled(true);
 }
}

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

@Override
 protected void finished() {
  if (tornDown.get()) { return; }
  Exception e = getException();
  if (e != null) {
   appContext.log(ExceptionHelper.getRootCause(e));
  } else {
   setCacheTableModel(getResult());
   if (selectedRow != -1) {
    cacheTable.setSelectedRow(selectedRow);
   } else if (selectedCacheModel != null) {
    selectedRow = indexOf(selectedCacheModel);
    if (selectedRow != -1) {
     cacheTable.setSelectedRow(selectedRow);
    }
   }
  }
  refreshStatisticsAction.setEnabled(true);
 }
}

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

@Override
protected void init() {
 if (tornDown.get()) { return; }
 for (Iterator<CacheManagerInstance> iter = cacheManagerModel.cacheManagerInstanceIterator(); iter.hasNext();) {
  CacheManagerInstance instance = iter.next();
  nodeSummaryTableModel.add(instance);
  instance.addCacheManagerInstanceListener(this);
 }
 nodeSummaryTableModel.fireTableDataChanged();
 if (selectedCacheManagerInstances != null) {
  nodeSummaryTable.setSelection(selectedCacheManagerInstances.toArray(new CacheManagerInstance[0]));
  selectedCacheManagerInstances = null;
 } else if (nodeSummaryTableModel.getRowCount() > 0) {
  CacheManagerInstance instance = (CacheManagerInstance) nodeSummaryTableModel.getObjectAt(0);
  if (instance.getInstanceCount() > 0) {
   nodeSummaryTable.setSelectedRow(0);
  }
 }
}

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

public void setSelectedCacheModel(CacheModel cacheModel) {
 CacheModel oldSelectedCacheModel = this.selectedCacheModel;
 synchronized (this) {
  this.selectedCacheModel = cacheModel;
  if (cacheModel != null) {
   for (int i = 0; i < cacheTableModel.getRowCount(); i++) {
    CacheStatisticsModel cacheStatisticsModel = (CacheStatisticsModel) cacheTableModel.getObjectAt(i);
    if (cacheModel.getCacheName().equals(cacheStatisticsModel.getCacheName())) {
     cacheTable.setSelectedRow(i);
     break;
    }
   }
  }
 }
 if (oldSelectedCacheModel != cacheModel) {
  firePropertyChange("SelectedCacheModel", oldSelectedCacheModel, cacheModel);
 }
}

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

public void setSelectedCacheModel(CacheModel cacheModel) {
 CacheModel oldSelectedCacheModel = this.selectedCacheModel;
 synchronized (this) {
  this.selectedCacheModel = cacheModel;
  if (cacheModel != null) {
   for (int i = 0; i < cacheTableModel.getRowCount(); i++) {
    CacheStatisticsModel cacheStatisticsModel = (CacheStatisticsModel) cacheTableModel.getObjectAt(i);
    if (cacheModel.getCacheName().equals(cacheStatisticsModel.getCacheName())) {
     cacheTable.setSelectedRow(i);
     break;
    }
   }
  }
 }
 if (oldSelectedCacheModel != cacheModel) {
  firePropertyChange("SelectedCacheModel", oldSelectedCacheModel, cacheModel);
 }
 makeCoherentAction.update();
}

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

@Override
 protected void finished() {
  if (tornDown.get()) { return; }
  Exception e = getException();
  if (e != null) {
   appContext.log(ExceptionHelper.getRootCause(e));
  } else {
   table.setModel(tableModel = getResult());
   if (tableModel.getRowCount() > 0) {
    table.setSelectedRow(0);
   }
   updateSummaryLabel();
   cacheManagerModel.addCacheManagerModelListener(EhcacheConfigPanel.this);
   showConfigButton.setEnabled(true);
  }
 }
}

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