Java Code Examples for com.intellij.ui.components.JBCheckBox#setVisible()
The following examples show how to use
com.intellij.ui.components.JBCheckBox#setVisible() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractExternalProjectSettingsControl.java From consulo with Apache License 2.0 | 5 votes |
@Override public void fillUi(@Nonnull PaintAwarePanel canvas, int indentLevel) { myUseAutoImportBox = new JBCheckBox(ExternalSystemBundle.message("settings.label.use.auto.import")); myUseAutoImportBox.setVisible(!myHideUseAutoImportBox); canvas.add(myUseAutoImportBox, ExternalSystemUiUtil.getFillLineConstraints(indentLevel)); myCreateEmptyContentRootDirectoriesBox = new JBCheckBox(ExternalSystemBundle.message("settings.label.create.empty.content.root.directories")); canvas.add(myCreateEmptyContentRootDirectoriesBox, ExternalSystemUiUtil.getFillLineConstraints(indentLevel)); fillExtraControls(canvas, indentLevel); }
Example 2
Source File: AddDirectoryToProjectAction.java From intellij with Apache License 2.0 | 4 votes |
OpenBlazeWorkspaceFileActionDialog( Project project, ProjectViewSet projectView, WorkspacePathResolver workspacePathResolver) { super(project, /* canBeParent= */ false, IdeModalityType.PROJECT); this.project = project; this.projectView = projectView; this.workspacePathResolver = workspacePathResolver; FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor(); fileTextField = WorkspaceFileTextField.create( workspacePathResolver, descriptor, PATH_FIELD_WIDTH, myDisposable); JBLabel directoryLabel = new JBLabel("Directory:", Nodes.Package, SwingConstants.LEFT); JPanel directoryPanel = SwingHelper.newHorizontalPanel( Component.TOP_ALIGNMENT, directoryLabel, fileTextField.getField()); boolean autoDeriveTargets = autoDeriveTargets(); addTargetsCheckBox = new JBCheckBox("Add build targets to the project", !autoDeriveTargets); JBLabel warning = new JBLabel( "<html>" + ADD_TARGETS_WARNING_TEXT + "</html>", AllIcons.General.BalloonWarning, SwingConstants.LEFT); warning.setPreferredSize(new Dimension(800, 100)); addTargetsCheckBox.addChangeListener( e -> { String warningText; if (autoDeriveTargets || addTargetsCheckBox.isSelected()) { warningText = ADD_TARGETS_WARNING_TEXT; } else { warningText = NO_TARGETS_WARNING_TEXT; } warning.setText("<html>" + warningText + "</html>"); }); if (autoDeriveTargets) { addTargetsCheckBox.setVisible(false); } component = SwingHelper.newLeftAlignedVerticalPanel( directoryPanel, addTargetsCheckBox, warning, Box.createVerticalGlue()); setTitle("Add Directory to Project"); init(); }