private void setWantsPTY(boolean wantsPTY) { wantsPTYComponent.getComponent().setSelected(wantsPTY); }
private void addWantsPtyComponent() { wantsPTYComponent = LabeledComponent.create(new JCheckBox(), "Use Pseudo-terminal (PTY)"); wantsPTYComponent.setLabelLocation(BorderLayout.WEST); add(wantsPTYComponent, 10); }
private void createUIComponents() { myFileField = new LabeledComponent<>(); myFileField.setComponent(new TextFieldWithBrowseButton()); myPackageField = new LabeledComponent<>(); myPackageField.setComponent(new BallerinaPackageFieldCompletionProvider( () -> myModulesComboBox.getComponent().getSelectedModule()).createEditor(myProject)); myWorkingDirectoryField = new LabeledComponent<>(); myWorkingDirectoryField.setComponent(new TextFieldWithBrowseButton()); myParamsField = new LabeledComponent<>(); myParamsField.setComponent(new RawCommandLineEditor()); myModulesComboBox = new LabeledComponent<>(); myModulesComboBox.setComponent(new ModulesComboBox()); } }
private void createUIComponents() { myWorkingDirectoryField = new LabeledComponent<>(); myWorkingDirectoryField.setComponent(new TextFieldWithBrowseButton()); myParamsField = new LabeledComponent<>(); myParamsField.setComponent(new RawCommandLineEditor()); myModulesComboBox = new LabeledComponent<>(); myModulesComboBox.setComponent(new ModulesComboBox()); myHost = new LabeledComponent<>(); myHostField = new EditorTextField(); myHostField.setPreferredWidth(300); myHost.setComponent(myHostField); myPort = new LabeledComponent<>(); myPortField = new EditorTextField(); myPortField.setPreferredWidth(100); myPort.setComponent(myPortField); } }
private LabeledComponent<RawCommandLineEditor> createArgumentsComponent(@NotNull String command) { return LabeledComponent.create(new RawCommandLineEditor(), command + " arguments:"); }
private void addArgumentsComponent(@NotNull LabeledComponent<RawCommandLineEditor> argumentsComponent, int index) { copyDialogCaption(argumentsComponent); argumentsComponent.setLabelLocation(BorderLayout.WEST); add(argumentsComponent, index); } }
private static LabeledComponent<RawCommandLineEditor> copyDialogCaption(final LabeledComponent<RawCommandLineEditor> component, String text) { final RawCommandLineEditor rawCommandLineEditor = component.getComponent(); rawCommandLineEditor.setDialogCaption(text); component.getLabel().setLabelFor(rawCommandLineEditor.getTextField()); return component; } }
private void createUIComponents() { myRunKindComboBox = new LabeledComponent<>(); myRunKindComboBox.setComponent(new JComboBox<>()); myFileField = new LabeledComponent<>(); myFileField.setComponent(new TextFieldWithBrowseButton()); myPackageField = new LabeledComponent<>(); myPackageField.setComponent(new BallerinaPackageFieldCompletionProvider( () -> myModulesComboBox.getComponent().getSelectedModule()).createEditor(myProject)); myWorkingDirectoryField = new LabeledComponent<>(); myWorkingDirectoryField.setComponent(new TextFieldWithBrowseButton()); myParamsField = new LabeledComponent<>(); myParamsField.setComponent(new RawCommandLineEditor()); myBallerinaParamsField = new LabeledComponent<>(); myBallerinaParamsField.setComponent(new RawCommandLineEditor()); myModulesComboBox = new LabeledComponent<>(); myModulesComboBox.setComponent(new ModulesComboBox()); }
private LabeledComponent<RawCommandLineEditor> createArgumentsComponent(@NotNull String command) { return LabeledComponent.create(new RawCommandLineEditor(), command + " arguments:"); }
private void addArgumentsComponent(@NotNull LabeledComponent<RawCommandLineEditor> argumentsComponent, int index) { copyDialogCaption(argumentsComponent); argumentsComponent.setLabelLocation(BorderLayout.WEST); add(argumentsComponent, index); } }
private boolean getWantsPTY() { return wantsPTYComponent.getComponent().isSelected(); }
private void addLogDirectoryComponent() { FileChooserDescriptor fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor(); fileChooserDescriptor.setTitle("Select Log Directory"); MacroComboBoxWithBrowseButton logDirectoryComboBox = new MacroComboBoxWithBrowseButton(fileChooserDescriptor, getProject()); logDirectoryComponent = LabeledComponent.create(logDirectoryComboBox, "Log Directory"); logDirectoryComponent.setLabelLocation(BorderLayout.WEST); add(logDirectoryComponent, 5); }
private LabeledComponent<TextFieldWithBrowseButton> createShellPathField() { LabeledComponent<TextFieldWithBrowseButton> shellPathField = new LabeledComponent<>(); TextFieldWithBrowseButton component = new TextFieldWithBrowseButton(); component.getChildComponent().setName("shellPathField"); shellPathField.setComponent(component); shellPathField.getComponent().addBrowseFolderListener("Mongo Shell Configuration", "", null, new FileChooserDescriptor(true, false, false, false, false, false)); shellPathField.getComponent().setText(configuration.getShellPath()); return shellPathField; }
private LabeledComponent<RawCommandLineEditor> createArgumentsComponent(@NotNull String command) { return LabeledComponent.create(new RawCommandLineEditor(), command + " arguments:"); }
private void addArgumentsComponent(@NotNull LabeledComponent<RawCommandLineEditor> argumentsComponent, int index) { copyDialogCaption(argumentsComponent); argumentsComponent.setLabelLocation(BorderLayout.WEST); add(argumentsComponent, index); } }
private void installRunKindComboBox() { myRunKindComboBox.getComponent().removeAllItems(); myRunKindComboBox.getComponent().setRenderer(getRunKindListCellRendererWrapper()); for (RunConfigurationKind kind : RunConfigurationKind.values()) { myRunKindComboBox.getComponent().addItem(kind); } } }
private void addSysConfigPathComponent() { FileChooserDescriptor fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFileDescriptor(); //noinspection DialogTitleCapitalization fileChooserDescriptor.setTitle("Select sys.config File"); MacroComboBoxWithBrowseButton sysConfigPathComboBox = new MacroComboBoxWithBrowseButton(fileChooserDescriptor, getProject()); sysConfigPathComponent = LabeledComponent.create(sysConfigPathComboBox, "sys.config File"); sysConfigPathComponent.setLabelLocation(BorderLayout.WEST); add(sysConfigPathComponent, 7); }