gpt4 book ai didi

com.tc.admin.common.XContainer类的使用及代码示例

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

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

XContainer介绍

暂无

代码示例

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

protected XContainer createVuMeterPanel() {
 XContainer panel = new XContainer(new BorderLayout());
 panel.add(createLegend(), BorderLayout.NORTH);
 panel.add(vuMeterPanel = new VuMeterPanel(appContext), BorderLayout.CENTER);
 panel.setBorder(BorderFactory.createTitledBorder("Cluster-wide Activity"));
 return panel;
}

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

@Override
 public void tearDown() {
  if (!tornDown.compareAndSet(false, true)) { return; }

  synchronized (this) {
   clusterModel = null;
   appContext = null;
   regionInfoMap.clear();
   regionInfoMap = null;
   summaryLabel = null;
   tableModel.clear();
   table = null;
   tableModel = null;
   detailPanel = null;
   beanProvider = null;
   showConfigButton = null;
  }
  super.tearDown();
 }
}

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

private void evaluateVisibility() {
 Set<ClusteredCacheModel> clusteredCacheModels = cacheManagerModel.clusteredCacheModels();
 boolean haveClustered = clusteredCacheModels.size() > 0;
 if (haveClustered && clusteredPanel.getParent() == null) {
  mainPanel.add(clusteredPanel, clusteredConstraint);
 } else if (!haveClustered && clusteredPanel.getParent() != null) {
  mainPanel.remove(clusteredPanel);
 }
 Map<CacheModelInstance, StandaloneCacheModel> standaloneCacheModels = cacheManagerModel.standaloneCacheModels();
 boolean haveStandalone = standaloneCacheModels.size() > 0;
 if (haveStandalone && standalonePanel.getParent() == null) {
  mainPanel.add(standalonePanel, standaloneConstraint);
  cacheManagerSelector.setSelectedIndex(0);
 } else if (!haveStandalone && standalonePanel.getParent() != null) {
  mainPanel.remove(standalonePanel);
 }
 mainPanel.revalidate();
 mainPanel.repaint();
}

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

private XContainer createMainPanel(boolean globalMode) {
 XContainer panel = new XContainer(new BorderLayout());
 panel.add(vuMeterPanel = new AggregateVuMeterPanel(appContext, globalMode), BorderLayout.CENTER);
 return panel;
}

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

protected void setupCacheMissRatePanel(final XContainer parent) {
 cacheHitRateSeries = createTimeSeries(bundle.getString("cache.hit.rate"));
 cacheMissRateSeries = createTimeSeries(bundle.getString("cache.miss.rate"));
 JFreeChart chart = createChart(new TimeSeries[] { cacheHitRateSeries, cacheMissRateSeries }, false);
 ChartPanel chartPanel = createChartPanel(chart);
 parent.add(chartPanel);
 chartPanel.setPreferredSize(fDefaultGraphSize);
 chartPanel.setBorder(new TitledBorder("Cache Hit/Miss Rate"));
 chartPanel.setToolTipText("Cache Hit/Miss Rate");
 chartPanel.setLayout(new GridBagLayout());
 GridBagConstraints gbc = new GridBagConstraints();
 XContainer labelHolder = new XContainer(new GridLayout(0, 1));
 labelHolder.add(cacheHitRateLabel = createStatusLabel(EhcachePresentationUtils.HIT_DRAW_COLOR));
 labelHolder.add(cacheMissRateLabel = createStatusLabel(EhcachePresentationUtils.MISS_DRAW_COLOR));
 labelHolder.setOpaque(false);
 chartPanel.add(labelHolder, gbc);
 ((XYPlot) chart.getPlot()).getRenderer().setSeriesPaint(0, EhcachePresentationUtils.HIT_FILL_COLOR);
 ((XYPlot) chart.getPlot()).getRenderer().setSeriesPaint(1, EhcachePresentationUtils.MISS_FILL_COLOR);
}

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

clusterListener.tearDown();
if (mainPanel.getParent() == null) {
 mainPanel.tearDown();
if (messagePanel.getParent() == null) {
 messagePanel.tearDown();
super.tearDown();

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

protected void createApplyToNewcomersToggle(XContainer panel) {
 panel.add(applyToNewcomersToggle = new XCheckBox("Apply to newcomers"), BorderLayout.WEST);
 applyToNewcomersToggle.setSelected(true);
 applyToNewcomersToggle.setVisible(false);
}

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

@Override
protected synchronized void setup(final XContainer chartsPanel) {
 chartsPanel.setLayout(new BorderLayout());
 chartsPanel.add(tabbedPane = new XTabbedPane());
 tabbedPane.addTab("Usage", usagePanel = new BaseRuntimeStatsPanel(appContext));
 searchTabIndex = tabbedPane.getTabCount();
 tabbedPane.addTab("Search", searchPanel = new BaseRuntimeStatsPanel(appContext));
 jtaTabIndex = tabbedPane.getTabCount();
 tabbedPane.addTab("JTA", jtaPanel = new BaseRuntimeStatsPanel(appContext));
 writeBehindTabIndex = tabbedPane.getTabCount();
 tabbedPane.addTab("Write-Behind", writeBehindPanel = new BaseRuntimeStatsPanel(appContext));
 usagePanel.getChartsPanel().setLayout(new GridLayout(2, 2));
 setupCacheHitRatioPanel(usagePanel.getChartsPanel());
 setupCacheMissRatePanel(usagePanel.getChartsPanel());
 setupCacheUpdateRatePanel(usagePanel.getChartsPanel());
 setupCachePutRatePanel(usagePanel.getChartsPanel());
 searchPanel.getChartsPanel().setLayout(new GridLayout(2, 1));
 setupCacheSearchRatePanel(searchPanel.getChartsPanel());
 setupCacheAverageSearchTimePanel(searchPanel.getChartsPanel());
 jtaPanel.getChartsPanel().setLayout(new GridLayout(2, 1));
 setupTransactionCommitRatePanel(jtaPanel.getChartsPanel());
 setupTransactionRollbackRatePanel(jtaPanel.getChartsPanel());
 writeBehindPanel.getChartsPanel().setLayout(new GridLayout(1, 1));
 setupWriteBehindPanel(writeBehindPanel.getChartsPanel());
}

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

private void testAnySchedulers() {
 boolean changedHierarchy = false;
 if (schedulerSelector.getItemCount() == 0) {
  if (mainPanel.isShowing()) {
   removeAll();
  }
  messageLabel.setText(bundle.getString("no.schedulers.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

@Override
protected synchronized void setup(final XContainer chartsPanel) {
 chartsPanel.setLayout(new GridLayout(2, 2));
 setupCacheHitRatioPanel(chartsPanel);
 setupCacheMissRatePanel(chartsPanel);
 setupUpdateRatePanel(chartsPanel);
 setupCachePutRatePanel(chartsPanel);
}

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

private void clearAttributes() {
 attributePanel.setBorder(null);
 attrTable.setModel(EMPTY_TABLE_MODEL);
}

代码示例来源: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-2.x-ui

private XContainer createTopologyPanel() {
 XContainer panel = new XContainer(new GridBagLayout());
 GridBagConstraints gbc = new GridBagConstraints();
 gbc.gridx = gbc.gridy = 0;
 gbc.fill = GridBagConstraints.BOTH;
 gbc.weightx = gbc.weighty = 1.0;
 panel.add(topologyPanel = new TopologyPanel(), gbc);
 return panel;
}

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

protected void setupCacheMissRatePanel(final XContainer parent) {
 cacheHitRateSeries = createTimeSeries(bundle.getString("cache.hit.rate"));
 cacheMissRateSeries = createTimeSeries(bundle.getString("cache.miss.rate"));
 JFreeChart chart = createChart(new TimeSeries[] { cacheHitRateSeries, cacheMissRateSeries }, false);
 ChartPanel chartPanel = createChartPanel(chart);
 parent.add(chartPanel);
 chartPanel.setPreferredSize(fDefaultGraphSize);
 chartPanel.setBorder(new TitledBorder("Cache Hit/Miss Rate"));
 chartPanel.setToolTipText("Second Level Cache Hit/Miss Rate");
 chartPanel.setLayout(new GridBagLayout());
 GridBagConstraints gbc = new GridBagConstraints();
 XContainer labelHolder = new XContainer(new GridLayout(0, 1));
 labelHolder.add(cacheHitRateLabel = createStatusLabel(CacheRegionUtils.HIT_DRAW_COLOR));
 labelHolder.add(cacheMissRateLabel = createStatusLabel(CacheRegionUtils.MISS_DRAW_COLOR));
 labelHolder.setOpaque(false);
 chartPanel.add(labelHolder, gbc);
 ((XYPlot) chart.getPlot()).getRenderer().setSeriesPaint(0, CacheRegionUtils.HIT_FILL_COLOR);
 ((XYPlot) chart.getPlot()).getRenderer().setSeriesPaint(1, CacheRegionUtils.MISS_FILL_COLOR);
}

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

clusterListener.tearDown();
if (mainPanel.getParent() == null) {
 mainPanel.tearDown();
if (messagePanel.getParent() == null) {
 messagePanel.tearDown();
super.tearDown();

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

protected void setupUpdateRatePanel(final XContainer parent) {
 String text = bundle.getString("cache.update.rate");
 cacheUpdateRateSeries = createTimeSeries(text);
 ChartPanel chartPanel = createChartPanel(createChart(cacheUpdateRateSeries, false));
 parent.add(chartPanel);
 chartPanel.setPreferredSize(fDefaultGraphSize);
 chartPanel.setBorder(new TitledBorder(text));
 chartPanel.setToolTipText(text);
 chartPanel.setLayout(new BorderLayout());
 chartPanel.add(cacheUpdateRateLabel = createOverlayLabel());
}

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

private void testAnyPersistenceUnits() {
 boolean changedHierarchy = false;
 if (puSelector.getItemCount() == 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.0-hibernate-ui

@Override
protected synchronized void setup(final XContainer chartsPanel) {
 chartsPanel.setLayout(new GridLayout(2, 2));
 setupCacheHitRatioPanel(chartsPanel);
 setupCacheMissRatePanel(chartsPanel);
 setupQueryExecutionRatePanel(chartsPanel);
 setupCachePutRatePanel(chartsPanel);
}

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

public void valueChanged(ListSelectionEvent e) {
 if (e == null || !e.getValueIsAdjusting()) {
  nodeInstanceTableModel.clear();
  boolean showNodeInstancePanel = false;
  CacheManagerInstance cacheManagerInstance = null;
  int[] rows = nodeSummaryTable.getSelectedRows();
  if (rows.length == 1) {
   cacheManagerInstance = (CacheManagerInstance) nodeSummaryTableModel.getObjectAt(rows[0]);
   if (cacheManagerInstance.getInstanceCount() > 0) {
    for (Iterator<CacheModelInstance> iter = cacheManagerInstance.cacheModelInstanceIter(); iter.hasNext();) {
     nodeInstanceTableModel.add(iter.next());
    }
    nodeInstanceTableModel.fireTableDataChanged();
    String title = MessageFormat.format(bundle.getString("node.instance.detail"), cacheManagerModel.getName(),
                      cacheManagerInstance.getClient());
    nodeInstancePanel.setBorder(BorderFactory.createTitledBorder(title));
    showNodeInstancePanel = true;
   }
  }
  setNodeInstancePanelVisible(showNodeInstancePanel);
  updateActions(nodeSummaryTable);
 }
}

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

private XContainer createOverviewPanel() {
 XContainer result = new XContainer(new GridBagLayout());
 GridBagConstraints gbc = new GridBagConstraints();
 gbc.gridx = gbc.gridy = 0;
 gbc.anchor = GridBagConstraints.WEST;
 gbc.fill = GridBagConstraints.HORIZONTAL;
 gbc.weightx = 1.0;
 gbc.insets = new Insets(1, 5, 1, 0);
 result.add(overviewLabel = new XLabel(overviewMsg), gbc);
 // overviewLabel.setFont((Font) bundle.getObject("message.label.font"));
 overviewLabel.setIcon(EhcachePresentationUtils.ALERT_ICON);
 result.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.black));
 return result;
}

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