pl.mbdev.openstage
Class IppTextBox

java.lang.Object
  extended by pl.mbdev.openstage.Xml
      extended by pl.mbdev.openstage.XmlText
          extended by pl.mbdev.openstage.IppTextBox

public class IppTextBox
extends XmlText

Multi-line box with editable text, which is similar to IppTextField, but can be added directly to IppScreen and cannot be added to IppForm. It also has some minor differences in possible constraints (see IppTextBox.Constraint and IppTextField.Constraint).

 Copyright 2011 Mateusz Bysiek,
     mb@mbdev.pl, http://mbdev.pl/
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at
 
     http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 

Author:
Mateusz Bysiek

Nested Class Summary
static class IppTextBox.Constraint
          Defines kinds of IppTextBox input.
static class IppTextBox.DefaultValue
          Defined possible kinds of default value for IppTextBox objects.
 
Nested classes/interfaces inherited from class pl.mbdev.openstage.XmlText
XmlText.Password, XmlText.Uneditable
 
Field Summary
private  IppTextBox.Constraint constraint
          Value from IppTextBox.Constraint.
private  IppTextBox.DefaultValue defaultValue
          One of the values from IppTextBox.DefaultValue.
private  java.lang.String key
          Key from the key-value pair, where value is the content of the editable box.
private  java.lang.String title
          Title of this IppTextBox, placed in left column.
private  java.lang.String url
          URL address to which the value from the text box can be sent via SELECT command (see IppCommand and IppCommand.Type).
 
Fields inherited from class pl.mbdev.openstage.XmlText
text
 
Constructor Summary
IppTextBox(java.lang.String title, java.lang.String url, IppTextBox.DefaultValue defaultValue, java.lang.String key, boolean isUneditable)
          Creates a new text box.
IppTextBox(java.lang.String title, java.lang.String text, java.lang.String url, int maxSize, IppTextBox.Constraint constraint, boolean isPassword, IppTextBox.DefaultValue defaultValue, java.lang.String key, boolean isUneditable)
          Creates a new text box.
IppTextBox(java.lang.String title, java.lang.String text, java.lang.String url, java.lang.String key)
          Creates a new text box.
 
Method Summary
protected  java.lang.StringBuffer attributesToXmlString()
          Should be overridden by classes that have some attributes.
 
Methods inherited from class pl.mbdev.openstage.Xml
add, add, addAndReturn, attributeToXml, firstAttributesToXmlString, getContents, getLogicalRoot, getParent, getSubNode, getSubNodeIndex, getSubNodes, getXmlHeader, isEmpty, logicalAdd, sendTo, setContents, setParent, subObjectsCount, subObjectsToXmlString, toXmlString, wrapWithIppItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

title

private java.lang.String title
Title of this IppTextBox, placed in left column.


url

private java.lang.String url
URL address to which the value from the text box can be sent via SELECT command (see IppCommand and IppCommand.Type).


constraint

private IppTextBox.Constraint constraint
Value from IppTextBox.Constraint.


defaultValue

private IppTextBox.DefaultValue defaultValue
One of the values from IppTextBox.DefaultValue.


key

private java.lang.String key
Key from the key-value pair, where value is the content of the editable box.

Constructor Detail

IppTextBox

public IppTextBox(java.lang.String title,
                  java.lang.String url,
                  IppTextBox.DefaultValue defaultValue,
                  java.lang.String key,
                  boolean isUneditable)
Creates a new text box.

Parameters:
title - title of this IppTextBox, placed in left column
url - URL address to which the value from the text box can be sent via SELECT command (see IppCommand and IppCommand.Type)
defaultValue - one of the values from IppTextBox.DefaultValue
key - key from the key-value pair, where value is the content of the editable box
isUneditable - field value cannot be edited by the user, if true

IppTextBox

public IppTextBox(java.lang.String title,
                  java.lang.String text,
                  java.lang.String url,
                  java.lang.String key)
Creates a new text box.

Parameters:
title - title of this IppTextBox, placed in left column
text - used only when defaultValue is set to TEXT
url - URL address to which the value from the text box can be sent via SELECT command (see IppCommand and IppCommand.Type)
key - key from the key-value pair, where value is the content of the editable box

IppTextBox

public IppTextBox(java.lang.String title,
                  java.lang.String text,
                  java.lang.String url,
                  int maxSize,
                  IppTextBox.Constraint constraint,
                  boolean isPassword,
                  IppTextBox.DefaultValue defaultValue,
                  java.lang.String key,
                  boolean isUneditable)
Creates a new text box.

Parameters:
title - title of this IppTextBox, placed in left column
text - used only when defaultValue is set to TEXT
url - URL address to which the value from the text box can be sent via SELECT command (see IppCommand and IppCommand.Type)
maxSize - maximum length of the input, ignored if negative
constraint - value from IppTextBox.Constraint
isPassword - if true, OpenStage device will treat the value of the box as confidential, and try to obscure/hide it whenever possible
defaultValue - one of the values from IppTextBox.DefaultValue
key - key from the key-value pair, where value is the content of the editable box
isUneditable - field value cannot be edited by the user, if true
Method Detail

attributesToXmlString

protected java.lang.StringBuffer attributesToXmlString()
Description copied from class: Xml
Should be overridden by classes that have some attributes.

Overrides:
attributesToXmlString in class XmlText
Returns:
XML-text containing all attributes of the object