com.levigo.jadice.appbase.commands
Class AddOnContextWindowAdapter
java.lang.Object
java.awt.event.WindowAdapter
com.levigo.jadice.appbase.commands.AddOnContextWindowAdapter
- All Implemented Interfaces:
- WindowFocusListener, WindowListener, WindowStateListener, EventListener
public class AddOnContextWindowAdapter
- extends WindowAdapter
This class ensures a correct context update and command state for window
embedded AddOns.
Constructor Summary |
AddOnContextWindowAdapter(Context context)
Creates a window adapter which should be attached to addon windows, if its
visibility or active state is controlled by a command. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AddOnContextWindowAdapter
public AddOnContextWindowAdapter(Context context)
- Creates a window adapter which should be attached to addon windows, if its
visibility or active state is controlled by a command. It initiates a
context update whenever the associated window is closed which causes a
command state update. To avoid memory leak problems the given context
reference is hold weakly. If the context reference is cleared by program or
garbage collector this adapter removes itself as window listener.
- Parameters:
context
- the context to be updated, when addon window is closed
getContext
public Context getContext()
- Returns the associated context reference. To avoid memory leak problems the
given context reference is hold weakly. If the context reference is cleared
by program or garbage collector this method will return
null
.
- Returns:
- Context or
null
if the context object has been garbage
collected.
windowClosed
public void windowClosed(WindowEvent e)
- Specified by:
windowClosed
in interface WindowListener
- Overrides:
windowClosed
in class WindowAdapter
- See Also:
WindowAdapter.windowClosed(java.awt.event.WindowEvent)
Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.