qflib 0.98.1

de.qfs.lib.config
Class FrameConfigWrapper

java.lang.Object
  |
  +--de.qfs.lib.config.ConfigWrapper
        |
        +--de.qfs.lib.config.FrameConfigWrapper
All Implemented Interfaces:
java.awt.event.ComponentListener, Configurable, java.util.EventListener
Direct Known Subclasses:
JFrameConfigWrapper

public class FrameConfigWrapper
extends ConfigWrapper
implements java.awt.event.ComponentListener

A ConfigWrapper for Frame objects. The state saved is the frame's location and size.

Version:
$Revision: 1.11 $
Author:
Gregor Schmid

Field Summary
protected  java.awt.Frame frame
          The wrapped Frame.
 
Constructor Summary
FrameConfigWrapper()
          Create a new FrameConfigWrapper with the default name "frame".
 
Method Summary
 void componentHidden(java.awt.event.ComponentEvent e)
          Ignored.
 void componentMoved(java.awt.event.ComponentEvent e)
          Notify the Configuration that the state has changed.
 void componentResized(java.awt.event.ComponentEvent e)
          Notify the Configuration that the state has changed.
 void componentShown(java.awt.event.ComponentEvent e)
          Ignored.
 java.util.Properties getConfigurableState()
          Get the Configurable's state.
 void registrationChanged(Configuration config, java.lang.String name, boolean registered, boolean valuesKept)
          This callback is used to notify the Configurable whenever it is registered with or unregistered from the Configuration, so it can decide whether to notify the Configuration when its state changes.
protected  void restore(java.awt.Dimension size, java.awt.Point location)
          Restore the frame's size and location.
protected  void setClient(java.lang.Object client)
          Set the client object for the ConfigWrapper.
 void setConfigurableState(java.util.Properties state)
          Set the Configurable's state.
 
Methods inherited from class de.qfs.lib.config.ConfigWrapper
addPackage, getConfigurableName, makeWrapper, makeWrapper, setConfigurableName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

frame

protected java.awt.Frame frame
The wrapped Frame.
Constructor Detail

FrameConfigWrapper

public FrameConfigWrapper()
Create a new FrameConfigWrapper with the default name "frame".
Method Detail

setClient

protected void setClient(java.lang.Object client)
Set the client object for the ConfigWrapper.
Overrides:
setClient in class ConfigWrapper
Parameters:
client - The client object to set.

getConfigurableState

public java.util.Properties getConfigurableState()
Get the Configurable's state.
Overrides:
getConfigurableState in class ConfigWrapper
Following copied from class: de.qfs.lib.config.ConfigWrapper
Returns:
An empty Properties object.

setConfigurableState

public void setConfigurableState(java.util.Properties state)
Set the Configurable's state.
Overrides:
setConfigurableState in class ConfigWrapper
Following copied from class: de.qfs.lib.config.ConfigWrapper
Parameters:
state - The state to set. Ignored.

registrationChanged

public void registrationChanged(Configuration config,
                                java.lang.String name,
                                boolean registered,
                                boolean valuesKept)
This callback is used to notify the Configurable whenever it is registered with or unregistered from the Configuration, so it can decide whether to notify the Configuration when its state changes.
Overrides:
registrationChanged in class ConfigWrapper
Parameters:
config - The affected Configuration.
name - The registration name of the Configurable which may be different from the Configurable's name.
registered - True if the Configurable was just registered, false if it was unregistered.
valuesKept - Whether the Configurable's values were kept, if it was just unregistered.

componentMoved

public void componentMoved(java.awt.event.ComponentEvent e)
Notify the Configuration that the state has changed.
Specified by:
componentMoved in interface java.awt.event.ComponentListener
Parameters:
e - Ignored.

componentResized

public void componentResized(java.awt.event.ComponentEvent e)
Notify the Configuration that the state has changed.
Specified by:
componentResized in interface java.awt.event.ComponentListener
Parameters:
e - Ignored.

componentHidden

public void componentHidden(java.awt.event.ComponentEvent e)
Ignored.
Specified by:
componentHidden in interface java.awt.event.ComponentListener
Parameters:
e - Ignored.

componentShown

public void componentShown(java.awt.event.ComponentEvent e)
Ignored.
Specified by:
componentShown in interface java.awt.event.ComponentListener
Parameters:
e - Ignored.

restore

protected void restore(java.awt.Dimension size,
                       java.awt.Point location)
Restore the frame's size and location.
Parameters:
size - The size to set.
location - The location to set.

qflib 0.98.1