org.progeeks.util
Interface MultiFocusedContext
- All Superinterfaces:
- FocusedContext, StandardBean, ViewContext
- All Known Implementing Classes:
- DefaultMultiFocusedContext
public interface MultiFocusedContext
- extends FocusedContext
Context specialization denoting a view context that holds
a set of focused or targeted objects. Useful for generally abstracting
view-models that contain a selection.
A MultiFocusedContext isalso a FocusedContext but the
mapping from single focus to multiple focus may be different for various
implementations. The intent is that the two should interoperate such that
actions can work on the context if they expect FocusedContext but are given
a MultiFocusedContext with only one item. This may mean that a MultiFocusedContext
returns null from the getFocus() method when there are multiple items or it
could also mean the it returns the list of focused values.
Implementations that use an ObservableList for their focused objects
should also make sure to forward list change events to the context for
delivery to context listeners. Other objects will be listening to the
PROP_FOCUSED_OBJECTS property and not directly to their lists.
- Version:
- $Revision: 1.1 $
- Author:
- Paul Speed
Method Summary |
java.util.List |
getFocusedObjects()
Returns the list of objects that are the current focus of this
context. |
void |
setFocusedObjects(java.util.List focusedObjects)
Sets the specified list as the current focused object list
for this context. |
PROP_FOCUSED_OBJECTS
static final java.lang.String PROP_FOCUSED_OBJECTS
- See Also:
- Constant Field Values
setFocusedObjects
void setFocusedObjects(java.util.List focusedObjects)
- Sets the specified list as the current focused object list
for this context. Most implementations will clear and replace
the items in their own internal data structures.
getFocusedObjects
java.util.List getFocusedObjects()
- Returns the list of objects that are the current focus of this
context. This is almost always an ObservableList but need not
be.
Copyright © 2002-2003 Paul Speed. All Rights Reserved.