001/* 002 * Copyright (c) 2004-2010 The Regents of the University of California. 003 * All rights reserved. 004 * 005 * '$Author: welker $' 006 * '$Date: 2010-05-06 05:21:26 +0000 (Thu, 06 May 2010) $' 007 * '$Revision: 24234 $' 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.kepler.gui; 031 032import java.awt.Component; 033 034import javax.swing.Box; 035 036import ptolemy.actor.gui.TableauFrame; 037import ptolemy.kernel.util.NamedObj; 038 039/** 040 * A JTabbedPane tab to be added to a TabbedDialog object. This particular pane 041 * shows the "Units" settings for the object being configured 042 * 043 * @author Matthew Brooke 044 * @since 27 February 2006 045 */ 046public class DialogUnitsTab extends AbstractDialogTab { 047 048 public DialogUnitsTab(NamedObj target, String targetType, TableauFrame frame) { 049 super(target, targetType, frame); 050 } 051 052 /** 053 * Validate the user-editable values associated with this tab 054 * 055 * @return boolean - true if user values validate correctly; false otherwise 056 */ 057 public boolean validateInput() { 058 /** @todo - FIXME - needs to be implemented */ 059 return true; 060 } 061 062 /** 063 * Save the user-editable values associated with this tab 064 */ 065 public void save() { 066 /** @todo - FIXME - needs to be implemented */ 067 } 068 069 /** 070 * get the Component that will be displayed in the NORTH section of the 071 * BorderLayout. Note that if the dialog is resizable, this Component will 072 * need to stretch along the x axis, while retaining its aesthetic qualities 073 * 074 * @return Component 075 */ 076 protected Component getTopPanel() { 077 Box topPanel = Box.createHorizontalBox(); 078 /** @todo - FIXME - needs to be implemented */ 079 return topPanel; 080 } 081 082 /** 083 * get the Component that will be displayed in the CENTER section of the 084 * BorderLayout. Note that if the dialog is resizable, this Component will 085 * need to stretch along both the x <em>and</em> y axes, while retaining its 086 * aesthetic qualities 087 * 088 * @return Component 089 */ 090 protected Component getCenterPanel() { 091 Box centerPanel = Box.createHorizontalBox(); 092 /** @todo - FIXME - needs to be implemented */ 093 094 // 095 // SEE ptolemy.actor.gui.PortConfigurerDialog 096 // DialogTableau dialogTableau = DialogTableau.createDialog( 097 // (Frame) parent, _configuration, 098 // ((TableauFrame) parent).getEffigy(), 099 // UnitConstraintsDialog.class, (Entity) target); 100 return centerPanel; 101 102 } 103 104 /** 105 * get the Component that will be displayed in the SOUTH section of the 106 * BorderLayout. Note that if the dialog is resizable, this Component will 107 * need to stretch along the x axis, while retaining its aesthetic qualities 108 * 109 * @return Component 110 */ 111 protected Component getBottomPanel() { 112 Box bottomPanel = Box.createHorizontalBox(); 113 /** @todo - FIXME - needs to be implemented */ 114 return bottomPanel; 115 } 116}