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

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

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

JCheckBox.setVisible介绍

暂无

代码示例

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

void setEdgesVisible (boolean visible)
{
  edgesCheckbox.setVisible(visible);
  edgesLabel.setVisible(visible);
}

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

void setEdgesVisible (boolean visible)
{
  edgesCheckbox.setVisible(visible);
  edgesLabel.setVisible(visible);
}

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

void setEdgesVisible (boolean visible) {
  edgesCheckbox.setVisible(visible);
  edgesLabel.setVisible(visible);
  visible = visible && edgesCheckbox.isSelected();
  sideCombo.setVisible(visible);
  sideLabel.setVisible(visible);
}

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

void setEdgesVisible (boolean visible) {
  edgesCheckbox.setVisible(visible);
  edgesLabel.setVisible(visible);
  visible = visible && edgesCheckbox.isSelected();
  sideCombo.setVisible(visible);
  sideLabel.setVisible(visible);
}

代码示例来源:origin: chewiebug/GCViewer

/**
 * OpenUrlView shows a checkbox to let the user choose "add selected URL to 
 * current document".
 * 
 * @param showCheckBox <code>true</code>: checkbox is shown, otherwise it is hidden.
 */
public void setShowAddCheckBox(boolean showCheckBox) {
  
  addUrlCheckBox.setVisible(showCheckBox);
  addUrlCheckBox.setEnabled(showCheckBox);
  if (!showCheckBox) {
    // Checkbox must never be selected, when it is not visible.
    // Can happen if last file was added and whole document is closed afterwards.
    // -> State of checkbox still "selected" but not visible any more.
    addUrlCheckBox.setSelected(false);
  }
}

代码示例来源:origin: chewiebug/GCViewer

/**
   * OpenFileView shows an accessory checkbox to let the user choose "add selected file(s) to 
   * current document".
   * 
   * @param showCheckBox <code>true</code>: checkbox is shown, otherwise it is hidden.
   */
  public void setShowAddCheckBox(boolean showCheckBox) {
    addFileCheckBox.setVisible(showCheckBox);
    addFileCheckBox.setEnabled(showCheckBox);
    if (!showCheckBox) {
      // Checkbox must never be selected, when it is not visible.
      // Can happen if last file was added and whole document is closed afterwards.
      // -> State of checkbox still "selected" but not visible any more.
      addFileCheckBox.setSelected(false);
    }
  }
}

代码示例来源:origin: KronicDeth/intellij-elixir

public Editor() {
  runInModuleCheckBox.addActionListener(e -> modulesComboBox.setEnabled(runInModuleCheckBox.isSelected()));
  boolean richIde = !ProcessOutput.isSmallIde();
  modulesComboBox.setVisible(richIde);
  runInModuleCheckBox.setVisible(richIde);
}

代码示例来源:origin: KronicDeth/intellij-elixir

public Editor() {
  runInModuleCheckBox.addActionListener(e -> modulesComboBox.setEnabled(runInModuleCheckBox.isSelected()));
  boolean richIde = !ProcessOutput.isSmallIde();
  modulesComboBox.setVisible(richIde);
  runInModuleCheckBox.setVisible(richIde);
}

代码示例来源:origin: KronicDeth/intellij-elixir

public Editor() {
  runInModuleCheckBox.addActionListener(e -> modulesComboBox.setEnabled(runInModuleCheckBox.isSelected()));
  boolean richIde = !ProcessOutput.isSmallIde();
  modulesComboBox.setVisible(richIde);
  runInModuleCheckBox.setVisible(richIde);
}

代码示例来源:origin: KronicDeth/intellij-elixir

public Editor() {
  runInModuleCheckBox.addActionListener(e -> modulesComboBox.setEnabled(runInModuleCheckBox.isSelected()));
  boolean richIde = !ProcessOutput.isSmallIde();
  modulesComboBox.setVisible(richIde);
  runInModuleCheckBox.setVisible(richIde);
}

代码示例来源:origin: KronicDeth/intellij-elixir

public Editor() {
  runInModuleCheckBox.addActionListener(e -> modulesComboBox.setEnabled(runInModuleCheckBox.isSelected()));
  boolean richIde = !ProcessOutput.isSmallIde();
  modulesComboBox.setVisible(richIde);
  runInModuleCheckBox.setVisible(richIde);
}

代码示例来源:origin: KronicDeth/intellij-elixir

public Editor() {
  runInModuleCheckBox.addActionListener(e -> modulesComboBox.setEnabled(runInModuleCheckBox.isSelected()));
  boolean richIde = !ProcessOutput.isSmallIde();
  modulesComboBox.setVisible(richIde);
  runInModuleCheckBox.setVisible(richIde);
}

代码示例来源:origin: KronicDeth/intellij-elixir

public Editor() {
  runInModuleCheckBox.addActionListener(e -> modulesComboBox.setEnabled(runInModuleCheckBox.isSelected()));
  boolean richIde = !ProcessOutput.isSmallIde();
  modulesComboBox.setVisible(richIde);
  runInModuleCheckBox.setVisible(richIde);
}

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

public void actionPerformed (ActionEvent event) {
    chart.setExpanded(!chart.isExpanded());
    boolean expanded = chart.isExpanded();
    GridBagLayout layout = (GridBagLayout)getContentPanel().getLayout();
    GridBagConstraints chartConstraints = layout.getConstraints(chart);
    GridBagConstraints expandButtonConstraints = layout.getConstraints(expandButton);
    if (expanded) {
      chart.setPreferredSize(new Dimension(150, 200));
      expandButton.setText("-");
      chartConstraints.weightx = 1;
      expandButtonConstraints.weightx = 0;
    } else {
      chart.setPreferredSize(new Dimension(150, 30));
      expandButton.setText("+");
      chartConstraints.weightx = 0;
      expandButtonConstraints.weightx = 1;
    }
    layout.setConstraints(chart, chartConstraints);
    layout.setConstraints(expandButton, expandButtonConstraints);
    relativeCheckBox.setVisible(!expanded);
    if (hasIndependent)
      independentCheckbox.setVisible(!expanded);
    formPanel.setVisible(!expanded);
    chart.revalidate();
  }
});

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

public void actionPerformed (ActionEvent event) {
    chart.setExpanded(!chart.isExpanded());
    boolean expanded = chart.isExpanded();
    GridBagLayout layout = (GridBagLayout)getContentPanel().getLayout();
    GridBagConstraints chartConstraints = layout.getConstraints(chart);
    GridBagConstraints expandButtonConstraints = layout.getConstraints(expandButton);
    if (expanded) {
      chart.setPreferredSize(new Dimension(150, 200));
      expandButton.setText("-");
      chartConstraints.weightx = 1;
      expandButtonConstraints.weightx = 0;
    } else {
      chart.setPreferredSize(new Dimension(150, 30));
      expandButton.setText("+");
      chartConstraints.weightx = 0;
      expandButtonConstraints.weightx = 1;
    }
    layout.setConstraints(chart, chartConstraints);
    layout.setConstraints(expandButton, expandButtonConstraints);
    relativeCheckBox.setVisible(!expanded);
    if (hasIndependent)
      independentCheckbox.setVisible(!expanded);
    formPanel.setVisible(!expanded);
    chart.revalidate();
  }
});

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

public void actionPerformed (ActionEvent event) {
    chart.setExpanded(!chart.isExpanded());
    boolean expanded = chart.isExpanded();
    GridBagLayout layout = (GridBagLayout)getContentPanel().getLayout();
    GridBagConstraints chartConstraints = layout.getConstraints(chart);
    GridBagConstraints expandButtonConstraints = layout.getConstraints(expandButton);
    if (expanded) {
      chart.setPreferredSize(new Dimension(150, 200));
      expandButton.setText("-");
      chartConstraints.weightx = 1;
      expandButtonConstraints.weightx = 0;
    } else {
      chart.setPreferredSize(new Dimension(150, 30));
      expandButton.setText("+");
      chartConstraints.weightx = 0;
      expandButtonConstraints.weightx = 1;
    }
    layout.setConstraints(chart, chartConstraints);
    layout.setConstraints(expandButton, expandButtonConstraints);
    relativeCheckBox.setVisible(!expanded);
    formPanel.setVisible(!expanded);
    chart.revalidate();
  }
});

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

public void actionPerformed (ActionEvent event) {
    chart.setExpanded(!chart.isExpanded());
    boolean expanded = chart.isExpanded();
    GridBagLayout layout = (GridBagLayout)getContentPanel().getLayout();
    GridBagConstraints chartConstraints = layout.getConstraints(chart);
    GridBagConstraints expandButtonConstraints = layout.getConstraints(expandButton);
    if (expanded) {
      chart.setPreferredSize(new Dimension(150, 200));
      expandButton.setText("-");
      chartConstraints.weightx = 1;
      expandButtonConstraints.weightx = 0;
    } else {
      chart.setPreferredSize(new Dimension(150, 30));
      expandButton.setText("+");
      chartConstraints.weightx = 0;
      expandButtonConstraints.weightx = 1;
    }
    layout.setConstraints(chart, chartConstraints);
    layout.setConstraints(expandButton, expandButtonConstraints);
    relativeCheckBox.setVisible(!expanded);
    formPanel.setVisible(!expanded);
    chart.revalidate();
  }
});

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

public Component getTreeCellRendererComponent(
  JTree tree, Object value,
  boolean selected, boolean expanded,
  boolean leaf, int row,
  boolean hasFocus) {
 CategoryNode node = (CategoryNode) value;
 //FileNode node = (FileNode)value;
 //String s = tree.convertValueToText(value, selected,
 //						   expanded, leaf, row, hasFocus);
 super.getTreeCellRendererComponent(
   tree, value, selected, expanded,
   leaf, row, hasFocus);
 if (row == 0) {
  // Root row -- no check box
  _checkBox.setVisible(false);
 } else {
  _checkBox.setVisible(true);
  _checkBox.setSelected(node.isSelected());
 }
 String toolTip = buildToolTip(node);
 _panel.setToolTipText(toolTip);
 if (node.hasFatalChildren()) {
  this.setForeground(FATAL_CHILDREN);
 }
 if (node.hasFatalRecords()) {
  this.setForeground(Color.red);
 }
 return _panel;
}

代码示例来源:origin: KronicDeth/intellij-elixir

public Root(WizardContext context) {
  super(context);
  String projectFileDirectory = context.getProjectFileDirectory();
  //noinspection DialogTitleCapitalization
  myProjectRootComponent.addBrowseFolderListener(
      "Select mix.exs of a mix project to import",
      "",
      null,
      FileChooserDescriptorFactory.createSingleFolderDescriptor()
  );
  myProjectRootComponent.setText(projectFileDirectory); // provide project path
  myGetDepsCheckbox.setVisible(ourEnabled);
}

代码示例来源:origin: hsz/idea-gitignore

} else if (node.getContainer() != null) { // container group
  hint = IgnoreBundle.message("template.container." + node.getContainer().toString().toLowerCase());
  getCheckbox().setVisible(false);

相关文章

JCheckBox类方法