From 8ff9dd62a9241109b599896c1f06516009275fe0 Mon Sep 17 00:00:00 2001 From: Bernard Normier Date: Mon, 8 May 2006 20:55:38 +0000 Subject: Simplified Application view; fixed PropertySets issues --- .../IceGridGUI/Application/PlainServerEditor.java | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100755 java/src/IceGridGUI/Application/PlainServerEditor.java (limited to 'java/src/IceGridGUI/Application/PlainServerEditor.java') diff --git a/java/src/IceGridGUI/Application/PlainServerEditor.java b/java/src/IceGridGUI/Application/PlainServerEditor.java new file mode 100755 index 00000000000..96f4a4645b5 --- /dev/null +++ b/java/src/IceGridGUI/Application/PlainServerEditor.java @@ -0,0 +1,73 @@ +// ********************************************************************** +// +// 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; + +import IceGrid.*; +import IceGridGUI.*; + +class PlainServerEditor extends AbstractServerEditor +{ + protected void writeDescriptor() + { + _subEditor.writeDescriptor(); + } + + protected boolean isSimpleUpdate() + { + return _subEditor.isSimpleUpdate(); + } + + PlainServerEditor(JFrame parentFrame) + { + _subEditor = new ServerSubEditor(this, parentFrame); + } + + // + // From Editor: + // + Utils.Resolver getDetailResolver() + { + if(_target.getCoordinator().substitute()) + { + return _target.getResolver(); + } + else + { + return null; + } + } + + protected void appendProperties(DefaultFormBuilder builder) + { + _subEditor.appendProperties(builder); + } + + Object getSubDescriptor() + { + return _target.getDescriptor(); + } + + void show(PlainServer server) + { + detectUpdates(false); + _target = server; + + _subEditor.show(true); + + _applyButton.setEnabled(server.isEphemeral()); + _discardButton.setEnabled(server.isEphemeral()); + detectUpdates(true); + } + + private ServerSubEditor _subEditor; +} -- cgit v1.2.3