com.gridsystems.config.tools.console
Class GroupField

java.lang.Object
  extended by com.gridsystems.config.tools.console.Field
      extended by com.gridsystems.config.tools.console.GroupField
Direct Known Subclasses:
ConnectorGroupField

public class GroupField
extends Field

A Field that acts as a container for other fields.

Version:
1.0
Author:
Rodrigo Ruiz Aguayo

Field Summary
protected  java.util.List<Field> fields
          Collection of fields.
protected  java.lang.String title
          Group title.
 
Fields inherited from class com.gridsystems.config.tools.console.Field
bundle
 
Constructor Summary
GroupField(java.util.ResourceBundle bundle, java.lang.String title)
          Creates a new instance with an empty field list.
GroupField(java.util.ResourceBundle bundle, java.lang.String title, java.util.List<Field> fields)
          Creates a new instance with the specified list of fields.
 
Method Summary
 void addField(Field field)
          Adds another field to the list.
 void clearFields()
          Clears all fields in the list.
 java.util.List<ConsoleViewAction> getActionList()
          Gets the list of actions in this group.
 ConsoleViewAction[] getActions()
          Gets the list of actions in this group.
 java.lang.String[] getContents()
          Gets the contents of this field.
 java.util.List getFields()
          Gets the list of fields in this group.
 Field removeField(int pos)
          Removes the field at position pos from the list.
 
Methods inherited from class com.gridsystems.config.tools.console.Field
getString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

title

protected java.lang.String title
Group title.


fields

protected java.util.List<Field> fields
Collection of fields.

Constructor Detail

GroupField

public GroupField(java.util.ResourceBundle bundle,
                  java.lang.String title)
Creates a new instance with an empty field list.

Parameters:
bundle - The resource bundle to use
title - The bundle key for the title

GroupField

public GroupField(java.util.ResourceBundle bundle,
                  java.lang.String title,
                  java.util.List<Field> fields)
Creates a new instance with the specified list of fields.

Parameters:
bundle - The resource bundle to use
title - The bundle key for the title
fields - The initial field list
Method Detail

addField

public void addField(Field field)
Adds another field to the list.

Parameters:
field - The field to add

removeField

public Field removeField(int pos)
Removes the field at position pos from the list.

Parameters:
pos - the position of the field to remove
Returns:
the removed field

clearFields

public void clearFields()
Clears all fields in the list.


getFields

public java.util.List getFields()
Gets the list of fields in this group.

Returns:
the list of fields

getActions

public ConsoleViewAction[] getActions()
Gets the list of actions in this group.

Returns:
The list of actions in this group.

getActionList

public java.util.List<ConsoleViewAction> getActionList()
Gets the list of actions in this group.

Returns:
the list of actions in this group

getContents

public java.lang.String[] getContents()
Gets the contents of this field.

Specified by:
getContents in class Field
Returns:
The contents of this field


Copyright © 2007-2008 Grid Systems, S.A.. All Rights Reserved.