01: /*
02: * Copyright (c) 2000, Jacob Smullyan.
03: *
04: * This is part of SkunkDAV, a WebDAV client. See http://skunkdav.sourceforge.net/
05: * for the latest version.
06: *
07: * SkunkDAV is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License as published
09: * by the Free Software Foundation; either version 2, or (at your option)
10: * any later version.
11: *
12: * SkunkDAV is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public License
18: * along with SkunkDAV; see the file COPYING. If not, write to the Free
19: * Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20: * 02111-1307, USA.
21: */
22:
23: package org.skunk.dav.client.gui;
24:
25: import java.util.Iterator;
26: import org.skunk.config.Configurator;
27:
28: /**
29: * an abstraction layer for application-level objects
30: *
31: * @author Jacob Smullyan
32: */
33:
34: public interface AppContext {
35: /**
36: * adds a view
37: */
38: void addView(View view);
39:
40: /**
41: * removes a view
42: * Precondition: appContext contains this view
43: */
44: void removeView(View view);
45:
46: /**
47: * @return an iterator of all Views in the AppContext
48: */
49: Iterator views();
50:
51: /**
52: * @return the number of current views
53: */
54: int getViewCount();
55:
56: /**
57: * @return the view at the given index
58: */
59: View getView(int index);
60:
61: /**
62: * @return the currently active (focussed) view
63: */
64: View getCurrentView();
65:
66: /**
67: * @return the dock mode (interface style)
68: */
69: DockMode getDockMode();
70:
71: /**
72: * @return the configurator object for the application
73: */
74: Configurator getConfigurator();
75:
76: /**
77: * @return whether or not the application is trusted to access the filesystem,
78: * open sockets to multiple hosts, etc.
79: */
80: boolean isTrusted(); //a more fine-grained indicator would be ... fancier.
81: }
82:
83: /* $Log: AppContext.java,v $
84: /* Revision 1.6 2000/12/19 22:06:15 smulloni
85: /* adding documentation.
86: /* */
|