|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.lucidviews.util.gui.swing.WindowUtils
Utilities for setting window properties.
| Field Summary | |
private Properties |
_appnProperties
The properties for the window. |
private java.lang.String |
_appnPropertyPrefix
The prefix for all property names (should include the name of the application). |
private javax.swing.JFrame |
_targetWindow
A reference to the window that the properties are applicable to. |
private static java.lang.String |
WINDOW_HEIGHT_PROPERTY_NAME
Suffix for window height property name. |
private static java.lang.String |
WINDOW_WIDTH_PROPERTY_NAME
Suffix for window width property name. |
private static java.lang.String |
WINDOW_XPOS_PROPERTY_NAME
Suffix for window x-position property name. |
private static java.lang.String |
WINDOW_YPOS_PROPERTY_NAME
Suffix for window y-position property name. |
| Constructor Summary | |
WindowUtils(javax.swing.JFrame target)
Create a utility suite for a given application window. |
|
WindowUtils(javax.swing.JFrame target,
Properties properties,
java.lang.String propertyPrefix)
Create a utility suite for a given application window. |
|
WindowUtils(javax.swing.JFrame target,
java.lang.String propertiesFileRef,
java.lang.String propertyPrefix)
Create a utility suite for a given application window. |
|
| Method Summary | |
void |
autoStoreWindowProperties()
Automatically store the properties of this window when the window is closed. |
void |
setIcon(java.lang.String iconImageURL)
Set the icon for this window. |
void |
setWindowLocation()
Set the position of the window. |
void |
setWindowSize()
Set the size of the window. |
void |
storeWindowLocation()
Store the position of the window. |
private void |
storeWindowLocation0()
|
void |
storeWindowProperties()
Store the size and position of the window. |
void |
storeWindowSize()
Store the size of the window. |
private void |
storeWindowSize0()
|
void |
windowActivated(java.awt.event.WindowEvent e)
|
void |
windowClosed(java.awt.event.WindowEvent e)
|
void |
windowClosing(java.awt.event.WindowEvent e)
|
void |
windowDeactivated(java.awt.event.WindowEvent e)
|
void |
windowDeiconified(java.awt.event.WindowEvent e)
|
void |
windowIconified(java.awt.event.WindowEvent e)
|
void |
windowOpened(java.awt.event.WindowEvent e)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.lang.String WINDOW_WIDTH_PROPERTY_NAME
private static final java.lang.String WINDOW_HEIGHT_PROPERTY_NAME
private static final java.lang.String WINDOW_XPOS_PROPERTY_NAME
private static final java.lang.String WINDOW_YPOS_PROPERTY_NAME
private javax.swing.JFrame _targetWindow
private Properties _appnProperties
private java.lang.String _appnPropertyPrefix
| Constructor Detail |
public WindowUtils(javax.swing.JFrame target)
target - the window to be controlled
public WindowUtils(javax.swing.JFrame target,
Properties properties,
java.lang.String propertyPrefix)
target - the window to be controlledproperties - data model containing the window's propertiespropertyPrefix - the prefix to the names of all the window's properties
public WindowUtils(javax.swing.JFrame target,
java.lang.String propertiesFileRef,
java.lang.String propertyPrefix)
throws java.io.FileNotFoundException,
java.io.IOException
target - the window to be controlledpropertiesFileRef - URL of a file that stores the window's propertiespropertyPrefix - the prefix to the names of all the window's properties
java.io.FileNotFoundException - the file location specified by propertiesFileRef does not exist
java.io.IOException - the file at the specified location could not be read| Method Detail |
private void storeWindowSize0()
throws java.io.IOException
java.io.IOException
private void storeWindowLocation0()
throws java.io.IOException
java.io.IOExceptionpublic void setIcon(java.lang.String iconImageURL)
setVisible.
iconImageURL - the URL to the image filepublic void setWindowSize()
public void setWindowLocation()
public void storeWindowSize()
throws java.io.IOException
java.io.IOException - error writing the size properties to the properties file
public void storeWindowLocation()
throws java.io.IOException
java.io.IOException - error writing the location properties to the properties file
public void storeWindowProperties()
throws java.io.IOException
java.io.IOException - error writing the window properties to the properties filepublic void autoStoreWindowProperties()
public void windowOpened(java.awt.event.WindowEvent e)
windowOpened in interface java.awt.event.WindowListenerpublic void windowClosing(java.awt.event.WindowEvent e)
windowClosing in interface java.awt.event.WindowListenerpublic void windowClosed(java.awt.event.WindowEvent e)
windowClosed in interface java.awt.event.WindowListenerpublic void windowIconified(java.awt.event.WindowEvent e)
windowIconified in interface java.awt.event.WindowListenerpublic void windowDeiconified(java.awt.event.WindowEvent e)
windowDeiconified in interface java.awt.event.WindowListenerpublic void windowActivated(java.awt.event.WindowEvent e)
windowActivated in interface java.awt.event.WindowListenerpublic void windowDeactivated(java.awt.event.WindowEvent e)
windowDeactivated in interface java.awt.event.WindowListener
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||