gpt4 book ai didi

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

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

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

XLabel介绍

暂无

代码示例

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

private XContainer createMessagePanel() {
 XContainer panel = new XContainer(new BorderLayout());
 panel.add(messageLabel = new XLabel());
 messageLabel.setText(appContext.getString("initializing"));
 messageLabel.setHorizontalAlignment(SwingConstants.CENTER);
 messageLabel.setFont((Font) appContext.getObject("message.label.font"));
 return panel;
}

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

@Override
 public void setValue(Object value) {
  label.setEnabled(false);
  label.setText("---");
  label.setHorizontalAlignment(SwingConstants.CENTER);
 }
}

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

protected static XLabel createOverlayLabel() {
 XLabel result = new XLabel();
 result.setFont(labelFont);
 result.setHorizontalAlignment(SwingConstants.CENTER);
 result.setForeground(Color.gray);
 return result;
}

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

@Override
 public void setValue(Object value) {
  label.setHorizontalAlignment(SwingConstants.CENTER);
  if (textual) {
   label.setText(value != null ? value.toString() : "");
  } else {
   boolean enabled = ((Boolean) value).booleanValue();
   label.setIcon(enabled ? ENABLED_ICON : DISABLED_ICON);
   label.setBorder(emptyBorder);
  }
 }
}

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

private void queryClearSelectedCaches(JPopupMenu popupMenu) {
 if (tornDown.get()) { return; }
 XLabel msg = new XLabel(bundle.getString("clear.selected.caches.confirm"));
 msg.setFont((Font) bundle.getObject("message.label.font"));
 msg.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
 Frame frame = (Frame) SwingUtilities.getAncestorOfClass(Frame.class, this);
 int answer = JOptionPane.showConfirmDialog(this, msg, frame.getTitle(), JOptionPane.OK_CANCEL_OPTION);
 if (answer == JOptionPane.OK_OPTION) {
  appContext.submit(currentPage.createClearCachesWorker(popupMenu));
 }
}

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

private XLabel addRow(XContainer panel, String header, GridBagConstraints gbc) {
 XLabel label;
 gbc.anchor = GridBagConstraints.EAST;
 panel.add(label = new XLabel(header), gbc);
 label.setHorizontalAlignment(SwingConstants.RIGHT);
 gbc.anchor = GridBagConstraints.WEST;
 gbc.gridx++;
 panel.add(label = new XLabel(), gbc);
 label.setHorizontalAlignment(SwingConstants.LEFT);
 gbc.gridx--;
 gbc.gridy++;
 return label;
}

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

XLabel headerLabel = new XLabel(appContext.getString("current.view.type"));
topPanel.add(headerLabel, gbc);
headerLabel.setFont(headerFont);
gbc.gridx++;
topPanel.add(currentViewLabel = new XLabel(), gbc);
gbc.gridx++;
topPanel.add(new XLabel(), gbc);
gbc.gridx++;
gbc.fill = GridBagConstraints.NONE;
headerLabel = new XLabel(appContext.getString("select.view"));
topPanel.add(headerLabel, gbc);
headerLabel.setFont(headerFont);
gbc.gridx++;

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

private void queryClearAllStats() {
 if (tornDown.get()) { return; }
 XLabel msg = new XLabel(bundle.getString("clear.all.counters.confirm"));
 Frame frame = (Frame) SwingUtilities.getAncestorOfClass(Frame.class, this);
 int answer = JOptionPane.showConfirmDialog(this, msg, frame.getTitle(), JOptionPane.OK_CANCEL_OPTION);
 if (answer == JOptionPane.OK_OPTION) {
  appContext.submit(new ClearAllStatsWorker());
 }
}

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

@Override
 public void setValue(Object value) {
  if (!(value instanceof Boolean)) {
   setText(value != null ? value.toString() : "");
   return;
  }
  boolean isBulkloading = ((Boolean) value).booleanValue();
  label.setText(isBulkloading ? "Bulkloading" : "Normal");
 }
}

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

@Override
 public void setValue(Object value) {
  label.setText(value != null ? value.toString() : "");
  label.setHorizontalAlignment(SwingConstants.CENTER);
 }
}

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

protected static StatusView createStatusLabel(Color color) {
 StatusView result = new StatusView();
 XLabel label = result.getLabel();
 label.setFont(labelFont);
 label.setForeground(Color.gray);
 result.setIndicator(color);
 result.setOpaque(false);
 return result;
}

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

@Override
 public void setValue(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean focused) {
  TriggerModelNode node = (TriggerModelNode) value;
  Color color = node.getAnimateColor(), fg, bg;
  if (sel) {
   fg = textSelectionColor;
   bg = color != null ? color : backgroundSelectionColor;
  } else {
   fg = color != null ? color : textNonSelectionColor;
   bg = backgroundNonSelectionColor;
  }
  label.setForeground(fg);
  label.setBackground(bg);
  label.setOpaque(true);
  label.setText(value != null ? value.toString() : "");
 }
}

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

@Override
protected void init() {
 boolean started = schedulerModel.isStarted();
 updateAction(stopAction, started ? "Stop Scheduler" : "Start Scheduler", started ? STOP_ICON : START_ICON);
 boolean paused = schedulerModel.isStandbyMode();
 updateAction(pauseAction, paused ? "Resume Scheduler" : "Pause Scheduler", paused ? RESUME_ICON : PAUSE_ICON);
 inStandbyModeLabel.setText(Boolean.toString(schedulerModel.isStandbyMode()));
 shutdownLabel.setText(Boolean.toString(schedulerModel.isShutdown()));
 versionLabel.setText(schedulerModel.getVersion());
 String jobStoreClassName = schedulerModel.getJobStoreClassName();
 if (jobStoreClassName != null) {
  jobStoreClassLabel.setText(jobStoreClassName);
 } else {
  jobStoreClassLabel.setText("default");
  jobStoreClassLabel.setEnabled(false);
 }
 String threadPoolClassName = schedulerModel.getThreadPoolClassName();
 if (threadPoolClassName != null) {
  threadPoolClassLabel.setText(threadPoolClassName);
 } else {
  threadPoolClassLabel.setText("default");
  threadPoolClassLabel.setEnabled(false);
 }
 threadPoolSizeLabel.setText(NumberFormat.getNumberInstance().format(schedulerModel.getThreadPoolSize()));
}

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

public CachedColumnRenderer() {
 super((Format) null);
 label.setHorizontalAlignment(SwingConstants.CENTER);
}

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

public void actionPerformed(ActionEvent ae) {
  contentsHeader.setText(bundle.getString("retrieving.elements"));
  contentsHeader.setIcon(WAIT_ICON);
  clearAttributes();
  appContext.submit(new ContentsRetrievalWorker(null, getBatchSize()));
 }
});

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

private void queryEnableSelectedCaches(JPopupMenu popupMenu) {
 XLabel msg = new XLabel(bundle.getString("enable.selected.caches.confirm"));
 msg.setFont((Font) bundle.getObject("message.label.font"));
 msg.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
 Frame frame = (Frame) SwingUtilities.getAncestorOfClass(Frame.class, this);
 int answer = JOptionPane.showConfirmDialog(this, msg, frame.getTitle(), JOptionPane.OK_CANCEL_OPTION);
 if (answer == JOptionPane.OK_OPTION) {
  appContext.submit(currentPage.createEnableCachesWorker(popupMenu, true, false));
 }
}

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

gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.weightx = 1.0;
panel.add(label = new XLabel(bundle.getString("current.value")), gbc);
label.setHorizontalAlignment(SwingConstants.LEFT);
gbc.gridx++;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.weightx = 1.0;
panel.add(label = new XLabel(bundle.getString("local.maximum.value")), gbc);
label.setHorizontalAlignment(SwingConstants.RIGHT);

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

XLabel headerLabel = new XLabel(appContext.getString("current.view.type"));
topPanel.add(headerLabel, gbc);
headerLabel.setFont(headerFont);
gbc.gridx++;
topPanel.add(currentViewLabel = new XLabel(), gbc);
gbc.gridx++;
topPanel.add(new XLabel(), gbc);
gbc.gridx++;
gbc.fill = GridBagConstraints.NONE;
headerLabel = new XLabel(appContext.getString("select.view"));
topPanel.add(headerLabel, gbc);
headerLabel.setFont(headerFont);
gbc.gridx++;

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

private void queryClearAllCaches() {
 if (tornDown.get()) { return; }
 XLabel msg = new XLabel(bundle.getString("clear.caches.confirm"));
 Frame frame = (Frame) SwingUtilities.getAncestorOfClass(Frame.class, this);
 int answer = JOptionPane.showConfirmDialog(this, msg, frame.getTitle(), JOptionPane.OK_CANCEL_OPTION);
 if (answer == JOptionPane.OK_OPTION) {
  appContext.submit(new ClearAllCachesWorker());
 } else {
  clearAllCachesButton.setSelected(false);
  clearAllCachesButton.setEnabled(true);
 }
}

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

private void updateSummaryLabel(final int clusteredRegionCount) {
 String format = bundle.getString("regions.summary.format");
 summaryLabel.setText(MessageFormat.format(format, clusteredRegionCount, regionInfoMap.size()));
 /*
  * TODO: need a real model.
  */
 H2LCPanel h2lcPanel = (H2LCPanel) SwingUtilities.getAncestorOfClass(H2LCPanel.class, this);
 if (h2lcPanel != null) {
  h2lcPanel.cacheRegionsChanged(clusteredRegionCount, regionInfoMap.size());
 }
}

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