summaryrefslogtreecommitdiff
path: root/java/src/IceGridGUI/Application/ServerTemplateEditor.java
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2006-03-29 21:21:02 +0000
committerBernard Normier <bernard@zeroc.com>2006-03-29 21:21:02 +0000
commit20744ae1f1182d08e26b175f59d14041aabaf754 (patch)
tree937d125b80663966b3a61e13e744e28daf1f22da /java/src/IceGridGUI/Application/ServerTemplateEditor.java
parentJava metadata (diff)
downloadice-20744ae1f1182d08e26b175f59d14041aabaf754.tar.bz2
ice-20744ae1f1182d08e26b175f59d14041aabaf754.tar.xz
ice-20744ae1f1182d08e26b175f59d14041aabaf754.zip
IceGrid GUI refactoring
Diffstat (limited to 'java/src/IceGridGUI/Application/ServerTemplateEditor.java')
-rwxr-xr-xjava/src/IceGridGUI/Application/ServerTemplateEditor.java62
1 files changed, 62 insertions, 0 deletions
diff --git a/java/src/IceGridGUI/Application/ServerTemplateEditor.java b/java/src/IceGridGUI/Application/ServerTemplateEditor.java
new file mode 100755
index 00000000000..99ca4a48a93
--- /dev/null
+++ b/java/src/IceGridGUI/Application/ServerTemplateEditor.java
@@ -0,0 +1,62 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+package IceGridGUI.Application;
+
+import javax.swing.JFrame;
+
+import com.jgoodies.forms.builder.DefaultFormBuilder;
+
+class ServerTemplateEditor extends TemplateEditor
+{
+ ServerTemplateEditor(JFrame parentFrame)
+ {
+ super(parentFrame);
+ _subEditor = new ServerSubEditor(this, parentFrame);
+ }
+
+ void writeDescriptor()
+ {
+ super.writeDescriptor();
+ _subEditor.writeDescriptor();
+ }
+
+ boolean isSimpleUpdate()
+ {
+ return super.isSimpleUpdate() && _subEditor.isSimpleUpdate();
+ }
+
+ protected void appendProperties(DefaultFormBuilder builder)
+ {
+ super.appendProperties(builder);
+ builder.appendSeparator();
+ builder.nextLine();
+ _subEditor.appendProperties(builder);
+ }
+
+ protected void buildPropertiesPanel()
+ {
+ super.buildPropertiesPanel();
+ _propertiesPanel.setName("Server Template Properties");
+ }
+
+ void show(ServerTemplate t)
+ {
+ detectUpdates(false);
+ _target = t;
+
+ super.show();
+ _subEditor.show(true);
+
+ _applyButton.setEnabled(t.isEphemeral());
+ _discardButton.setEnabled(t.isEphemeral());
+ detectUpdates(true);
+ }
+
+ private ServerSubEditor _subEditor;
+}