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;
}
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;
}
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;
}
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);
}
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;
}
Aggregations