artifact editor: manifest properties ui fixes

This commit is contained in:
nik
2009-11-03 14:18:52 +03:00
parent 97f7277290
commit f90ce2d81d
3 changed files with 5 additions and 4 deletions
@@ -162,9 +162,9 @@ public abstract class ElementWithManifestPropertiesPanel<E extends CompositeElem
}
addManifestFile(file.getPath());
myContext.getThisArtifactEditor().updateLayoutTree();
updateComponents(new ManifestFileConfiguration(null, null, file.getPath()));
apply();
myContext.getThisArtifactEditor().updateLayoutTree();
}
private void addManifestFile(final String path) {
@@ -188,9 +188,9 @@ public abstract class ElementWithManifestPropertiesPanel<E extends CompositeElem
if (files.length != 1) return;
addManifestFile(files[0].getPath());
myContext.getThisArtifactEditor().updateLayoutTree();
updateComponents(ManifestFileUtil.createManifestFileConfiguration(files[0]));
apply();
myContext.getThisArtifactEditor().updateLayoutTree();
}
private void updateComponents(@NotNull ManifestFileConfiguration configuration) {
@@ -196,7 +196,6 @@ public class ArtifactEditorImpl implements ArtifactEditorEx {
rightTopPanel.add(new JLabel("Available Elements (drag'n'drop to layout tree)"), BorderLayout.SOUTH);
rightPanel.add(rightTopPanel, BorderLayout.NORTH);
rightPanel.add(ScrollPaneFactory.createScrollPane(mySourceItemsTree.getTree()), BorderLayout.CENTER);
rightPanel.add(new JPanel(), BorderLayout.SOUTH);
rightPanel.setBorder(border);
splitter.setSecondComponent(rightPanel);
@@ -114,6 +114,8 @@ public class LayoutTreeComponent implements DnDTarget, Disposable {
private void createPropertiesPanel() {
myPropertiesPanel = new JPanel(new BorderLayout());
final JPanel emptyPanel = new JPanel();
emptyPanel.setMinimumSize(new Dimension(0, 0));
emptyPanel.setPreferredSize(new Dimension(0, 0));
myPropertiesPanelWrapper = new JPanel(new CardLayout());
myPropertiesPanelWrapper.add(EMPTY_CARD, emptyPanel);
@@ -480,7 +482,7 @@ public class LayoutTreeComponent implements DnDTarget, Disposable {
myCurrentPanel = element.getType().createElementPropertiesPanel(myElement, myContext);
myPropertiesPanel.removeAll();
if (myCurrentPanel != null) {
myPropertiesPanel.add(BorderLayout.CENTER, myCurrentPanel.createComponent());
myPropertiesPanel.add(BorderLayout.CENTER, ScrollPaneFactory.createScrollPane(myCurrentPanel.createComponent()));
myCurrentPanel.reset();
}
}