public class AWTWindowClosingProtocol extends Object implements WindowClosingProtocol
WindowClosingProtocol.WindowClosingMode| Constructor and Description |
|---|
AWTWindowClosingProtocol(Component comp,
Runnable closingOperation) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addClosingListenerOneShot()
Adds this closing listener to the components Window if exist and only one time.
Hence you may call this method every time to ensure it has been set, ie in case the Window parent is not available yet. |
WindowClosingProtocol.WindowClosingMode |
getDefaultCloseOperation() |
boolean |
removeClosingListener() |
WindowClosingProtocol.WindowClosingMode |
setDefaultCloseOperation(WindowClosingProtocol.WindowClosingMode op) |
public final boolean addClosingListenerOneShot()
public final boolean removeClosingListener()
public final WindowClosingProtocol.WindowClosingMode getDefaultCloseOperation()
getDefaultCloseOperation in interface WindowClosingProtocolsetDefaultCloseOperation(int),
otherwise return the AWT/Swing close operation value translated to
a WindowClosingProtocol value .WindowClosingProtocol.WindowClosingMode.DISPOSE_ON_CLOSE,
WindowClosingProtocol.WindowClosingMode.DO_NOTHING_ON_CLOSEpublic final WindowClosingProtocol.WindowClosingMode setDefaultCloseOperation(WindowClosingProtocol.WindowClosingMode op)
setDefaultCloseOperation in interface WindowClosingProtocolop - the new close operation valueWindowClosingProtocol.WindowClosingMode.DISPOSE_ON_CLOSE,
WindowClosingProtocol.WindowClosingMode.DO_NOTHING_ON_CLOSECopyright 2010 JogAmp Community.