|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.info.LyTag
leon.info.LyInfo
leon.info.LyObjectInfo
leon.info.LyFieldInfo
leon.info.LyTextFieldInfo
public final class LyTextFieldInfo
This class implements the description of text fields. Text fields may contain characters as simple text (ASCII/Unicode) or will use other text formating protocols in future versions : HTML, RTF. Displaying the content of this field will be up to the implementation of the graphical component.
In addition to standard fieldInfo properties, a textFieldInfo may contain some extra information about the way the text should be shown (number of rows/columns) or structured (format/number of characters allowed).
A text field may also be simple or multiple. This means that user inputs can be mono or multiline.
See also tag
Nested Class Summary | |
---|---|
static class |
LyTextFieldInfo.Type
Text types. |
Nested classes/interfaces inherited from class leon.info.LyTag |
---|
LyTag.Model |
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static java.lang.String |
CLOSE_END_LANG
|
static java.lang.String |
CLOSE_START_LANG
|
static java.lang.String |
OPEN_END_LANG
|
static java.lang.String |
OPEN_START_LANG
|
Fields inherited from class leon.info.LyObjectInfo |
---|
NULL, PART_ALL, PART_BIND, PART_DATA, PART_GUI, PART_LABEL |
Method Summary | |
---|---|
java.lang.String |
addLangValue(java.lang.String value,
java.lang.String lang,
java.lang.String langValue)
Adds/Replaces the value for specified language in given value. |
LyValue |
buildFieldValue(java.lang.Object value)
Builds the appropriate LyValue corresponding to this field for the given value object. |
java.lang.String |
checkValue(LyEnvironment environment,
java.lang.Object fieldValue)
Checks the given value : - if the text field has a regex format (format starting with "regex:"), the given value must be conform to this format, - if a maximum number of characters is given on this text field, the value must not contain more characters than specified. |
int |
compare(java.lang.Object value1,
java.lang.Object value2,
java.util.BitSet modifiers)
Compare two value objects for this field info. |
java.lang.Object |
compute(LyObjectList objectList,
boolean importField)
Method for computing a value using function associated to this field for a given objects list. |
boolean |
contains(java.lang.Object value1,
java.lang.Object value2,
java.util.BitSet modifiers)
Checks if the second value is contained in the first one, for this field. |
java.lang.Object |
encodeValue(java.lang.Object value)
Encodes the given value to get the right value before transmitting it to the peer layer. |
boolean |
endsWith(java.lang.Object value1,
java.lang.Object value2,
java.util.BitSet modifiers)
Checks if the second value ends the first one, for this field. |
boolean |
equals(java.lang.Object value1,
java.lang.Object value2,
java.util.BitSet modifiers)
Compares two values for equality on this field. |
LyInfoCharType |
getCharType(int idx)
Gets the characters type enabled by this text field at the specified index. |
java.util.Vector<LyInfoCharType> |
getCharTypes()
Gets the characters type enabled by this text field. |
int |
getCharTypesCount()
Returns the number of characters type of this text fieldinfo. |
java.lang.String |
getCharTypeValue(int idx)
Gets the characters type enabled by this text field at the specified index. |
java.lang.String |
getEncoding()
Gets the name of the encoding class for this text field. |
LyFilterExpression.Condition[] |
getFilterConditions()
Returns the filter conditions authorized on this field. |
short[] |
getFilterModifiers()
Returns the filter modifiers authorized on this field. |
java.lang.String |
getLangValue(java.lang.String lang,
java.lang.String value)
Gets the value for specified language from given value. |
int |
getMaxChars()
Gets the maximum number of characters allowed on values of this text field. |
int |
getMinChars()
Gets the minimum number of characters allowed on values of this text field. |
int |
getNChars()
Deprecated. see getMaxChars |
int |
getNCols()
Gets the prefered number of columns shown to the user at the same time. |
int |
getNRows()
Gets the prefered number of rows shown to the user at the same time. |
java.lang.Object |
getPeerValue(java.lang.Object value,
java.lang.Class<?> objectClass,
LyObject instance)
Returns an object of the given class from a value of this fieldInfo. |
java.lang.String |
getRegex()
Deprecated. see getRegExp |
LyRegExp |
getRegExp()
Gets the regular expression for matching format of this text field. |
LyTextFieldInfo.Type |
getType()
Sets the type of this text field. |
java.lang.Class<java.lang.String> |
getValueClass()
Returns class of values for this field. |
java.lang.Object |
getValueFromObject(java.lang.Object object,
LyObject instance)
Constructs a value for this field info from an object for a given instance. |
boolean |
isMultilingual()
Checks whether this text field is multilingual. |
boolean |
isMultiple()
Checks whether this text field is multiple. |
java.lang.Object |
parse(java.lang.String stringValue)
Builds internal value for an instance of this fieldInfo from a string (previously constructed by toString). |
boolean |
startsWith(java.lang.Object value1,
java.lang.Object value2,
java.util.BitSet modifiers)
Checks if the second value starts the first one, for this field. |
java.lang.String |
toName(java.lang.Object fieldValue)
Return the specified value for this field as a "displayable" string. |
java.lang.String |
toName(java.lang.Object fieldValue,
boolean removeTags)
Returns a "displayable string" (string that can be shown to the end-user) of the specified value for this field. |
java.lang.String |
toShortName(java.lang.Object fieldValue)
Return the specified value for this field as a short "displayable" string. |
java.lang.String |
toString(java.lang.Object fieldValue)
Converts the specified value for this field to an "internal" string (string that enables reconstruction through parse). |
Methods inherited from class leon.info.LyObjectInfo |
---|
clone, getAlias, getData, getDataList, getDatas, getFilePrefix, getGroup, getInternalAlias, getInternalFilePrefix, getInternalName, getMarks, getName, getTemplate, getTip, getUserData, hasMark, hasMarks, hasTemplate, isTemplate, putData, putData, removeData, toName |
Methods inherited from class leon.info.LyInfo |
---|
getApplication, getFile, getId, getInclude, isIncluded, isInternal, isInternal, isLoaded, isLocked, load, setApplication, setFile, toString |
Methods inherited from class leon.info.LyTag |
---|
getCommentsEnd, getCommentsStart, getEnvironment, getModelType, getParent, getRootProject, hasAncestor, isExtern, setCommentsEnd, setCommentsStart, wasCloned |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface leon.data.LyField |
---|
getId |
Methods inherited from interface leon.parser.LyCommentInterface |
---|
getCommentsEnd, getCommentsStart, setCommentsEnd, setCommentsStart |
Field Detail |
---|
public static final java.lang.String __VERSION
public static final java.lang.String OPEN_START_LANG
public static final java.lang.String CLOSE_START_LANG
public static final java.lang.String OPEN_END_LANG
public static final java.lang.String CLOSE_END_LANG
Method Detail |
---|
public java.lang.Class<java.lang.String> getValueClass()
getValueClass
in interface LyField
getValueClass
in class LyFieldInfo
LyObject.getValue(leon.info.LyFieldInfo)
public LyValue buildFieldValue(java.lang.Object value)
buildFieldValue
in interface LyField
buildFieldValue
in class LyFieldInfo
value
- Value from which the LyValue is built.
LyTextValue
public java.lang.Object encodeValue(java.lang.Object value)
encodeValue
in class LyFieldInfo
value
- Value to encode.
public java.lang.Object parse(java.lang.String stringValue) throws LyFieldInfoFormatException
parse
in class LyFieldInfo
stringValue
- The value presented as a string as produced by the toString method.
LyFieldInfoFormatException
- If the string can't be parsed properly.toString(java.lang.Object)
public java.lang.String toShortName(java.lang.Object fieldValue)
toShortName
in class LyFieldInfo
LyNumberFieldInfo.toName(java.lang.Object)
public java.lang.String toName(java.lang.Object fieldValue)
toName
in class LyFieldInfo
LyFieldInfo.getValueClass()
public java.lang.String toName(java.lang.Object fieldValue, boolean removeTags)
toName
in class LyFieldInfo
value
- The internal value to convert to a displayable string. The excepted class of
this value is the one returned from the getValueClass method.removeTags
- Indicates whether HTML tags have to be removed from result.
LyFieldInfo.getValueClass()
public java.lang.String toString(java.lang.Object fieldValue)
toString
in class LyFieldInfo
parse(java.lang.String)
public java.lang.String getLangValue(java.lang.String lang, java.lang.String value)
lang
- Language (null for current lang).value
- Initial value.
public java.lang.String addLangValue(java.lang.String value, java.lang.String lang, java.lang.String langValue)
value
- Initial value.lang
- Language.value
- Lang value.
public LyFilterExpression.Condition[] getFilterConditions()
getFilterConditions
in class LyFieldInfo
LyFilterExpression
public short[] getFilterModifiers()
getFilterModifiers
in class LyFieldInfo
LyFilterExpression
public boolean equals(java.lang.Object value1, java.lang.Object value2, java.util.BitSet modifiers)
equals
in class LyFieldInfo
value1
- First value.value2
- Second value.modifiers
- Modifiers used for checking (see MOD_XXX constants of LyFilterExpression).
LyFieldInfo.compare(java.lang.Object, java.lang.Object, java.util.BitSet)
,
LyFieldInfo.getValueClass()
public int compare(java.lang.Object value1, java.lang.Object value2, java.util.BitSet modifiers)
compare
in class LyFieldInfo
value1
- First value.value2
- Second value.modifiers
- Modifiers used for checking (see MOD_XXX constants of LyFilterExpression).
LyFieldInfo.getValueClass()
public boolean contains(java.lang.Object value1, java.lang.Object value2, java.util.BitSet modifiers)
contains
in class LyFieldInfo
value1
- First value.value2
- Second value.modifiers
- Modifiers used for checking (see MOD_XXX constants of
LyFilterExpression).
public boolean startsWith(java.lang.Object value1, java.lang.Object value2, java.util.BitSet modifiers)
startsWith
in class LyFieldInfo
value1
- First value.value2
- Second value.modifiers
- Modifiers used for checking (see MOD_XXX constants of
LyFilterExpression).
public boolean endsWith(java.lang.Object value1, java.lang.Object value2, java.util.BitSet modifiers)
endsWith
in class LyFieldInfo
value1
- First value.value2
- Second value.modifiers
- Modifiers used for checking (see MOD_XXX constants of
LyFilterExpression).
public java.lang.Object getValueFromObject(java.lang.Object object, LyObject instance)
String, String[], Number | String |
getValueFromObject
in class LyFieldInfo
object
- The peer value.instance
- Instance containing the required value (could be null). This instance is
provided to be able to construct a value for complex bindings (bindings
involving other fields).
LyUnsupportedFieldBindingException
- If the requested conversion if none of the
supported conversions.LyFieldInfo.getPeerValue(java.lang.Object, java.lang.Class>, leon.data.LyObject)
,
LyFieldBinding
public java.lang.Object getPeerValue(java.lang.Object value, java.lang.Class<?> objectClass, LyObject instance)
String | String, String[], Number |
getPeerValue
in class LyFieldInfo
value
- Value of this fieldInfo. This value is an instance of the class
returned by getValueClass method.objectClass
- Expected class of the physical value.instance
- Instance containing the given value (could be null).
LyUnsupportedFieldBindingException
- If the requested conversion if none of the
supported conversions.LyFieldInfo.getValueClass()
public java.lang.String checkValue(LyEnvironment environment, java.lang.Object fieldValue)
checkValue
in class LyFieldInfo
environment
- Environment giving the user language if a message has to be produced.
LyFieldInfo.getValueClass()
public boolean isMultiple()
isMultiple
in class LyFieldInfo
public int getNRows()
public int getNCols()
public int getMinChars()
public int getMaxChars()
public int getNChars()
public java.lang.String getRegex()
public LyRegExp getRegExp()
public int getCharTypesCount()
public LyInfoCharType getCharType(int idx)
idx
- Index of the characters type.
public java.util.Vector<LyInfoCharType> getCharTypes()
public java.lang.String getCharTypeValue(int idx)
idx
- Index of the characters type.
public java.lang.String getEncoding()
public LyTextFieldInfo.Type getType()
public boolean isMultilingual()
public java.lang.Object compute(LyObjectList objectList, boolean importField)
compute
in class LyFieldInfo
objectList
- List of objects for which a footer value is computed.importField
- True if calling comes on computing of a field import, false otherwise.
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |