01: package org.apache.ojb.tools.mapping.reversedb2;
02:
03: /* Copyright 2002-2005 The Apache Software Foundation
04: *
05: * Licensed under the Apache License, Version 2.0 (the "License");
06: * you may not use this file except in compliance with the License.
07: * You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: /**
19: * This interface is intended to be implemented by objects that are part
20: * of a GUI and that whish to present a context menu.
21: *
22: * @author <a href="mailto:bfl@florianbruckner.com">Florian Bruckner</a>
23: * @version $Id: ActionTarget.java,v 1.1.2.1 2005/12/21 22:32:04 tomdz Exp $
24: */
25: public interface ActionTarget {
26: /**
27: * Get a bunch of java.util.Action objects that this object wants to
28: * offer in a context-menu.
29: * @return an Iterator containing all the actions.
30: */
31: public java.util.Iterator getActions();
32:
33: /**
34: * Some objects may alter the list of actions they present depending
35: * on the state they are in. If this method returns true, the list of
36: * actions can be cached (i.e. the resulting GUI object can be cached
37: * and doesn't have to be regenerated all the time)
38: *
39: * @return true if the result of getActions() may be cached.
40: */
41: public boolean actionListCachable();
42:
43: /**
44: * Some objects may return a list of actions depending on the state they
45: * are in or the way they have been created. Others always return the
46: * same list of actions without any dependency on the state. If this
47: * is the case, this method should return true. Other objects may
48: * cache the list of actions and the depending GUI objects on a per-class
49: * basis instead of a per-object basis. If this method returns true,
50: * actionListCacheable has to return true as well, otherwise it would
51: * not make any sense to cache the information here.
52: */
53: public boolean actionListStatic();
54: }
|