diff options
Diffstat (limited to 'platform/platform-api/src/com/intellij/openapi/ui')
5 files changed, 64 insertions, 12 deletions
diff --git a/platform/platform-api/src/com/intellij/openapi/ui/ComboBoxTableRenderer.java b/platform/platform-api/src/com/intellij/openapi/ui/ComboBoxTableRenderer.java index c02f27af5d4b..f35d76fff51c 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/ComboBoxTableRenderer.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/ComboBoxTableRenderer.java @@ -117,7 +117,7 @@ public class ComboBoxTableRenderer<T> extends JLabel implements TableCellRendere public Component getTableCellEditorComponent(JTable table, final Object value, boolean isSelected, final int row, final int column) { @SuppressWarnings("unchecked") final T t = (T)value; myValue = t; - customizeComponent(t, table, isSelected); + customizeComponent(t, table, true); //noinspection SSBasedInspection SwingUtilities.invokeLater(new Runnable() { diff --git a/platform/platform-api/src/com/intellij/openapi/ui/ComponentWithActions.java b/platform/platform-api/src/com/intellij/openapi/ui/ComponentWithActions.java index d6310f508ed0..889fb2786188 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/ComponentWithActions.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/ComponentWithActions.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,11 +41,11 @@ public interface ComponentWithActions { boolean isContentBuiltIn(); class Impl implements ComponentWithActions { - private ActionGroup myToolbar; - private String myToolbarPlace; - private JComponent myToolbarContext; - private JComponent mySearchComponent; - private JComponent myComponent; + private final ActionGroup myToolbar; + private final String myToolbarPlace; + private final JComponent myToolbarContext; + private final JComponent mySearchComponent; + private final JComponent myComponent; public Impl(final ActionGroup toolbar, final String toolbarPlace, final JComponent toolbarContext, final JComponent searchComponent, @@ -57,6 +57,7 @@ public interface ComponentWithActions { myComponent = component; } + @Override public boolean isContentBuiltIn() { return false; } @@ -65,22 +66,27 @@ public interface ComponentWithActions { this(null, null, null, null, component); } + @Override public ActionGroup getToolbarActions() { return myToolbar; } + @Override public JComponent getSearchComponent() { return mySearchComponent; } + @Override public String getToolbarPlace() { return myToolbarPlace; } + @Override public JComponent getToolbarContextComponent() { return myToolbarContext; } + @Override @NotNull public JComponent getComponent() { return myComponent; diff --git a/platform/platform-api/src/com/intellij/openapi/ui/MasterDetailsComponent.java b/platform/platform-api/src/com/intellij/openapi/ui/MasterDetailsComponent.java index 6c13964d5789..a262ea0a3b85 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/MasterDetailsComponent.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/MasterDetailsComponent.java @@ -122,7 +122,7 @@ public abstract class MasterDetailsComponent implements Configurable, DetailsCom private boolean myHasDeletedItems; protected AutoScrollToSourceHandler myAutoScrollHandler; - private boolean myToReInitWholePanel = true; + protected boolean myToReInitWholePanel = true; protected MasterDetailsComponent() { this(new MasterDetailsState()); @@ -139,7 +139,7 @@ public abstract class MasterDetailsComponent implements Configurable, DetailsCom reInitWholePanelIfNeeded(); } - private void reInitWholePanelIfNeeded() { + protected void reInitWholePanelIfNeeded() { if (!myToReInitWholePanel) return; myWholePanel = new JPanel(new BorderLayout()) { @@ -177,7 +177,8 @@ public abstract class MasterDetailsComponent implements Configurable, DetailsCom decorator.setActionGroup(group); } //left.add(myNorthPanel, BorderLayout.NORTH); - myMaster = decorator.setPanelBorder(new EmptyBorder(0, 0, 0, 0)).createPanel(); + myMaster = decorator.setAsUsualTopToolbar().setPanelBorder(new EmptyBorder(0, 0, 0, 0)).createPanel(); + myNorthPanel.setVisible(false); } else { left.add(myNorthPanel, BorderLayout.NORTH); myMaster = ScrollPaneFactory.createScrollPane(myTree); @@ -280,6 +281,7 @@ public abstract class MasterDetailsComponent implements Configurable, DetailsCom } private void initToolbar() { + if (Registry.is("ide.new.project.settings")) return; DefaultActionGroup group = createToolbarActionGroup(); if (group != null) { final JComponent component = ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, group, true).getComponent(); diff --git a/platform/platform-api/src/com/intellij/openapi/ui/PanelWithText.java b/platform/platform-api/src/com/intellij/openapi/ui/PanelWithText.java index 172772139ccf..fc6c3c6686cd 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/PanelWithText.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/PanelWithText.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,7 +36,7 @@ public class PanelWithText extends JPanel { public PanelWithText(String text) { super(new GridBagLayout()); - setBorder(BorderFactory.createEtchedBorder()); + //setBorder(BorderFactory.createEtchedBorder()); myLabel.setText(XmlStringUtil.wrapInHtml(text)); add(myLabel, new GridBagConstraints(0, 0, 1, 1, 1, 1, GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(8,8,8,8), 0, 0)); } diff --git a/platform/platform-api/src/com/intellij/openapi/ui/popup/ListItemDescriptorAdapter.java b/platform/platform-api/src/com/intellij/openapi/ui/popup/ListItemDescriptorAdapter.java new file mode 100644 index 000000000000..e11e70c74b98 --- /dev/null +++ b/platform/platform-api/src/com/intellij/openapi/ui/popup/ListItemDescriptorAdapter.java @@ -0,0 +1,44 @@ +/* + * Copyright 2000-2009 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.openapi.ui.popup; + +import org.jetbrains.annotations.Nullable; + +import javax.swing.*; + +public abstract class ListItemDescriptorAdapter<T> implements ListItemDescriptor<T> { + @Nullable + @Override + public String getCaptionAboveOf(T value) { + return null; + } + + @Nullable + @Override + public String getTooltipFor(T value) { + return null; + } + + @Override + public Icon getIconFor(T value) { + return null; + } + + @Override + public boolean hasSeparatorAboveOf(T value) { + return false; + } +}
\ No newline at end of file |