/*
- * 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.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package com.intellij.facet.impl.ui;
import com.intellij.facet.Facet;
}
}
+ @Override
public void reset() {
super.reset();
myErrorPanel.getValidatorsManager().validate();
return myComponent;
}
+ @Override
public JComponent createComponent() {
final JComponent editorComponent;
if (myEditorTabs.length > 1) {
tabbedPane.addTab(editorTab.getDisplayName(), c);
}
tabbedPane.addChangeListener(new ChangeListener() {
- public void stateChanged(ChangeEvent e) {
+ @Override
+ public void stateChanged(@NotNull ChangeEvent e) {
myEditorTabs[mySelectedTabIndex].onTabLeaving();
mySelectedTabIndex = tabbedPane.getSelectedIndex();
onTabSelected(myEditorTabs[mySelectedTabIndex]);
else {
editorComponent = new JPanel();
}
+
+ final JComponent errorComponent = myErrorPanel.getComponent();
+ UIUtil.addInsets(errorComponent, new Insets(0, 5, 5, 0));
+
final JPanel panel = new JPanel(new BorderLayout());
panel.add(BorderLayout.CENTER, editorComponent);
- panel.add(BorderLayout.SOUTH, myErrorPanel.getComponent());
-
+ panel.add(BorderLayout.SOUTH, errorComponent);
return panel;
}
}
}
+ @Override
public void disposeUIResources() {
Disposer.dispose(myDisposable);
myErrorPanel.disposeUIResources();
}
}
+ @Override
public FacetEditorTab[] getEditorTabs() {
return myEditorTabs;
}
+ @Override
public <T extends FacetEditorTab> T getEditorTab(@NotNull final Class<T> aClass) {
for (FacetEditorTab editorTab : myEditorTabs) {
if (aClass.isInstance(editorTab)) {
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package com.intellij.facet.impl.ui;
import com.intellij.facet.ui.FacetConfigurationQuickFix;
myValidatorsManager = new FacetValidatorsManagerImpl();
myWarningLabel = new JLabel();
myWarningLabel.setIcon(AllIcons.General.WarningDialog);
+ myWarningLabel.setIconTextGap(5);
myQuickFixButton.addActionListener(new ActionListener() {
@Override
- public void actionPerformed(final ActionEvent e) {
+ public void actionPerformed(@NotNull ActionEvent e) {
if (myCurrentQuickFix != null) {
myCurrentQuickFix.run(myQuickFixButton);
myValidatorsManager.validate();