UI
Class GEVAContainerControl

java.lang.Object
  extended by UI.GEVAControl
      extended by UI.GEVAContainerControl
Direct Known Subclasses:
GEVABookContainer, GEVAPageContainer, GEVAPropertyContainer, GEVASpringContainer

public abstract class GEVAContainerControl
extends GEVAControl

Base control for all controls that are containers. Does administrative tasks, such as delegating calls to all contained children

Author:
eliottbartley

Nested Class Summary
protected static class GEVAContainerControl.Controls
           
 
Field Summary
protected  GEVAContainerControl.Controls controls
           
 
Fields inherited from class UI.GEVAControl
comment, dirtyListener, name, parent, title, type
 
Constructor Summary
GEVAContainerControl(GEVADirtyListener dirtyListener, GEVAContainerControl parent, java.lang.String type, java.lang.String title, java.lang.String comment)
           
 
Method Summary
 void add(GEVAControl control)
          Add an awt component to the awt component that is this container.
 java.lang.String getText()
          Get the value of teh control, using a text string
 boolean load(java.util.Properties properties)
          Delegate loading to all the controls this container contains
 boolean save(java.util.Properties properties)
          Delegate saving to all the controls this container contains
 void setEnabled(boolean enabled)
          Delegate enabling to all the controls this container contains.
 void setText(java.lang.String text)
          By default, containers don't have a setText (though Book container does, so it can change pages through setText)
 void setVisible(boolean show)
          Make this control visible
 void setVisibleControlGroup(java.lang.String name, boolean show)
          Make all the controls in the control group visible or hidden.
 void validate()
          Get all the contained controls to validate themselves
 
Methods inherited from class UI.GEVAControl
addActionListener, countComponents, fireActionEvent, getComment, getComponent, getComponent, getName, getParent, getTitle, getType, isType, removeActionListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

controls

protected GEVAContainerControl.Controls controls
Constructor Detail

GEVAContainerControl

public GEVAContainerControl(GEVADirtyListener dirtyListener,
                            GEVAContainerControl parent,
                            java.lang.String type,
                            java.lang.String title,
                            java.lang.String comment)
Method Detail

setEnabled

public void setEnabled(boolean enabled)
Delegate enabling to all the controls this container contains. Container controls typically won't be enabled/disabled, just the property control it contains. The user will still be able to navigate through the UI, just won't be able to modify and properties

Specified by:
setEnabled in class GEVAControl
Parameters:
enabled - true to enabled, false to disable

load

public boolean load(java.util.Properties properties)
Delegate loading to all the controls this container contains

Specified by:
load in class GEVAControl
Parameters:
properties - The properties of a loaded properties file

save

public boolean save(java.util.Properties properties)
Delegate saving to all the controls this container contains

Specified by:
save in class GEVAControl
Parameters:
properties - The properties of a loaded properties file

add

public void add(GEVAControl control)
Add an awt component to the awt component that is this container. This also adds a tool tip to the control based on the comment, currently (2008y05M26d) only adds this tooltip if the component is a swing component. This must be always called (inheriting classes that override must super.add())

Parameters:
control - The control to add

setVisibleControlGroup

public void setVisibleControlGroup(java.lang.String name,
                                   boolean show)
Description copied from class: GEVAControl
Make all the controls in the control group visible or hidden.

Specified by:
setVisibleControlGroup in class GEVAControl
Parameters:
name - The name of the control group, as set during the call to addControlGroup
show - Specify true to show the group, else false

setVisible

public void setVisible(boolean show)
Description copied from class: GEVAControl
Make this control visible

Specified by:
setVisible in class GEVAControl
Parameters:
show - Specify true to show this control, else false to hide

getText

public java.lang.String getText()
Description copied from class: GEVAControl
Get the value of teh control, using a text string

Specified by:
getText in class GEVAControl
Returns:
The value of the control in string format

setText

public void setText(java.lang.String text)
By default, containers don't have a setText (though Book container does, so it can change pages through setText)

Specified by:
setText in class GEVAControl
Parameters:
text -

validate

public void validate()
Get all the contained controls to validate themselves

Specified by:
validate in class GEVAControl