001/* 002 * Copyright (c) 2010 The Regents of the University of California. 003 * All rights reserved. 004 * 005 * '$Author: aschultz $' 006 * '$Date: 2010-12-23 19:01:04 +0000 (Thu, 23 Dec 2010) $' 007 * '$Revision: 26600 $' 008 * 009 * Permission is hereby granted, without written agreement and without 010 * license or royalty fees, to use, copy, modify, and distribute this 011 * software and its documentation for any purpose, provided that the above 012 * copyright notice and the following two paragraphs appear in all copies 013 * of this software. 014 * 015 * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 016 * FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 017 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF 018 * THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF 019 * SUCH DAMAGE. 020 * 021 * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, 022 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 023 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE 024 * PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF 025 * CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, 026 * ENHANCEMENTS, OR MODIFICATIONS. 027 * 028 */ 029 030package org.ecoinformatics.seek.ecogrid; 031 032import javax.swing.JButton; 033import javax.swing.JPanel; 034 035import org.kepler.gui.PreferencesTab; 036import org.kepler.gui.PreferencesTabFactory; 037 038import ptolemy.actor.gui.TableauFrame; 039import ptolemy.kernel.util.IllegalActionException; 040import ptolemy.kernel.util.NameDuplicationException; 041import ptolemy.kernel.util.NamedObj; 042 043public class ServicesListModificationPanel extends JPanel implements PreferencesTab { 044 045 private TableauFrame _frame; 046 private String _tabName; 047 048 public ServicesListModificationPanel() {} 049 050 public void initializeTab() throws Exception { 051 JButton temp = new JButton("Under Construction"); 052 this.add(temp); 053 } 054 055 public void setParent(TableauFrame frame) { 056 this._frame = frame; 057 } 058 059 /* (non-Javadoc) 060 * @see org.kepler.gui.PreferencesTab#getTabName() 061 */ 062 public String getTabName() { 063 return _tabName; 064 } 065 066 public void setTabName(String name) { 067 _tabName = name; 068 } 069 070 /** 071 * A factory that creates the ServicesListModification panel for the PreferencesFrame. 072 * 073 *@author Aaron Schultz 074 */ 075 public static class Factory extends PreferencesTabFactory { 076 /** 077 * Create a factory with the given name and container. 078 * 079 *@param container 080 * The container. 081 *@param name 082 * The name of the entity. 083 *@exception IllegalActionException 084 * If the container is incompatible with this attribute. 085 *@exception NameDuplicationException 086 * If the name coincides with an attribute already in the 087 * container. 088 */ 089 public Factory(NamedObj container, String name) 090 throws IllegalActionException, NameDuplicationException { 091 super(container, name); 092 } 093 094 /** 095 * Create a PreferencesTab that displays the selected Ecogrid Services. 096 * 097 * @return A new LibraryPaneTab that displays the library 098 */ 099 public PreferencesTab createPreferencesTab() { 100 ServicesListModificationPanel slmp = new ServicesListModificationPanel(); 101 slmp.setTabName(this.getName()); 102 return slmp; 103 } 104 } 105 106 public void onClose() { 107 // TODO Auto-generated method stub 108 109 } 110 111 /* (non-Javadoc) 112 * @see org.kepler.gui.PreferencesTab#onCancel() 113 */ 114 public void onCancel() { 115 // Do nothing 116 } 117}