|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container java.awt.Window java.awt.Frame javax.swing.JFrame com.levigo.util.swing.AbstractGeometryFrame com.levigo.util.swing.AbstractPropertyGeometryFrame
public abstract class AbstractPropertyGeometryFrame
This class is an enhanced version of its super class
AbstractGeometryFrame
. It provides fully implemented services to
read, save and restore its location, size and frame state from/into a preset properties
preference store. To enable the frame geometry functionality a properties preference store has to
be defined preferably before any frame will be created. Use therefore the
AbstractGeometryFrame.setPreferenceStore(PreferenceStore)
method.
This should be done just once by the integrator preferably at startup time. If no properties
store is set, instances of this class behaves like a normal JFrame.
Furthermore developers might use this class to define a unique window icon and to install common UI settings.
This class provides just the re-/storing of frame geometries in/of a given properties preference store. The physically saving process, eg. into a file or database or into whatever, have to be triggered by the integrator, may be at application shutdown or whenever a frame will be closed.
PropertiesPreferenceStore
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JFrame |
---|
JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
---|
Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
---|
Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class com.levigo.util.swing.AbstractGeometryFrame |
---|
WINDOW_ICON |
Fields inherited from class javax.swing.JFrame |
---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
AbstractPropertyGeometryFrame()
Constructor for AbstractPropertyGeometryFrame. |
|
AbstractPropertyGeometryFrame(String title)
Constructor for AbstractPropertyGeometryFrame. |
Method Summary | |
---|---|
void |
addNotify()
|
static boolean |
isAdjustGeometryEnabled()
Returns whether adjusting of frames geometry into current graphics environment is enabled This behavior is only supported if the restoring of frame geometry is enabled. |
boolean |
isGeometryRestored()
Returns whether frames geometry could be restored from given properties preferences. |
static boolean |
isRestoreGeometryEnabled()
Returns whether re-/storing of frames geometry is enabled |
void |
removeNotify()
|
void |
restoreGeometry()
Restore the frame geometry (size, location) from the preferences, if enabled and an approbate properties preference store is set. |
void |
saveGeometry()
Save the frame geometry into the properties preference store. |
static void |
setAdjustGeometryEnabled(boolean doAdjustGeometry)
Sets whether adjusting of frames geometry into current graphics environment is enabled |
static void |
setRestoreGeometryEnabled(boolean doRestoreGeometry)
Sets whether re-/storing of frames geometry is enabled. |
void |
show()
Deprecated. |
Methods inherited from class com.levigo.util.swing.AbstractGeometryFrame |
---|
getActiveFrame, getActiveFrames, getActiveFrames, getActiveFramesinZOrder, getAuxiliaryWindowIcon, getDefaultLocation, getDefaultSize, getFrameID, getFrameType, getPreferenceStore, getRecentlyFocusedFrame, getWindowIcon, hide, isExistingFrameAt, processWindowEvent, putAuxiliaryWindowIcon, setPreferenceStore, setRecentlyFocusedFrame, setWindowIcon |
Methods inherited from class java.awt.Frame |
---|
getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Constructor Detail |
---|
public AbstractPropertyGeometryFrame(String title)
title
- The title of the framepublic AbstractPropertyGeometryFrame()
Method Detail |
---|
public void saveGeometry()
Hint: If the geometry re-storing ability is disabled or no preference store is set, this method does nothing.
saveGeometry
in class AbstractGeometryFrame
AbstractGeometryFrame.setPreferenceStore(PreferenceStore)
,
isRestoreGeometryEnabled()
,
setRestoreGeometryEnabled(boolean)
public void restoreGeometry()
restoreGeometry
in class AbstractGeometryFrame
public void addNotify()
addNotify
in class Frame
Frame.addNotify()
public void removeNotify()
removeNotify
in class Frame
Frame.removeNotify()
@Deprecated public void show()
show
in class AbstractGeometryFrame
AbstractGeometryFrame.show()
public boolean isGeometryRestored()
public static boolean isRestoreGeometryEnabled()
public static void setRestoreGeometryEnabled(boolean doRestoreGeometry)
doRestoreGeometry
- public static boolean isAdjustGeometryEnabled()
public static void setAdjustGeometryEnabled(boolean doAdjustGeometry)
doAdjustGeometry
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |