Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol
Interface ChatRoomConfigurationFormField

All Known Implementing Classes:
ChatRoomConfigurationFormFieldJabberImpl

public interface ChatRoomConfigurationFormField

The ChatRoomConfigurationFormField is contained in the ChatRoomConfigurationForm and represents a configuration property of a chat room. It's meant to be used by GUI-s to provide access to the user to chat room configuration.
The ChatRoomConfigurationFormField defines 8 different types of fields:

The type of the field will help the GUI to determine the component to use to represent the given field.

Author:
Yana Stamcheva

Field Summary
static String TYPE_BOOLEAN
          The boolean type means that the value of this field is of type Boolean.
static String TYPE_LIST_MULTI
          The list multi type means that the value of this field is a list that allows multiple choice (i.e.
static String TYPE_LIST_SINGLE
          The list single type means that the value of this field is a list that allows only one line to be selected at a time.
static String TYPE_TEXT_FIXED
          The fixed text type means that the value of this field is a text, that could not be changed.
static String TYPE_TEXT_MULTI
          The multi lines text type means that the value of this field is a text represented on multiple lines.
static String TYPE_TEXT_PRIVATE
          The private text type indicates that the text, contained in this field should not be shown to the user in clear text, instead if should be protected by showing '*'.
static String TYPE_TEXT_SINGLE
          The single line text type means that the value of this field is a text represented on one line.
static String TYPE_UNDEFINED
          The undefined type is meant to be used by the implementation if they don't know the type of the configuration property.
 
Method Summary
 void addValue(Object value)
          Adds the given value to the values of this field.
 String getDescription()
          Returns a description that provides extra clarification about the field.
 String getLabel()
          Returns the label of the field which should give enough information to the user to fill out the form.
 String getName()
          Returns the name of the field to be filled out.
 Iterator<String> getOptions()
          Returns an Iterator for the available options that the user has in order to answer the question.
 String getType()
          Returns an indicative of the format for the data to answer.
 Iterator<?> getValues()
          Returns an Iterator for the default values of the field if the field is part of a form to fill out.
 boolean isRequired()
          Returns true if the question must be answered in order to complete the questionnaire
 void setValues(Object[] newValues)
          Sets the list of values for this field.
 

Field Detail

TYPE_UNDEFINED

static final String TYPE_UNDEFINED
The undefined type is meant to be used by the implementation if they don't know the type of the configuration property.

See Also:
Constant Field Values

TYPE_TEXT_FIXED

static final String TYPE_TEXT_FIXED
The fixed text type means that the value of this field is a text, that could not be changed. This type is meant to be used for adding additional information helping the user to complete the form.

See Also:
Constant Field Values

TYPE_TEXT_PRIVATE

static final String TYPE_TEXT_PRIVATE
The private text type indicates that the text, contained in this field should not be shown to the user in clear text, instead if should be protected by showing '*'. This type is used for passwords.

See Also:
Constant Field Values

TYPE_BOOLEAN

static final String TYPE_BOOLEAN
The boolean type means that the value of this field is of type Boolean.

See Also:
Constant Field Values

TYPE_TEXT_MULTI

static final String TYPE_TEXT_MULTI
The multi lines text type means that the value of this field is a text represented on multiple lines.

See Also:
Constant Field Values

TYPE_TEXT_SINGLE

static final String TYPE_TEXT_SINGLE
The single line text type means that the value of this field is a text represented on one line.

See Also:
Constant Field Values

TYPE_LIST_MULTI

static final String TYPE_LIST_MULTI
The list multi type means that the value of this field is a list that allows multiple choice (i.e. multiple lines could be selected at the same time).

See Also:
Constant Field Values

TYPE_LIST_SINGLE

static final String TYPE_LIST_SINGLE
The list single type means that the value of this field is a list that allows only one line to be selected at a time.

See Also:
Constant Field Values
Method Detail

getName

String getName()
Returns the name of the field to be filled out. This serves as an identifier of the field.

Returns:
the name of the field

getDescription

String getDescription()
Returns a description that provides extra clarification about the field. This information could be presented to the user either in tool-tip,help button, or as a section of text before the question.

Returns:
description that provides extra clarification about the question.

getLabel

String getLabel()
Returns the label of the field which should give enough information to the user to fill out the form.

Returns:
label of the question.

getOptions

Iterator<String> getOptions()
Returns an Iterator for the available options that the user has in order to answer the question.

Returns:
Iterator for the available options.

isRequired

boolean isRequired()
Returns true if the question must be answered in order to complete the questionnaire

Returns:
true if the question must be answered in order to complete the questionnaire.

getType

String getType()
Returns an indicative of the format for the data to answer. The valid types are all TYPE_XXX constants defined in this class.

Returns:
format for the data to answer.

getValues

Iterator<?> getValues()
Returns an Iterator for the default values of the field if the field is part of a form to fill out. Otherwise, returns an Iterator for the answered values of the field.

Returns:
an Iterator for the default values or answered values of the field

addValue

void addValue(Object value)
Adds the given value to the values of this field.

Parameters:
value - the value to add

setValues

void setValues(Object[] newValues)
Sets the list of values for this field.

Parameters:
newValues - the values of this field

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.