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/PlainServiceEditor.java | 87 ++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100755 java/src/IceGridGUI/Application/PlainServiceEditor.java (limited to 'java/src/IceGridGUI/Application/PlainServiceEditor.java') diff --git a/java/src/IceGridGUI/Application/PlainServiceEditor.java b/java/src/IceGridGUI/Application/PlainServiceEditor.java new file mode 100755 index 00000000000..56fe95b26a2 --- /dev/null +++ b/java/src/IceGridGUI/Application/PlainServiceEditor.java @@ -0,0 +1,87 @@ +// ********************************************************************** +// +// 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 PlainServiceEditor extends CommunicatorChildEditor +{ + PlainServiceEditor(JFrame parentFrame) + { + _subEditor = new ServiceSubEditor(this, parentFrame); + } + + // + // From Editor: + // + Utils.Resolver getDetailResolver() + { + PlainService service = (PlainService)_target; + if(service.getCoordinator().substitute()) + { + return service.getResolver(); + } + else + { + return null; + } + } + + protected void appendProperties(DefaultFormBuilder builder) + { + _subEditor.appendProperties(builder); + } + + protected void buildPropertiesPanel() + { + super.buildPropertiesPanel(); + _propertiesPanel.setName("Service Properties"); + } + + + void writeDescriptor() + { + _subEditor.writeDescriptor(); + } + + boolean isSimpleUpdate() + { + return _subEditor.isSimpleUpdate(); + } + + Communicator.ChildList getChildList() + { + return ((Communicator)_target.getParent()).getServices(); + } + + Object getSubDescriptor() + { + ServiceInstanceDescriptor sid = (ServiceInstanceDescriptor)_target.getDescriptor(); + return sid.descriptor; + } + + void show(PlainService service) + { + detectUpdates(false); + _target = service; + + _subEditor.show(true); + + _applyButton.setEnabled(service.isEphemeral()); + _discardButton.setEnabled(service.isEphemeral()); + detectUpdates(true); + } + + private ServiceSubEditor _subEditor; +} -- cgit v1.2.3