|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.lucidviews.util.gui.swing.WindowUtils
public class WindowUtils
Utilities for setting window properties.
Field Summary | |
---|---|
private Properties |
_appnProperties
The properties for the window. |
private String |
_appnPropertyPrefix
The prefix for all property names (should include the name of the application). |
private JFrame |
_targetWindow
A reference to the window that the properties are applicable to. |
private static String |
WINDOW_HEIGHT_PROPERTY_NAME
Suffix for window height property name. |
private static String |
WINDOW_WIDTH_PROPERTY_NAME
Suffix for window width property name. |
private static String |
WINDOW_XPOS_PROPERTY_NAME
Suffix for window x-position property name. |
private static String |
WINDOW_YPOS_PROPERTY_NAME
Suffix for window y-position property name. |
Constructor Summary | |
---|---|
WindowUtils(JFrame target)
Create a utility suite for a given application window. |
|
WindowUtils(JFrame target,
Properties properties,
String propertyPrefix)
Create a utility suite for a given application window. |
|
WindowUtils(JFrame target,
String propertiesFileRef,
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(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(WindowEvent e)
|
void |
windowClosed(WindowEvent e)
|
void |
windowClosing(WindowEvent e)
|
void |
windowDeactivated(WindowEvent e)
|
void |
windowDeiconified(WindowEvent e)
|
void |
windowIconified(WindowEvent e)
|
void |
windowOpened(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 String WINDOW_WIDTH_PROPERTY_NAME
private static final String WINDOW_HEIGHT_PROPERTY_NAME
private static final String WINDOW_XPOS_PROPERTY_NAME
private static final String WINDOW_YPOS_PROPERTY_NAME
private JFrame _targetWindow
private Properties _appnProperties
private String _appnPropertyPrefix
Constructor Detail |
---|
public WindowUtils(JFrame target)
target
- the window to be controlledpublic WindowUtils(JFrame target, Properties properties, 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 propertiespublic WindowUtils(JFrame target, String propertiesFileRef, String propertyPrefix) throws FileNotFoundException, 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
FileNotFoundException
- the file location specified by propertiesFileRef does not exist
IOException
- the file at the specified location could not be readMethod Detail |
---|
private void storeWindowSize0() throws IOException
IOException
private void storeWindowLocation0() throws IOException
IOException
public void setIcon(String iconImageURL)
setVisible
.
iconImageURL
- the URL to the image filepublic void setWindowSize()
public void setWindowLocation()
public void storeWindowSize() throws IOException
IOException
- error writing the size properties to the properties filepublic void storeWindowLocation() throws IOException
IOException
- error writing the location properties to the properties filepublic void storeWindowProperties() throws IOException
IOException
- error writing the window properties to the properties filepublic void autoStoreWindowProperties()
public void windowOpened(WindowEvent e)
windowOpened
in interface WindowListener
public void windowClosing(WindowEvent e)
windowClosing
in interface WindowListener
public void windowClosed(WindowEvent e)
windowClosed
in interface WindowListener
public void windowIconified(WindowEvent e)
windowIconified
in interface WindowListener
public void windowDeiconified(WindowEvent e)
windowDeiconified
in interface WindowListener
public void windowActivated(WindowEvent e)
windowActivated
in interface WindowListener
public void windowDeactivated(WindowEvent e)
windowDeactivated
in interface WindowListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |