|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.doolin.gui.window.support.AbstractGUIWindow<B>
B - Type of the window datapublic abstract class AbstractGUIWindow<B>
Utility ancestor for application windows.
| Constructor Summary | |
|---|---|
AbstractGUIWindow()
|
|
| Method Summary | ||
|---|---|---|
void |
addGUIWindowListener(GUIWindowListener<B> listener)
Adds a listener for the window |
|
void |
addView(GUIView<?> view)
Registers a new view in this window |
|
protected abstract void |
build()
Builds the window. |
|
void |
build(GUIApplication application,
GUIWindowDescriptor<B> windowDescriptor,
B model)
Builds and initializes the window. |
|
boolean |
canClose()
Tries to close all views |
|
void |
close()
Notifies the window descriptor. |
|
ActionContext |
getActionContext()
Gets the action context for this window |
|
GUIApplication |
getApplication()
Gets the application. |
|
String |
getId()
Gets the ID for this window |
|
Collection<? extends GUIView<?>> |
getOpenViews()
List of open views |
|
Object |
getProperty(Object key)
Retrieves a property from this view |
|
|
getView(String viewId)
Gets an already opened view |
|
B |
getWindowData()
Gets the model. |
|
GUIWindowDescriptor<B> |
getWindowDescriptor()
Gets the window descriptor. |
|
protected List<GUIWindowListener<B>> |
getWindowListeners()
Gets the list of window listeners, those of the descriptor plus the ones associated with this window. |
|
boolean |
isClosed()
Checks if the window is closed |
|
void |
onPostCreate()
Does nothing |
|
void |
removeView(GUIView<?> view)
Hides a view |
|
void |
setProperty(Object key,
Object value)
Attaches a property to the view. |
|
void |
showView(GUIView<?> view)
Activates a view |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.doolin.gui.window.GUIWindow |
|---|
display, getWindowPanel, installMenuBar, installToolBar, setWindowIcon, setWindowTitle, uninstallMenuBar, uninstallToolBar |
| Constructor Detail |
|---|
public AbstractGUIWindow()
| Method Detail |
|---|
public void addGUIWindowListener(GUIWindowListener<B> listener)
GUIWindow
addGUIWindowListener in interface GUIWindow<B>listener - Window listenerpublic void addView(GUIView<?> view)
GUIWindow
addView in interface GUIWindow<B>view - View to registerprotected abstract void build()
getApplication(),
getWindowData()
public void build(GUIApplication application,
GUIWindowDescriptor<B> windowDescriptor,
B model)
build in interface GUIWindow<B>application - the applicationwindowDescriptor - the window descriptormodel - the modelpublic boolean canClose()
canClose in interface GUIWindow<B>true if the window can be closedpublic void close()
close in interface GUIWindow<B>public ActionContext getActionContext()
GUIWindow
getActionContext in interface GUIWindow<B>public GUIApplication getApplication()
getApplication in interface GUIWindow<B>public String getId()
getId in interface GUIWindow<B>public Collection<? extends GUIView<?>> getOpenViews()
GUIWindow
getOpenViews in interface GUIWindow<B>public Object getProperty(Object key)
getProperty in interface PropertyContainerkey - Property key
null if not definedpublic <V> GUIView<V> getView(String viewId)
GUIWindow
getView in interface GUIWindow<B>V - Type of data for the viewviewId - View ID
null.public B getWindowData()
getWindowData in interface GUIWindow<B>public GUIWindowDescriptor<B> getWindowDescriptor()
getWindowDescriptor in interface GUIWindow<B>protected List<GUIWindowListener<B>> getWindowListeners()
public void removeView(GUIView<?> view)
GUIWindow
removeView in interface GUIWindow<B>view - View to hidepublic boolean isClosed()
GUIWindow
isClosed in interface GUIWindow<B>true if the window is closedpublic void onPostCreate()
onPostCreate in interface GUIWindow<B>
public void setProperty(Object key,
Object value)
value is
null, the property will be removed from the view instead.
setProperty in interface PropertyContainerkey - Property keyvalue - Property valuepublic void showView(GUIView<?> view)
GUIWindow
showView in interface GUIWindow<B>view - View to activate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||