001 /* sillyview : a free model-view-controller system for Java
002 * Copyright (C) 2004 T.J. Willis
003 *
004 * This program is free software; you can redistribute it and/or
005 * modify it under the terms of the GNU General Public License
006 * as published by the Free Software Foundation; either version 2
007 * of the License, or (at your option) any later version.
008 *
009 * This program is distributed in the hope that it will be useful,
010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
012 * GNU General Public License for more details.
013 *
014 * You should have received a copy of the GNU General Public License
015 * along with this program; if not, write to the Free Software
016 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
017 *
018 * $Header: /cvsroot/sillyview/sillyview/src/net/sourceforge/sillyview/Widget.java,v 1.2 2004/05/15 01:58:51 tj_willis Exp $
019 */
020 package net.sourceforge.sillyview;
021
022 /**
023 * An instance of this class is an object that has a view. It may be
024 * useful for cases where you want to be able to swap out alternative
025 * views.
026 *
027 * @author <a href="mailto:tj_willis@users.sourceforge.net">T.J. Willis</a>
028 * @version 1.0
029 * @has 1 Has - net.sourceforge.sillyview.WidgetView
030 */
031 public class Widget {
032 /**
033 * Describe variable <code>view</code> here.
034 *
035 */
036 protected WidgetView view;
037
038 /**
039 * Creates a new <code>Widget</code> instance.
040 *
041 * @param myView a <code>WidgetView</code> value
042 */
043 public Widget (WidgetView myView) {
044 view = myView;
045 }
046
047 /**
048 * Get the View value.
049 * @return the View value.
050 */
051 public WidgetView getView () {
052 return view;
053 }
054
055 /**
056 * Set the View value.
057 * @param newView The new View value.
058 */
059 public void setView (WidgetView newView) {
060 this.view = newView;
061 }
062
063 // public Object getCurrentView();
064 // void setToken(Object key, Object value);
065 // Object getValue(Object key);
066
067 }