public interface Viewable extends Iterable<Component>
The GNU General Public License for details.
Modifier and Type | Method and Description |
---|---|
void |
addView(Component component)
Add a view to the set.
|
void |
addViewEventListener(ViewEventListener listener)
Adds a view event listener for notification of any changes to the view.
|
void |
closeAll()
Close all the views.
|
void |
closeOthers(Component component)
Close all the views but the one provided.
|
Component |
getSelected()
Returns the top view.
|
Component |
getView(int i)
Get the view by position.
|
int |
getViewCount()
The number of views held by this layout.
|
Collection<Component> |
getViews()
Get a snapshot of the views as a collection.
|
void |
moveTo(AbstractViewLayout other)
Copies all the views from the one layout to the other
|
void |
removeView(Component component)
Remove a view from the set.
|
void |
removeViewEventListener(ViewEventListener listener)
Removes a view event listener.
|
void |
select(Component component)
Find the view and select it.
|
void |
updateTitle(Component component)
Update the title of the view.
|
void |
visit(ViewVisitor visitor)
Visit every view in the order that they were added.
|
void addView(Component component)
void removeView(Component component)
Collection<Component> getViews()
void moveTo(AbstractViewLayout other)
other
- the other layoutvoid closeAll()
void closeOthers(Component component)
component
- the view that is to remain open.void visit(ViewVisitor visitor)
visitor
- The visitor for the viewvoid updateTitle(Component component)
component
- the component whose title is to be usedComponent getSelected()
void select(Component component)
component
- int getViewCount()
Component getView(int i)
i
- the index of the viewvoid addViewEventListener(ViewEventListener listener)
listener
- the listenervoid removeViewEventListener(ViewEventListener listener)
listener
- the listener