KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infohazard > maverick > flow > CommandSingleView


1 /*
2  * $Id: CommandSingleView.java,v 1.4 2002/06/06 12:23:53 lhoriman Exp $
3  * $Source: /cvsroot/mav/maverick/src/java/org/infohazard/maverick/flow/CommandSingleView.java,v $
4  */

5
6 package org.infohazard.maverick.flow;
7
8 /**
9  * Command implementation which only knows about a single view.
10  */

11 class CommandSingleView extends CommandBase
12 {
13     /**
14      */

15     protected View singleView;
16
17     /**
18      */

19     public CommandSingleView(Controller ctl, View v)
20     {
21         super(ctl);
22
23         if (v == null)
24             throw new IllegalStateException JavaDoc("Cannot define a CommandSingleView without a view!");
25
26         this.singleView = v;
27     }
28
29     /**
30      */

31     protected View getView(String JavaDoc viewName)
32     {
33         return this.singleView;
34     }
35 }
Popular Tags