Search in sources :

Example 1 with JBTabbedPane

use of com.intellij.ui.components.JBTabbedPane in project intellij-community by JetBrains.

the class SvnConfigureProxiesDialog method createCenterPanel.

protected JComponent createCenterPanel() {
    myTabbedPane = new JBTabbedPane();
    myTabbedPane.add(myUserTab.createComponent(), SvnBundle.message("dialog.edit.http.proxies.settings.tab.edit.user.file.title"));
    myTabbedPane.add(mySystemTab.createComponent(), SvnBundle.message("dialog.edit.http.proxies.settings.tab.edit.system.file.title"));
    myPanel.add(myTabbedPane, BorderLayout.NORTH);
    return myPanel;
}
Also used : JBTabbedPane(com.intellij.ui.components.JBTabbedPane)

Example 2 with JBTabbedPane

use of com.intellij.ui.components.JBTabbedPane in project intellij-community by JetBrains.

the class AdvancedOptionsDialog method createCenterPanel.

@Override
@Nullable
protected JComponent createCenterPanel() {
    JComponent root;
    if (myInputOptions != null && myOutputOptions != null) {
        root = new JBTabbedPane();
        ((JTabbedPane) root).addTab("Input", myInputOptions.getRoot());
        ((JTabbedPane) root).addTab("Output", myOutputOptions.getRoot());
    } else if (myInputOptions != null) {
        root = myInputOptions.getRoot();
    } else {
        root = myOutputOptions.getRoot();
    }
    return root;
}
Also used : JBTabbedPane(com.intellij.ui.components.JBTabbedPane) Nullable(org.jetbrains.annotations.Nullable)

Example 3 with JBTabbedPane

use of com.intellij.ui.components.JBTabbedPane in project intellij-community by JetBrains.

the class CompositeCommittedChangesProvider method createActions.

@Nullable
public VcsCommittedViewAuxiliary createActions(final DecoratorManager manager, final RepositoryLocation location) {
    JTabbedPane tabbedPane = null;
    List<AnAction> actions = null;
    List<AnAction> toolbarActions = null;
    final List<Runnable> calledOnDispose = new ArrayList<>();
    for (AbstractVcs baseVcs : myBaseVcss) {
        final CommittedChangesProvider provider = baseVcs.getCommittedChangesProvider();
        if (provider != null) {
            VcsCommittedViewAuxiliary auxiliary = provider.createActions(manager, location);
            if (auxiliary != null) {
                if (tabbedPane == null) {
                    tabbedPane = new JBTabbedPane();
                    actions = new ArrayList<>();
                    toolbarActions = new ArrayList<>();
                }
                actions.addAll(auxiliary.getPopupActions());
                toolbarActions.addAll(auxiliary.getToolbarActions());
                calledOnDispose.add(auxiliary.getCalledOnViewDispose());
            }
        }
    }
    if (tabbedPane != null) {
        final JPanel panel = new JPanel();
        panel.add(tabbedPane);
        return new VcsCommittedViewAuxiliary(actions, new Runnable() {

            public void run() {
                for (Runnable runnable : calledOnDispose) {
                    runnable.run();
                }
            }
        }, toolbarActions);
    }
    return null;
}
Also used : JBTabbedPane(com.intellij.ui.components.JBTabbedPane) AnAction(com.intellij.openapi.actionSystem.AnAction) Nullable(org.jetbrains.annotations.Nullable)

Example 4 with JBTabbedPane

use of com.intellij.ui.components.JBTabbedPane in project android by JetBrains.

the class CpuProfilerUiManager method setupExtendedOverviewUi.

@Override
public void setupExtendedOverviewUi(@NotNull JPanel toolbar, @NotNull JPanel overviewPanel) {
    super.setupExtendedOverviewUi(toolbar, overviewPanel);
    myThreadSegment = new ThreadsSegment(myTimeCurrentRangeUs, myDataStore, myEventDispatcher, this);
    myChoreographer.register(myThreadSegment);
    setupAndRegisterSegment(myThreadSegment, DEFAULT_MONITOR_MIN_HEIGHT, DEFAULT_MONITOR_PREFERRED_HEIGHT, DEFAULT_MONITOR_MAX_HEIGHT);
    overviewPanel.add(myThreadSegment);
    setSegmentState(overviewPanel, myThreadSegment, AccordionLayout.AccordionState.MAXIMIZE);
    myTabbedPane = new JBTabbedPane();
    myTopdownJpanel = new JPanel(new BorderLayout());
    myBottomupJPanel = new JPanel(new BorderLayout());
    createTracingButton(toolbar);
}
Also used : JBTabbedPane(com.intellij.ui.components.JBTabbedPane)

Example 5 with JBTabbedPane

use of com.intellij.ui.components.JBTabbedPane in project android by JetBrains.

the class AndroidModuleEditor method getPanel.

@NotNull
public JComponent getPanel() {
    Module module = GradleUtil.findModuleByGradlePath(myProject, myName);
    if (module == null || GradleUtil.getGradleBuildFile(module) == null) {
        return new JPanel();
    }
    final NamedObjectPanel.PanelGroup panelGroup = new NamedObjectPanel.PanelGroup();
    if (myGenericSettingsPanel == null) {
        myEditors.clear();
        if (AndroidPluginGeneration.find(module) == COMPONENT) {
            myEditors.add(new GenericEditor<>("Information", DslNotSupportedPanel::new));
        } else {
            AndroidFacet facet = AndroidFacet.getInstance(module);
            if (facet != null && facet.requiresAndroidModel() && isBuildWithGradle(module)) {
                myEditors.add(new GenericEditor<>("Properties", () -> {
                    SingleObjectPanel panel = new SingleObjectPanel(myProject, myName, null, BUILD_FILE_GENERIC_PROPERTIES);
                    panel.init();
                    return panel;
                }));
                myEditors.add(new GenericEditor<>(SIGNING_TAB_TITLE, () -> {
                    NamedObjectPanel panel = new NamedObjectPanel(myProject, myName, BuildFileKey.SIGNING_CONFIGS, "config", panelGroup);
                    panel.init();
                    return panel;
                }));
                myEditors.add(new GenericEditor<>(FLAVORS_TAB_TITLE, () -> {
                    NamedObjectPanel panel = new NamedObjectPanel(myProject, myName, BuildFileKey.FLAVORS, "flavor", panelGroup);
                    panel.init();
                    return panel;
                }));
                myEditors.add(new GenericEditor<>(BUILD_TYPES_TAB_TITLE, () -> {
                    NamedObjectPanel panel = new NamedObjectPanel(myProject, myName, BuildFileKey.BUILD_TYPES, "buildType", panelGroup);
                    panel.init();
                    return panel;
                }));
            }
        }
        myEditors.add(new GenericEditor<>(ProjectBundle.message("modules.classpath.title"), () -> new ModuleDependenciesPanel(myProject, myName)));
        myTabbedPane = new JBTabbedPane(TOP);
        for (ModuleConfigurationEditor editor : myEditors) {
            JComponent component = editor.createComponent();
            if (component != null) {
                myTabbedPane.addTab(editor.getDisplayName(), component);
                editor.reset();
            }
        }
        myTabbedPane.addChangeListener(e -> {
            String tabName = myEditors.get(myTabbedPane.getSelectedIndex()).getDisplayName();
            String appId = getApplicationId(myProject);
            if (appId != null) {
                UsageTracker.getInstance().log(AndroidStudioEvent.newBuilder().setCategory(AndroidStudioEvent.EventCategory.PROJECT_STRUCTURE_DIALOG).setKind(AndroidStudioEvent.EventKind.PROJECT_STRUCTURE_DIALOG_TOP_TAB_CLICK).setProjectId(AndroidStudioUsageTracker.anonymizeUtf8(appId)));
            }
        });
        myGenericSettingsPanel = myTabbedPane;
    }
    return myGenericSettingsPanel;
}
Also used : JBTabbedPane(com.intellij.ui.components.JBTabbedPane) AndroidFacet(org.jetbrains.android.facet.AndroidFacet) ModuleConfigurationEditor(com.intellij.openapi.module.ModuleConfigurationEditor) Module(com.intellij.openapi.module.Module) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

JBTabbedPane (com.intellij.ui.components.JBTabbedPane)9 Nullable (org.jetbrains.annotations.Nullable)4 NotNull (org.jetbrains.annotations.NotNull)3 Tree (com.intellij.ui.treeStructure.Tree)2 FindManager (com.intellij.find.FindManager)1 AllIcons (com.intellij.icons.AllIcons)1 com.intellij.ide (com.intellij.ide)1 CloseTabToolbarAction (com.intellij.ide.actions.CloseTabToolbarAction)1 ExclusionHandler (com.intellij.ide.actions.exclusion.ExclusionHandler)1 NavigationItem (com.intellij.navigation.NavigationItem)1 Disposable (com.intellij.openapi.Disposable)1 com.intellij.openapi.actionSystem (com.intellij.openapi.actionSystem)1 AnAction (com.intellij.openapi.actionSystem.AnAction)1 ApplicationManager (com.intellij.openapi.application.ApplicationManager)1 CommandProcessor (com.intellij.openapi.command.CommandProcessor)1 Extensions (com.intellij.openapi.extensions.Extensions)1 Module (com.intellij.openapi.module.Module)1 ModuleConfigurationEditor (com.intellij.openapi.module.ModuleConfigurationEditor)1 Configurable (com.intellij.openapi.options.Configurable)1 ProgressIndicator (com.intellij.openapi.progress.ProgressIndicator)1