public class DefaultSwingWindowManager extends AbstractWindowManager<Window> implements SwingWindowManager
ERROR_NAME_BLANK, ERROR_WINDOW_NULL
Constructor and Description |
---|
DefaultSwingWindowManager(GriffonApplication application,
SwingWindowDisplayHandler windowDisplayHandler) |
Modifier and Type | Method and Description |
---|---|
void |
attach(String name,
JInternalFrame internalFrame)
Registers an internal frame on this manager if an only if the internal frame is not null
and it's not registered already.
|
void |
detach(String name)
Removes the internal frame from the list of manages internal frames if and only if it
is registered with this manager.
|
protected void |
doAttach(JInternalFrame internalFrame) |
protected void |
doAttach(Window window) |
protected void |
doDetach(JInternalFrame internalFrame) |
protected void |
doDetach(Window window) |
JInternalFrame |
findInternalFrame(String name)
Finds a JInternalFrame by name.
|
Collection<JInternalFrame> |
getInternalFrames()
Returns the list of internal frames managed by this manager.
|
void |
hide(JInternalFrame internalFrame)
Hides the internal frame.
|
boolean |
isHideBeforeHandler()
Should the window be hidden before all ShutdownHandlers be called ?
|
protected boolean |
isWindowVisible(Window window) |
protected SwingWindowDisplayHandler |
resolveSwingWindowDisplayHandler() |
void |
setHideBeforeHandler(boolean hideBeforeHandler)
Set if the window should be hidden before all ShutdownHandler be called.
|
void |
show(JInternalFrame internalFrame)
Shows the internal frame.
|
attach, canShutdown, countVisibleWindows, findWindow, getApplication, getAt, getStartingWindow, getWindows, hide, hide, isAutoShutdown, onShutdown, resolveStartingWindowFromConfiguration, resolveWindowDisplayHandler, show, show
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
attach, canShutdown, countVisibleWindows, findWindow, getAt, getStartingWindow, getWindows, hide, hide, isAutoShutdown, onShutdown, show, show
@Inject @Nonnull public DefaultSwingWindowManager(@Nonnull GriffonApplication application, @Nonnull @Named(value="windowDisplayHandler") SwingWindowDisplayHandler windowDisplayHandler)
public JInternalFrame findInternalFrame(String name)
name
- the value of the name: propertypublic Collection<JInternalFrame> getInternalFrames()
public void attach(@Nonnull String name, @Nonnull JInternalFrame internalFrame)
name
- the value of the of the Window's nameinternalFrame
- the internal frame to be added to the list of managed internal framesprotected void doAttach(@Nonnull JInternalFrame internalFrame)
public void detach(@Nonnull String name)
detach
in interface WindowManager<Window>
detach
in class AbstractWindowManager<Window>
name
- the value of the of the Window's nameprotected void doDetach(@Nonnull JInternalFrame internalFrame)
public void show(@Nonnull JInternalFrame internalFrame)
This method is executed SYNCHRONOUSLY in the UI thread.
internalFrame
- the internal frame to showpublic void hide(@Nonnull JInternalFrame internalFrame)
This method is executed SYNCHRONOUSLY in the UI thread.
internalFrame
- the internal frame to hidepublic boolean isHideBeforeHandler()
public void setHideBeforeHandler(boolean hideBeforeHandler)
hideBeforeHandler
- new value@Nonnull protected SwingWindowDisplayHandler resolveSwingWindowDisplayHandler()
protected void doAttach(@Nonnull Window window)
doAttach
in class AbstractWindowManager<Window>
protected void doDetach(@Nonnull Window window)
doDetach
in class AbstractWindowManager<Window>
protected boolean isWindowVisible(@Nonnull Window window)
isWindowVisible
in class AbstractWindowManager<Window>