public abstract class WindowStateService
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
WindowStateService(Project project) |
| Modifier and Type | Method and Description |
|---|---|
java.awt.Rectangle |
getBounds(java.lang.String key)
Returns a bounds that corresponds to the specified key or
null
if a bounds does not exist or it is outside of visible area. |
abstract java.awt.Rectangle |
getBoundsFor(java.lang.Object object,
java.lang.String key)
Returns a bounds that corresponds to the given screen and the specified key or
null
if a bounds does not exist or it is outside of visible area. |
static WindowStateService |
getInstance() |
static WindowStateService |
getInstance(Project project) |
java.awt.Point |
getLocation(java.lang.String key)
Returns a location that corresponds to the specified key or
null
if a location does not exist or it is outside of visible area. |
abstract java.awt.Point |
getLocationFor(java.lang.Object object,
java.lang.String key)
Returns a location that corresponds to the given screen and the specified key or
null
if a location does not exist or it is outside of visible area. |
java.awt.Dimension |
getSize(java.lang.String key)
Returns a size that corresponds to the specified key or
null
if a size does not exist. |
abstract java.awt.Dimension |
getSizeFor(java.lang.Object object,
java.lang.String key)
Returns a size that corresponds to the given screen and the specified key or
null
if a size does not exist. |
WindowState |
getState(java.lang.String key,
java.awt.Window window)
Returns a window state by the specified key.
|
abstract WindowState |
getStateFor(Project project,
java.lang.String key,
java.awt.Window window)
Returns a window state by the given project and the specified key.
|
void |
putBounds(java.lang.String key,
java.awt.Rectangle bounds)
Stores the specified bounds that corresponds to the specified key.
|
abstract void |
putBoundsFor(java.lang.Object object,
java.lang.String key,
java.awt.Rectangle bounds)
Stores the specified bounds that corresponds to the given screen and the specified key.
|
void |
putLocation(java.lang.String key,
java.awt.Point location)
Stores the specified location that corresponds to the specified key.
|
abstract void |
putLocationFor(java.lang.Object object,
java.lang.String key,
java.awt.Point location)
Stores the specified location that corresponds to the given screen and the specified key.
|
void |
putSize(java.lang.String key,
java.awt.Dimension size)
Stores the specified size that corresponds to the specified key.
|
abstract void |
putSizeFor(java.lang.Object object,
java.lang.String key,
java.awt.Dimension size)
Stores the specified size that corresponds to the given screen and the specified key.
|
protected WindowStateService(Project project)
public static WindowStateService getInstance()
public static WindowStateService getInstance(Project project)
project - the project to use by the servicepublic final WindowState getState(java.lang.String key, java.awt.Window window)
key - an unique string keywindow - a window state which should be watched forpublic abstract WindowState getStateFor(Project project, java.lang.String key, java.awt.Window window)
project - an project that specifies a main screenkey - an unique string keywindow - a window state which should be watched forpublic final java.awt.Point getLocation(java.lang.String key)
null
if a location does not exist or it is outside of visible area.key - an unique string keypublic abstract java.awt.Point getLocationFor(java.lang.Object object,
java.lang.String key)
null
if a location does not exist or it is outside of visible area.
A screen can be specified by Project, Window, or GraphicsDevice.object - an object that specifies a screen to which a location belongskey - an unique string keypublic final void putLocation(java.lang.String key,
java.awt.Point location)
null the stored location will be removed.key - an unique string keypublic abstract void putLocationFor(java.lang.Object object,
java.lang.String key,
java.awt.Point location)
null the stored location will be removed.
A screen can be specified by Project, Window, or GraphicsDevice.
Do not use a screen which is calculated from the specified location.object - an object that specifies a screen to which a location belongskey - an unique string keypublic final java.awt.Dimension getSize(java.lang.String key)
null
if a size does not exist.key - an unique string keypublic abstract java.awt.Dimension getSizeFor(java.lang.Object object,
java.lang.String key)
null
if a size does not exist.
A screen can be specified by Project, Window, or GraphicsDevice.object - an object that specifies a screen to which a size belongskey - an unique string keypublic final void putSize(java.lang.String key,
java.awt.Dimension size)
null the stored size will be removed.key - an unique string keypublic abstract void putSizeFor(java.lang.Object object,
java.lang.String key,
java.awt.Dimension size)
null the stored size will be removed.
A screen can be specified by Project, Window, or GraphicsDevice.
Do not use a screen which is calculated from the specified size.object - an object that specifies a screen to which a size belongskey - an unique string keypublic final java.awt.Rectangle getBounds(java.lang.String key)
null
if a bounds does not exist or it is outside of visible area.key - an unique string keypublic abstract java.awt.Rectangle getBoundsFor(java.lang.Object object,
java.lang.String key)
null
if a bounds does not exist or it is outside of visible area.
A screen can be specified by Project, Window, or GraphicsDevice.object - an object that specifies a screen to which a bounds belongskey - an unique string keypublic final void putBounds(java.lang.String key,
java.awt.Rectangle bounds)
null the stored bounds will be removed.key - an unique string keypublic abstract void putBoundsFor(java.lang.Object object,
java.lang.String key,
java.awt.Rectangle bounds)
null the stored bounds will be removed.
A screen can be specified by Project, Window, or GraphicsDevice.
Do not use a screen which is calculated from the specified bounds.object - an object that specifies a screen to which a bounds belongskey - an unique string key