|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jface.window.Window dsto.dfc.swt.controls.NiceWindow
public class NiceWindow
Base class for "nice" windows that remember their last location and/or size.
Subclasses can set "sizeProperty" and/or "locationProperty" to be the name
of the properties used to store size and location (null means no save).
Subclasses may also override savePreferences()
to store other
persistent window properties.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window |
---|
org.eclipse.jface.window.Window.IExceptionHandler |
Field Summary | |
---|---|
protected static DataBean |
GLOBAL_PREFERENCES
The global preferences store used by all windows that don't have an explicit preferences set. |
protected String |
locationProperty
The name of the property in the preferences that stores the window size (null = no save). |
protected IDataBean |
preferences
The window's preferences store. |
protected String |
sizeProperty
The name of the property in the preferences that stores the window location (null = no save). |
Fields inherited from class org.eclipse.jface.window.Window |
---|
CANCEL, OK |
Constructor Summary | |
---|---|
NiceWindow(org.eclipse.swt.widgets.Shell parentShell)
|
|
NiceWindow(org.eclipse.swt.widgets.Shell parentShell,
IDataBean preferences)
|
Method Summary | |
---|---|
boolean |
close()
|
protected org.eclipse.swt.graphics.Point |
getDefaultLocation(org.eclipse.swt.graphics.Point initialSize)
|
protected org.eclipse.swt.graphics.Point |
getInitialLocation(org.eclipse.swt.graphics.Point initialSize)
|
protected org.eclipse.swt.graphics.Point |
getInitialSize()
|
protected void |
initializeBounds()
Override superclass version since it "optimizes" the initial position/size logic away after first call. |
protected void |
savePreferences()
Save the window preferences. |
Methods inherited from class org.eclipse.jface.window.Window |
---|
canHandleShellCloseEvent, configureShell, constrainShellSize, create, createContents, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final DataBean GLOBAL_PREFERENCES
protected IDataBean preferences
protected String sizeProperty
protected String locationProperty
Constructor Detail |
---|
public NiceWindow(org.eclipse.swt.widgets.Shell parentShell)
public NiceWindow(org.eclipse.swt.widgets.Shell parentShell, IDataBean preferences)
Method Detail |
---|
protected org.eclipse.swt.graphics.Point getInitialSize()
getInitialSize
in class org.eclipse.jface.window.Window
protected org.eclipse.swt.graphics.Point getInitialLocation(org.eclipse.swt.graphics.Point initialSize)
getInitialLocation
in class org.eclipse.jface.window.Window
protected org.eclipse.swt.graphics.Point getDefaultLocation(org.eclipse.swt.graphics.Point initialSize)
public boolean close()
close
in class org.eclipse.jface.window.Window
protected void initializeBounds()
initializeBounds
in class org.eclipse.jface.window.Window
protected void savePreferences()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |