diff options
author | Bernard Normier <bernard@zeroc.com> | 2006-05-31 02:36:19 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2006-05-31 02:36:19 +0000 |
commit | 30f98a26bbf51552b5ec361e1a9ff89a778fd6d5 (patch) | |
tree | 6058928209564e76b87b5b7a4d8b2df0e6006e8c /java/src/IceGridGUI/ApplicationPane.java | |
parent | Added tooltips to Login dialog (diff) | |
download | ice-30f98a26bbf51552b5ec361e1a9ff89a778fd6d5.tar.bz2 ice-30f98a26bbf51552b5ec361e1a9ff89a778fd6d5.tar.xz ice-30f98a26bbf51552b5ec361e1a9ff89a778fd6d5.zip |
Save now applies if needed
Diffstat (limited to 'java/src/IceGridGUI/ApplicationPane.java')
-rwxr-xr-x | java/src/IceGridGUI/ApplicationPane.java | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/java/src/IceGridGUI/ApplicationPane.java b/java/src/IceGridGUI/ApplicationPane.java index efd63957a9e..3ef7710ab51 100755 --- a/java/src/IceGridGUI/ApplicationPane.java +++ b/java/src/IceGridGUI/ApplicationPane.java @@ -118,7 +118,7 @@ public class ApplicationPane extends JSplitPane implements Tab if(_currentNode != null) { _root.getCoordinator().showActions(_currentNode); - _currentNode.getEditor(); + _currentEditor = _currentNode.getEditor(); } } @@ -242,15 +242,24 @@ public class ApplicationPane extends JSplitPane implements Tab public void save() { - _root.save(); + if(_currentEditor == null || _currentEditor.save()) + { + _root.save(); + } } public void saveToRegistry() { - _root.saveToRegistry(); + if(_currentEditor == null || _currentEditor.save()) + { + _root.saveToRegistry(); + } } public void saveToFile() { - _root.saveToFile(); + if(_currentEditor == null || _currentEditor.save()) + { + _root.saveToFile(); + } } public void discardUpdates() { @@ -295,14 +304,15 @@ public class ApplicationPane extends JSplitPane implements Tab } _propertiesFrame.setTitle("Properties"); _propertiesFrame.setToolBar(null); + _currentEditor = null; } else { - Editor editor = _currentNode.getEditor(); - Component currentProperties = editor.getProperties(); + _currentEditor = _currentNode.getEditor(); + Component currentProperties = _currentEditor.getProperties(); _propertiesFrame.setContent(currentProperties); _propertiesFrame.setTitle(currentProperties.getName()); - _propertiesFrame.setToolBar(editor.getToolBar()); + _propertiesFrame.setToolBar(_currentEditor.getToolBar()); } _propertiesFrame.validate(); _propertiesFrame.repaint(); @@ -387,7 +397,9 @@ public class ApplicationPane extends JSplitPane implements Tab // private java.util.LinkedList _previousNodes = new java.util.LinkedList(); private java.util.LinkedList _nextNodes = new java.util.LinkedList(); + private TreeNode _currentNode; + private Editor _currentEditor; static private final int HISTORY_MAX_SIZE = 20; } |