gpt4 book ai didi

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

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

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

XComboBox.getModel介绍

暂无

代码示例

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

private boolean haveCacheManagerInstance(CacheManagerInstance cacheManagerInstance) {
 DefaultComboBoxModel comboModel = (DefaultComboBoxModel) cacheManagerSelector.getModel();
 return comboModel.getIndexOf(cacheManagerInstance) != -1;
}

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

public void run() {
  if (tornDown.get()) { return; }
  String cacheManagerName = cacheManagerModel.getName();
  DefaultComboBoxModel puModel = (DefaultComboBoxModel) cacheManagerSelector.getModel();
  if (puModel.getIndexOf(cacheManagerName) == -1) {
   puModel.addElement(cacheManagerName);
   appContext.setStatus("Added Ehcache CacheManager '" + cacheManagerName + "'");
  }
  testAnyCacheManagers();
 }
});

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

private void init() {
 removeAll();
 if (tornDown.get()) { return; }
 addMBeanServerDelegateListener();
 IServer activeCoord = clusterModel.getActiveCoordinator();
 DefaultComboBoxModel puModel = (DefaultComboBoxModel) puSelector.getModel();
 try {
  ObjectName tmpl = new ObjectName(HibernateStatsUtils.STATS_BEAN_NAME_PREFIX + ",*");
  Set<ObjectName> onSet = activeCoord.queryNames(tmpl, null);
  Iterator<ObjectName> onIter = onSet.iterator();
  while (onIter.hasNext()) {
   ObjectName on = onIter.next();
   String persistenceUnit = on.getKeyProperty("instance");
   if (puModel.getIndexOf(persistenceUnit) == -1) {
    puModel.addElement(persistenceUnit);
   }
  }
 } catch (Exception e) {
  appContext.log(e);
 }
 testAnyPersistenceUnits();
}

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

public void run() {
  if (tornDown.get()) { return; }
  String cacheManagerName = cacheManagerModel.getName();
  DefaultComboBoxModel comboBoxModel = (DefaultComboBoxModel) cacheManagerSelector.getModel();
  if (comboBoxModel.getIndexOf(cacheManagerName) == -1) {
   comboBoxModel.addElement(cacheManagerName);
   appContext.setStatus("Added Ehcache CacheManager '" + cacheManagerName + "'");
   testAnyCacheManagers();
   if (cacheManagerSelector.getItemCount() == 1) {
    firePropertyChange(Presentation.PROP_PRESENTATION_READY, false, true);
   }
  }
 }
});

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

public void run() {
  if (tornDown.get()) { return; }
  String schedulerName = schedulerModel.getName();
  DefaultComboBoxModel comboModel = (DefaultComboBoxModel) schedulerSelector.getModel();
  if (comboModel.getIndexOf(schedulerName) == -1) {
   comboModel.addElement(schedulerName);
   appContext.setStatus("Added Quartz Scheduler '" + schedulerName + "'");
  }
  testAnySchedulers();
  if (schedulerSelector.getItemCount() == 1) {
   firePropertyChange(Presentation.PROP_PRESENTATION_READY, false, true);
  }
 }
});

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

private boolean testRegisterPersistenceUnit(ObjectName on) {
 boolean result = false;
 if (!tornDown.get()) {
  try {
   ObjectName tmpl = new ObjectName(HibernateStatsUtils.STATS_BEAN_NAME_PREFIX + ",*");
   if (tmpl.apply(on)) {
    DefaultComboBoxModel puModel = (DefaultComboBoxModel) puSelector.getModel();
    String persistenceUnit = on.getKeyProperty("instance");
    if (puModel.getIndexOf(persistenceUnit) == -1) {
     puModel.addElement(persistenceUnit);
     appContext.setStatus("Added Hibernate persistence-unit '" + persistenceUnit + "'");
     result = true;
    }
    testAnyPersistenceUnits();
   }
  } catch (Exception e) {
   appContext.log(e);
  }
 }
 return result;
}

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

public void run() {
  if (tornDown.get()) { return; }
  String cacheManagerName = cacheManagerModel.getName();
  DefaultComboBoxModel puModel = (DefaultComboBoxModel) cacheManagerSelector.getModel();
  if (puModel.getIndexOf(cacheManagerName) == -1) {
   puModel.addElement(cacheManagerName);
   appContext.setStatus("Added Ehcache CacheManager '" + cacheManagerName + "'");
  }
  testAnyCacheManagers();
  if (cacheManagerSelector.getItemCount() == 1) {
   firePropertyChange(Presentation.PROP_PRESENTATION_READY, false, true);
  }
 }
});

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

private void init() {
 removeAll();
 if (tornDown.get()) { return; }
 addMBeanServerDelegateListener();
 IServer activeCoord = clusterModel.getActiveCoordinator();
 DefaultComboBoxModel puModel = (DefaultComboBoxModel) puSelector.getModel();
 try {
  Set<ObjectName> onSet = activeCoord.queryNames(statsBeanPattern, null);
  Iterator<ObjectName> onIter = onSet.iterator();
  while (onIter.hasNext()) {
   ObjectName on = onIter.next();
   String persistenceUnit = on.getKeyProperty("name");
   if (puModel.getIndexOf(persistenceUnit) == -1) {
    puModel.addElement(persistenceUnit);
   }
  }
 } catch (Exception e) {
  appContext.log(e);
 }
 testAnyPersistenceUnits();
}

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

private boolean testRegisterPersistenceUnit(ObjectName on) {
 boolean result = false;
 if (!tornDown.get()) {
  try {
   if (statsBeanPattern.apply(on)) {
    DefaultComboBoxModel puModel = (DefaultComboBoxModel) puSelector.getModel();
    String persistenceUnit = on.getKeyProperty("name");
    if (puModel.getIndexOf(persistenceUnit) == -1) {
     puModel.addElement(persistenceUnit);
     appContext.setStatus("Added Hibernate persistence-unit '" + persistenceUnit + "'");
     result = true;
    }
    testAnyPersistenceUnits();
   }
  } catch (Exception e) {
   appContext.log(e);
  }
 }
 return result;
}

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

private boolean testRegisterPersistenceUnit(ObjectName on) {
 boolean result = false;
 if (!tornDown.get()) {
  try {
   if (statsBeanPattern.apply(on)) {
    DefaultComboBoxModel puModel = (DefaultComboBoxModel) puSelector.getModel();
    String persistenceUnit = on.getKeyProperty("name");
    if (puModel.getIndexOf(persistenceUnit) == -1) {
     puModel.addElement(persistenceUnit);
     appContext.setStatus("Added Hibernate persistence-unit '" + persistenceUnit + "'");
     result = true;
    }
    testAnyPersistenceUnits();
    if (puSelector.getItemCount() == 1) {
     firePropertyChange(Presentation.PROP_PRESENTATION_READY, false, true);
    }
   }
  } catch (Exception e) {
   appContext.log(e);
  }
 }
 return result;
}

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

private void init() {
 if (tornDown.get()) { return; }
 removeAll();
 puSelector.removeAllItems();
 addMBeanServerDelegateListener();
 IServer activeCoord = clusterModel.getActiveCoordinator();
 DefaultComboBoxModel puModel = (DefaultComboBoxModel) puSelector.getModel();
 try {
  Set<ObjectName> onSet = activeCoord.queryNames(statsBeanPattern, null);
  Iterator<ObjectName> onIter = onSet.iterator();
  while (onIter.hasNext()) {
   ObjectName on = onIter.next();
   String persistenceUnit = on.getKeyProperty("name");
   if (puModel.getIndexOf(persistenceUnit) == -1) {
    puModel.addElement(persistenceUnit);
   }
  }
  boolean isReady = isReady();
  firePropertyChange(Presentation.PROP_PRESENTATION_READY, !isReady, isReady);
 } catch (Exception e) {
  appContext.log(e);
 }
 testAnyPersistenceUnits();
}

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

public void run() {
  if (tornDown.get()) { return; }
  String cacheManagerName = cacheManagerModel.getName();
  DefaultComboBoxModel comboBoxModel = (DefaultComboBoxModel) cacheManagerSelector.getModel();
  int index = comboBoxModel.getIndexOf(cacheManagerName);
  if (index != -1) {
   CacheManagerPanel page = (CacheManagerPanel) pagedView.getComponent(index);
   pagedView.remove(index);
   comboBoxModel.removeElementAt(index);
   page.tearDown();
   appContext.setStatus("Removed Ehcache CacheManager '" + cacheManagerName + "'");
  }
 }
});

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

public void run() {
  if (tornDown.get()) { return; }
  String cacheManagerName = cacheManagerModel.getName();
  DefaultComboBoxModel comboBoxModel = (DefaultComboBoxModel) cacheManagerSelector.getModel();
  int index = comboBoxModel.getIndexOf(cacheManagerName);
  if (index != -1) {
   CacheManagerPanel page = (CacheManagerPanel) pagedView.getComponent(index);
   pagedView.remove(index);
   comboBoxModel.removeElementAt(index);
   page.tearDown();
   appContext.setStatus("Removed Ehcache CacheManager '" + cacheManagerName + "'");
  }
  if (cacheManagerSelector.getItemCount() == 0) {
   firePropertyChange(Presentation.PROP_PRESENTATION_READY, true, false);
  }
 }
});

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

public void run() {
  if (tornDown.get()) { return; }
  String cacheManagerName = cacheManagerModel.getName();
  DefaultComboBoxModel comboBoxModel = (DefaultComboBoxModel) cacheManagerSelector.getModel();
  int index = comboBoxModel.getIndexOf(cacheManagerName);
  if (index != -1) {
   CacheManagerPanel page = (CacheManagerPanel) pagedView.getPage(cacheManagerName);
   if (page != null) {
    pagedView.removePage(cacheManagerName);
    page.tearDown();
   }
   comboBoxModel.removeElementAt(index);
   appContext.setStatus("Removed Ehcache CacheManager '" + cacheManagerName + "'");
   testAnyCacheManagers();
   if (cacheManagerSelector.getItemCount() == 0) {
    firePropertyChange(Presentation.PROP_PRESENTATION_READY, true, false);
   }
  }
 }
});

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

public void run() {
  if (tornDown.get()) { return; }
  String schedulerName = schedulerModel.getName();
  DefaultComboBoxModel comboBoxModel = (DefaultComboBoxModel) schedulerSelector.getModel();
  int index = comboBoxModel.getIndexOf(schedulerName);
  if (index != -1) {
   SchedulerPanel page = (SchedulerPanel) pagedView.getComponent(index);
   pagedView.remove(index);
   comboBoxModel.removeElementAt(index);
   page.tearDown();
   appContext.setStatus("Removed Quartz Scheduler '" + schedulerName + "'");
  }
  testAnySchedulers();
  if (schedulerSelector.getItemCount() == 0) {
   firePropertyChange(Presentation.PROP_PRESENTATION_READY, true, false);
  }
 }
});

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

private void testAnyCacheManagers() {
 boolean changedHierarchy = false;
 DefaultComboBoxModel puModel = (DefaultComboBoxModel) cacheManagerSelector.getModel();
 if (puModel.getSize() == 0) {
  if (mainPanel.isShowing()) {
   removeAll();
  }
  messageLabel.setText(bundle.getString("no.cache-managers.msg"));
  if (!messagePanel.isShowing()) {
   add(messagePanel);
   changedHierarchy = true;
  }
 } else {
  if (messagePanel.isShowing()) {
   removeAll();
  }
  if (!mainPanel.isShowing()) {
   add(mainPanel);
   changedHierarchy = true;
  }
 }
 if (changedHierarchy) {
  revalidate();
  repaint();
 }
}

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

private void testAnyPersistenceUnits() {
 boolean changedHierarchy = false;
 DefaultComboBoxModel puModel = (DefaultComboBoxModel) puSelector.getModel();
 if (puModel.getSize() == 0) {
  if (mainPanel.isShowing()) {
   removeAll();
  }
  messageLabel.setText(bundle.getString("no.session-factories.msg"));
  if (!messagePanel.isShowing()) {
   add(messagePanel);
   changedHierarchy = true;
  }
 } else {
  if (messagePanel.isShowing()) {
   removeAll();
  }
  if (!mainPanel.isShowing()) {
   add(mainPanel);
   changedHierarchy = true;
  }
 }
 if (changedHierarchy) {
  revalidate();
  repaint();
 }
}

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

private void testAnyCacheManagers() {
 boolean changedHierarchy = false;
 DefaultComboBoxModel puModel = (DefaultComboBoxModel) cacheManagerSelector.getModel();
 if (puModel.getSize() == 0) {
  if (mainPanel.getParent() != null) {
   removeAll();
  }
  messageLabel.setText(bundle.getString("no.cache-managers.msg"));
  if (messagePanel.getParent() == null) {
   add(messagePanel);
   changedHierarchy = true;
  }
 } else {
  if (messagePanel.getParent() != null) {
   removeAll();
  }
  if (mainPanel.getParent() == null) {
   add(mainPanel);
   changedHierarchy = true;
  }
 }
 if (changedHierarchy) {
  revalidate();
  repaint();
 }
}

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

private void testAnyCacheManagers() {
 boolean changedHierarchy = false;
 DefaultComboBoxModel puModel = (DefaultComboBoxModel) cacheManagerSelector.getModel();
 if (puModel.getSize() == 0) {
  if (mainPanel.isShowing()) {
   removeAll();
  }
  messageLabel.setText(bundle.getString("no.cache-managers.msg"));
  if (!messagePanel.isShowing()) {
   add(messagePanel);
   changedHierarchy = true;
  }
 } else {
  if (messagePanel.isShowing()) {
   removeAll();
  }
  if (!mainPanel.isShowing()) {
   add(mainPanel);
   changedHierarchy = true;
  }
 }
 if (changedHierarchy) {
  revalidate();
  repaint();
 }
}

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

private void testAnyPersistenceUnits() {
 boolean changedHierarchy = false;
 DefaultComboBoxModel puModel = (DefaultComboBoxModel) puSelector.getModel();
 if (puModel.getSize() == 0) {
  if (mainPanel.isShowing()) {
   removeAll();
  }
  messageLabel.setText(bundle.getString("no.session-factories.msg"));
  if (!messagePanel.isShowing()) {
   add(messagePanel);
   changedHierarchy = true;
  }
 } else {
  if (messagePanel.isShowing()) {
   removeAll();
  }
  if (!mainPanel.isShowing()) {
   add(mainPanel);
   changedHierarchy = true;
  }
 }
 if (changedHierarchy) {
  revalidate();
  repaint();
 }
}

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