javax.swing.JCheckBox.setPreferredSize()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(10.3k)|赞(0)|评价(0)|浏览(164)

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

JCheckBox.setPreferredSize介绍

暂无

代码示例

代码示例来源:origin: marytts/marytts

cbSelected.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
cbSelected.setMargin(new java.awt.Insets(0, 0, 0, 0));
cbSelected.setPreferredSize(new java.awt.Dimension(200, 18));
cbSelected.addItemListener(new java.awt.event.ItemListener() {
  public void itemStateChanged(java.awt.event.ItemEvent evt) {

代码示例来源:origin: marytts/marytts

cbSelected.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
cbSelected.setMargin(new java.awt.Insets(0, 0, 0, 0));
cbSelected.setPreferredSize(new java.awt.Dimension(200, 18));
cbSelected.addItemListener(new java.awt.event.ItemListener() {
  public void itemStateChanged(java.awt.event.ItemEvent evt) {

代码示例来源:origin: magefree/mage

chkNames.setMaximumSize(new java.awt.Dimension(67, 16));
chkNames.setMinimumSize(new java.awt.Dimension(67, 16));
chkNames.setPreferredSize(new java.awt.Dimension(67, 16));
chkNames.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
chkNames.addActionListener(new java.awt.event.ActionListener() {
chkTypes.setMaximumSize(new java.awt.Dimension(63, 16));
chkTypes.setMinimumSize(new java.awt.Dimension(63, 16));
chkTypes.setPreferredSize(new java.awt.Dimension(63, 16));
chkTypes.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
chkTypes.addActionListener(new java.awt.event.ActionListener() {
chkRules.setMaximumSize(new java.awt.Dimension(59, 16));
chkRules.setMinimumSize(new java.awt.Dimension(59, 16));
chkRules.setPreferredSize(new java.awt.Dimension(59, 16));
chkRules.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
chkRules.addActionListener(new java.awt.event.ActionListener() {
chkUnique.setMaximumSize(new java.awt.Dimension(69, 16));
chkUnique.setMinimumSize(new java.awt.Dimension(69, 16));
chkUnique.setPreferredSize(new java.awt.Dimension(69, 16));
chkUnique.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
chkUnique.addActionListener(new java.awt.event.ActionListener() {

代码示例来源:origin: magefree/mage

cbStopOnAllEnd.setToolTipText("If activated - F5 skips to the next end step (regardless of the current player)");
cbStopOnAllEnd.setActionCommand("");
cbStopOnAllEnd.setPreferredSize(new java.awt.Dimension(300, 25));
cbStopOnAllEnd.addActionListener(new java.awt.event.ActionListener() {
  public void actionPerformed(java.awt.event.ActionEvent evt) {
cbPassPriorityCast.setToolTipText("If activated the system passes priority automatically for you if you have put a spell on the stack.");
cbPassPriorityCast.setActionCommand("");
cbPassPriorityCast.setPreferredSize(new java.awt.Dimension(300, 25));
cbPassPriorityCast.addActionListener(new java.awt.event.ActionListener() {
  public void actionPerformed(java.awt.event.ActionEvent evt) {
cbPassPriorityActivation.setToolTipText("If activated the system passes priority for you automatically after you have put an activated ability on the stack.");
cbPassPriorityActivation.setActionCommand("");
cbPassPriorityActivation.setPreferredSize(new java.awt.Dimension(300, 25));
cbPassPriorityActivation.addActionListener(new java.awt.event.ActionListener() {
  public void actionPerformed(java.awt.event.ActionEvent evt) {
cbAutoOrderTrigger.setToolTipText("<HTML>If activated the order to put on the stack your triggers that trigger at the same time<br/>\nis set automatically if all have the same text.");
cbAutoOrderTrigger.setActionCommand("");
cbAutoOrderTrigger.setPreferredSize(new java.awt.Dimension(300, 25));
cbAutoOrderTrigger.addActionListener(new java.awt.event.ActionListener() {
  public void actionPerformed(java.awt.event.ActionEvent evt) {

代码示例来源:origin: org.fuin/utils4swing

private JCheckBox getCheckBoxIncludeSubdirs() {
  if (checkBoxIncludeSubdirs == null) {
    checkBoxIncludeSubdirs = new JCheckBox();
    checkBoxIncludeSubdirs.setText("Include Subdirectories");
    checkBoxIncludeSubdirs.setPreferredSize(new Dimension(250, 24));
    checkBoxIncludeSubdirs.setVisible(true);
  }
  return checkBoxIncludeSubdirs;
}

代码示例来源:origin: com.synaptix/SynaptixSwing

public DefaultCheckBoxFilter(String id, String name, int width, String title, boolean useDefault, Boolean defaultValue) {
  super();
  this.id = id;
  this.name = name;
  checkBox = new JCheckBox(title == null ? "" : title);
  checkBox.setPreferredSize(new Dimension(width, checkBox.getPreferredSize().height));
  if (useDefault) {
    defaultCheckBox = new JCheckBox(title == null ? "Coché" : title);
    defaultCheckBox.setPreferredSize(new Dimension(width, defaultCheckBox.getPreferredSize().height));
    setDefaultValue(defaultValue);
  }
  initialize();
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-localhistory

public DeletedListRenderer() {
  setLayout(null);
  add(check = new JCheckBox());
  check.setPreferredSize(checkDim);
}

代码示例来源:origin: de.dfki.mary/marytts-client

c.gridy = 0;
g.setConstraints(chkEnabled, c);
chkEnabled.setPreferredSize(new Dimension(100, 25));
chkEnabled.setText(data.getEffectName());
chkEnabled.addActionListener(new ActionListener() {

代码示例来源:origin: org.gephi/tools-plugin

dontPaintUnreachableCheckbox.setText(org.openide.util.NbBundle.getMessage(HeatMapPanel.class, "HeatMapPanel.dontPaintUnreachableCheckbox.text")); // NOI18N
dontPaintUnreachableCheckbox.setToolTipText(org.openide.util.NbBundle.getMessage(HeatMapPanel.class, "HeatMapPanel.dontPaintUnreachableCheckbox.text")); // NOI18N
dontPaintUnreachableCheckbox.setPreferredSize(new java.awt.Dimension(160, 28));
gradientPanel.add(dontPaintUnreachableCheckbox);
invertPaletteCheckbox.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
invertPaletteCheckbox.setText(org.openide.util.NbBundle.getMessage(HeatMapPanel.class, "HeatMapPanel.invertPalette.text")); // NOI18N
invertPaletteCheckbox.setPreferredSize(new java.awt.Dimension(139, 28));
invertPaletteCheckbox.addItemListener(new ItemListener() {

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-php-project

public CheckRenderer(TransferSelectorModel model) {
  assert model != null;
  this.model = model;
  nodeRenderer = new NodeRenderer();
  setLayout(null);
  add(check);
  Color c = UIManager.getColor("Tree.textBackground"); // NOI18N
  if (c == null) {
    // may be null on GTK L&F
    c = Color.WHITE;
  }
  check.setBackground(c);
  check.setPreferredSize(CHECK_DIM);
}

代码示例来源:origin: MegaMek/mekhq

private JCheckBox createOptionCheckBox(String text, Icon checkboxIcon, Icon checkboxSelectedIcon) {
  JCheckBox checkBox = new JCheckBox(text);
  checkBox.setOpaque(false);
  checkBox.setForeground(new Color(150, 220, 255));
  checkBox.setFocusable(false);
  checkBox.setFont(checkBox.getFont().deriveFont(Font.BOLD));
  checkBox.setPreferredSize(new Dimension(150, 20));
  checkBox.setIcon(checkboxIcon);
  checkBox.setSelectedIcon(checkboxSelectedIcon);
  checkBox.setSelected(false);
  checkBox.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      repaint();
    }
  });
  return checkBox;
}

代码示例来源:origin: ontop/ontop

jCheckBox1 = new JCheckBox();
jCheckBox1.setText(key);
jCheckBox1.setPreferredSize(new Dimension(444, 18));
jCheckBox1.setFont(new java.awt.Font("Tahoma", 1, 11));
jCheckBox1.setPreferredSize(new Dimension(75, 15));
java.awt.GridBagConstraints gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;

代码示例来源:origin: Exslims/MercuryTrade

@Override
public void onViewInit() {
  this.setLayout(new BorderLayout());
  this.setBackground(AppThemeColor.FRAME);
  JButton hideButton = componentsFactory.getIconButton("app/close.png", 12, AppThemeColor.FRAME, "Dismiss");
  hideButton.addActionListener((action) -> {
    stashTabDescriptor.setUndefined(true);
    MercuryStoreUI.dismissTabInfoPanelSubject.onNext(this);
  });
  JPanel tabInfoPanel = componentsFactory.getJPanel(new FlowLayout(FlowLayout.CENTER));
  JLabel tabLabel = componentsFactory.getTextLabel(stashTabDescriptor.getTitle());
  tabLabel.setBorder(null);
  tabLabel.setFont(componentsFactory.getFont(FontStyle.BOLD, 15f));
  tabInfoPanel.add(tabLabel);
  JCheckBox isItQuad = componentsFactory.getCheckBox("Is it Quad?");
  isItQuad.setSelected(stashTabDescriptor.isQuad());
  isItQuad.setPreferredSize(new Dimension(16, 16));
  isItQuad.addActionListener(action -> {
    stashTabDescriptor.setQuad(isItQuad.isSelected());
  });
  tabInfoPanel.add(isItQuad);
  tabInfoPanel.add(hideButton);
  this.add(tabInfoPanel, BorderLayout.PAGE_END);
  this.setBorder(BorderFactory.createLineBorder(AppThemeColor.BORDER, 1));
}

代码示例来源:origin: igvteam/igv

downloadSequenceCB.setToolTipText("Download the full sequence for this organism. Note that these files can be very large (human is about 3 gigabytes)");
downloadSequenceCB.setMaximumSize(new Dimension(1000, 23));
downloadSequenceCB.setPreferredSize(new Dimension(300, 23));
downloadSequenceCB.setMinimumSize(new Dimension(300, 23));
contentPanel.add(downloadSequenceCB);

代码示例来源:origin: net.sf.squirrel-sql.plugins/refactoring

cascadeCB.setPreferredSize(mediumField);
pane.add(cascadeCB, getFieldConstraints(c));
super.executeButton.setRequestFocusEnabled(true);

代码示例来源:origin: net.sf.squirrel-sql.plugins/refactoring

_cascadeCB.setPreferredSize(mediumField);
pane.add(_cascadeCB, getFieldConstraints(c));
super.executeButton.setRequestFocusEnabled(true);

代码示例来源:origin: Exslims/MercuryTrade

if (stashTabDescriptor.isUndefined()) {
  JCheckBox isItQuad = componentsFactory.getCheckBox(TooltipConstants.IS_IT_QUAD);
  isItQuad.setPreferredSize(new Dimension(16, 16));
  tabInfoPanel.add(isItQuad);

代码示例来源:origin: ontop/ontop

chkShowAll.setPreferredSize(new java.awt.Dimension(55, 23));
chkShowAll.addActionListener(new java.awt.event.ActionListener() {
  public void actionPerformed(java.awt.event.ActionEvent evt) {

代码示例来源:origin: de.dfki.mary/marytts-runtime

cbSelected.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
cbSelected.setMargin(new java.awt.Insets(0, 0, 0, 0));
cbSelected.setPreferredSize(new java.awt.Dimension(200, 18));
cbSelected.addItemListener(new java.awt.event.ItemListener() {
  public void itemStateChanged(java.awt.event.ItemEvent evt) {

代码示例来源:origin: sc.fiji/TrakEM2_

this.c.setBackground(Color.white);
Dimension maxdim = new Dimension(26, 14);
this.c.setPreferredSize(maxdim);
this.c.setMaximumSize(maxdim);
this.c_locked.setBackground(Color.white);
Dimension maxdim10 = new Dimension(26, 10);
this.c_locked.setPreferredSize(maxdim10);
this.c_locked.setMaximumSize(maxdim10);
this.c_linked.addMouseListener(listener);
this.c_linked.setBackground(Color.white);
this.c_linked.setPreferredSize(maxdim10);
this.c_linked.setMaximumSize(maxdim10);

相关文章

JCheckBox类方法