public class MaximizationFixWindowListener extends WindowAdapter
| Modifier and Type | Field and Description |
|---|---|
protected Rectangle |
m_CurrentBounds
the current size/location.
|
protected boolean |
m_Enabled
whether enabled or not.
|
protected boolean |
m_IgnoreStateChangeEvent
whether to ignored the state change event.
|
protected boolean |
m_Logging
whether to output some logging information.
|
protected Frame |
m_Owner
the owning window.
|
protected Rectangle |
m_UnMaximizedBounds
the unmaximized size/location.
|
protected int |
m_Wait
the wait period in msec.
|
| Constructor and Description |
|---|
MaximizationFixWindowListener(Frame owner,
boolean enabled,
int wait)
Initializes the listener.
|
MaximizationFixWindowListener(Frame owner,
boolean enabled,
int wait,
boolean logging)
Initializes the listener.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getIgnoreStateChangeEvent()
Returns whether change events are currently ignored.
|
Frame |
getOwner()
Returns the owner.
|
int |
getWait()
Returns the wait period in msec.
|
boolean |
isEnabled()
Returns whether the listener is enabled.
|
boolean |
isLoggingEnabled()
Returns whether logging is enabled.
|
protected void |
log(String msg)
Logs the message to stdout.
|
void |
updateBounds(int x,
int y,
int width,
int height)
Updates the current bounds.
|
void |
updateBounds(Rectangle bounds)
Updates the current bounds.
|
void |
windowStateChanged(WindowEvent e) |
windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowGainedFocus, windowIconified, windowLostFocus, windowOpenedprotected Frame m_Owner
protected boolean m_Enabled
protected int m_Wait
protected boolean m_Logging
protected Rectangle m_CurrentBounds
protected Rectangle m_UnMaximizedBounds
protected boolean m_IgnoreStateChangeEvent
public MaximizationFixWindowListener(Frame owner, boolean enabled, int wait)
owner - the owning frameenabled - whether enabledwait - the wait period in msecpublic MaximizationFixWindowListener(Frame owner, boolean enabled, int wait, boolean logging)
owner - the owning frameenabled - whether enabledwait - the wait period in mseclogging - whether to output logging informationpublic Frame getOwner()
public boolean isEnabled()
public int getWait()
public boolean isLoggingEnabled()
public boolean getIgnoreStateChangeEvent()
protected void log(String msg)
msg - the message to logpublic void updateBounds(int x,
int y,
int width,
int height)
x - the x of the ownery - the y of the ownerwidth - the width of the ownerheight - the height of the ownerpublic void updateBounds(Rectangle bounds)
bounds - the current bounds of the ownerpublic void windowStateChanged(WindowEvent e)
windowStateChanged in interface WindowStateListenerwindowStateChanged in class WindowAdapterCopyright © 2017. All Rights Reserved.