diff options
Diffstat (limited to 'java/src/IceGridGUI/Application/ServerTemplateEditor.java')
-rw-r--r-- | java/src/IceGridGUI/Application/ServerTemplateEditor.java | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/java/src/IceGridGUI/Application/ServerTemplateEditor.java b/java/src/IceGridGUI/Application/ServerTemplateEditor.java new file mode 100644 index 00000000000..2f67235b503 --- /dev/null +++ b/java/src/IceGridGUI/Application/ServerTemplateEditor.java @@ -0,0 +1,69 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2011 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 com.jgoodies.forms.builder.DefaultFormBuilder; + +class ServerTemplateEditor extends TemplateEditor +{ + ServerTemplateEditor() + { + _subEditor = new ServerSubEditor(this); + } + + 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"); + } + + protected boolean validate() + { + return super.validate() && _subEditor.validate(); + } + + void show(ServerTemplate t) + { + detectUpdates(false); + _target = t; + + super.show(); + _subEditor.show(true); + + _applyButton.setEnabled(t.isEphemeral()); + _discardButton.setEnabled(t.isEphemeral()); + detectUpdates(true); + if(t.isEphemeral()) + { + updated(); + } + } + + private ServerSubEditor _subEditor; +} |