Search in sources :

Example 31 with VerticalFlowLayout

use of com.intellij.openapi.ui.VerticalFlowLayout in project Perl5-IDEA by Camelcade.

the class PerlConfigurationEditorBase method getDebuggingComponent.

@Nullable
protected JComponent getDebuggingComponent() {
    JPanel panel = new JPanel();
    panel.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 5, true, false));
    myScriptCharset = new JTextField();
    LabeledComponent<JTextField> scriptCharset = LabeledComponent.create(myScriptCharset, PerlBundle.message("perl.run.option.script.encoding"));
    scriptCharset.setLabelLocation(BorderLayout.WEST);
    panel.add(scriptCharset);
    myStartMode = new ComboBox(new MapComboBoxModel<>(PerlDebugOptionsSets.STARTUP_OPTIONS)) {

        @Override
        public void setRenderer(ListCellRenderer renderer) {
            super.setRenderer(new ColoredListCellRenderer<String>() {

                @Override
                protected void customizeCellRenderer(@NotNull JList list, String value, int index, boolean selected, boolean hasFocus) {
                    append(PerlDebugOptionsSets.STARTUP_OPTIONS.get(value));
                }
            });
        }
    };
    LabeledComponent<?> startMode = LabeledComponent.create(myStartMode, PerlBundle.message("perl.run.option.debugger.startup.mode"));
    startMode.setLabelLocation(BorderLayout.WEST);
    panel.add(startMode);
    myIsNonInteractiveModeEnabled = new JCheckBox(PerlBundle.message("perl.run.option.debugger.noninteractive.mode"));
    panel.add(myIsNonInteractiveModeEnabled);
    myIsCompileTimeBreakpointsEnabled = new JCheckBox(PerlBundle.message("perl.run.option.debugger.compile.time.breakpoints"));
    panel.add(myIsCompileTimeBreakpointsEnabled);
    PsiFile fileFromText = PsiFileFactory.getInstance(myProject).createFileFromText("file.dummy", PerlFileTypeScript.INSTANCE, "", 0, true);
    Document document = PsiDocumentManager.getInstance(myProject).getDocument(fileFromText);
    myInitCodeTextField = new EditorTextField(document, myProject, PerlFileTypeScript.INSTANCE);
    myInitCodeTextField.setOneLineMode(false);
    myInitCodeTextField.setPreferredSize(new Dimension(0, 100));
    LabeledComponent<EditorTextField> initCode = LabeledComponent.create(myInitCodeTextField, PerlBundle.message("perl.run.option.debugger.init.code"));
    initCode.setLabelLocation(BorderLayout.NORTH);
    panel.add(initCode);
    return panel;
}
Also used : ComboBox(com.intellij.openapi.ui.ComboBox) ColoredListCellRenderer(com.intellij.ui.ColoredListCellRenderer) Document(com.intellij.openapi.editor.Document) MapComboBoxModel(org.jdesktop.swingx.combobox.MapComboBoxModel) NotNull(org.jetbrains.annotations.NotNull) EditorTextField(com.intellij.ui.EditorTextField) ColoredListCellRenderer(com.intellij.ui.ColoredListCellRenderer) PsiFile(com.intellij.psi.PsiFile) VerticalFlowLayout(com.intellij.openapi.ui.VerticalFlowLayout) Nullable(org.jetbrains.annotations.Nullable)

Example 32 with VerticalFlowLayout

use of com.intellij.openapi.ui.VerticalFlowLayout in project Perl5-IDEA by Camelcade.

the class MasonSettingsConfigurable method createComponent.

@Nullable
@Override
public JComponent createComponent() {
    FormBuilder builder = FormBuilder.createFormBuilder();
    builder.getPanel().setLayout(new VerticalFlowLayout());
    createGlobalsComponent(builder);
    createAutobaseNamesComponent(builder);
    return builder.getPanel();
}
Also used : FormBuilder(com.intellij.util.ui.FormBuilder) VerticalFlowLayout(com.intellij.openapi.ui.VerticalFlowLayout) Nullable(org.jetbrains.annotations.Nullable)

Example 33 with VerticalFlowLayout

use of com.intellij.openapi.ui.VerticalFlowLayout in project Perl5-IDEA by Camelcade.

the class HTMLMasonSettingsConfigurable method createComponent.

@Nullable
@Override
public JComponent createComponent() {
    FormBuilder builder = FormBuilder.createFormBuilder();
    builder.getPanel().setLayout(new VerticalFlowLayout());
    defaulthandlerName = new JTextField();
    builder.addLabeledComponent(new JLabel("Default handler name:"), defaulthandlerName);
    autohandlerName = new JTextField();
    builder.addLabeledComponent(new JLabel("Auto-handler name:"), autohandlerName);
    createGlobalsComponent(builder);
    createSubstitutedExtensionsComponent(builder);
    createCustomTagsComponent(builder);
    return builder.getPanel();
}
Also used : FormBuilder(com.intellij.util.ui.FormBuilder) VerticalFlowLayout(com.intellij.openapi.ui.VerticalFlowLayout) Nullable(org.jetbrains.annotations.Nullable)

Example 34 with VerticalFlowLayout

use of com.intellij.openapi.ui.VerticalFlowLayout in project azure-tools-for-java by Microsoft.

the class SparkBatchJobConfigurable method createUIComponents.

protected void createUIComponents() {
    localRunParamsPanel = new SparkLocalRunParamsPanel(getProject()).withInitialize();
    remoteRunParamsPanel = new JPanel(new VerticalFlowLayout(0, 5));
    setClusterSubmissionPanel(createSubmissionPanel());
    this.commonPanel = new JBPanel();
    this.commonRunParametersPanel = new SparkCommonRunParametersPanel(this.myProject, this);
    this.commonPanel.setLayout(new BorderLayout());
    this.commonPanel.add(commonRunParametersPanel.getComponent());
}
Also used : JBPanel(com.intellij.ui.components.JBPanel) VerticalFlowLayout(com.intellij.openapi.ui.VerticalFlowLayout)

Aggregations

VerticalFlowLayout (com.intellij.openapi.ui.VerticalFlowLayout)34 Nullable (org.jetbrains.annotations.Nullable)8 JBLabel (com.intellij.ui.components.JBLabel)7 NotNull (org.jetbrains.annotations.NotNull)6 ActionEvent (java.awt.event.ActionEvent)4 ActionListener (java.awt.event.ActionListener)4 EditorTextField (com.intellij.ui.EditorTextField)3 TitledSeparator (com.intellij.ui.TitledSeparator)3 JBList (com.intellij.ui.components.JBList)3 JBScrollPane (com.intellij.ui.components.JBScrollPane)3 FormBuilder (com.intellij.util.ui.FormBuilder)3 ArrayList (java.util.ArrayList)3 Document (com.intellij.openapi.editor.Document)2 ComboBox (com.intellij.openapi.ui.ComboBox)2 JBPanel (com.intellij.ui.components.JBPanel)2 JCheckBox (javax.swing.JCheckBox)2 JPanel (javax.swing.JPanel)2 Density (com.android.resources.Density)1 LegendComponent (com.android.tools.adtui.LegendComponent)1 ImageComponent (com.android.tools.idea.ui.ImageComponent)1