public class AWTWindowClosingProtocol extends Object implements WindowClosingProtocol
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE
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. |
int |
getDefaultCloseOperation() |
boolean |
removeClosingListener() |
int |
setDefaultCloseOperation(int op) |
public final boolean addClosingListenerOneShot()
public final boolean removeClosingListener()
public final int getDefaultCloseOperation()
getDefaultCloseOperation
in interface WindowClosingProtocol
setDefaultCloseOperation(int)
,
otherwise return the AWT/Swing close operation value translated to
a WindowClosingProtocol
value .WindowClosingProtocol.DISPOSE_ON_CLOSE
,
WindowClosingProtocol.DO_NOTHING_ON_CLOSE
public final int setDefaultCloseOperation(int op)
setDefaultCloseOperation
in interface WindowClosingProtocol
op
- the new close operation valueWindowClosingProtocol.DISPOSE_ON_CLOSE
,
WindowClosingProtocol.DO_NOTHING_ON_CLOSE
Copyright 2010 JogAmp Community.