Source code: org/scopemvc/view/swing/SUnboundPanel.java
1 /*
2 * Scope: a generic MVC framework.
3 * Copyright (c) 2000-2002, Steve Meyfroidt
4 * All rights reserved.
5 * Email: smeyfroi@users.sourceforge.net
6 *
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 *
15 * Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 *
19 * Neither the name "Scope" nor the names of its contributors
20 * may be used to endorse or promote products derived from this software
21 * without specific prior written permission.
22 *
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
28 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
30 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
31 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
32 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 *
36 *
37 * $Id: SUnboundPanel.java,v 1.4 2002/01/26 09:46:21 smeyfroi Exp $
38 */
39
40
41 package org.scopemvc.view.swing;
42
43
44 import org.apache.commons.logging.Log;
45 import org.apache.commons.logging.LogSource;
46
47
48 /**
49 * <P>
50 * A JPanel implementation of View that is not
51 * bound to a model object for use
52 * in Swing-based user interfaces. This can be used
53 * as a simple View that is never bound to a model
54 * and which can contain subviews bound to their own
55 * completely independent models (rather than being
56 * bound to submodels of a common parent model
57 * that is bound to a parent SwingView).
58 * {@link org.scopemvc.controller.swing.SwingContext}
59 * uses the following
60 * methods from the {@link SwingView} base class
61 * that can be overridden in subclasses that can be shown
62 * as Window-level views:
63 * <UL>
64 * <LI>{@link #getTitle}</LI>
65 * <LI>{@link #getDisplayMode}</LI>
66 * <LI>{@link #getCloseControl}</LI>
67 * <LI>{@link #isResizable}</LI>
68 * </UL>
69 * </P>
70 * <P>
71 * Attempts to bind a model to this are silently ignored
72 * so it can be used as a subview to insulate deeper subviews
73 * from being bound to a model from a parent view.
74 * </P>
75 *
76 * @author <A HREF="mailto:smeyfroi@users.sourceforge.net">Steve Meyfroidt</A>
77 * @version $Revision: 1.4 $ $Date: 2002/01/26 09:46:21 $
78 */
79 public class SUnboundPanel extends SwingView {
80
81
82 private static final Log LOG = LogSource.getInstance(SUnboundPanel.class);
83
84
85 public final Object getBoundModel() {
86 return null;
87 }
88
89
90 public final void setBoundModel(Object inModel) {
91 // noop
92 }
93 }