de.cbse.jeasy
Class JEDataType
java.lang.Object
de.cbse.jeasy.JEObject
de.cbse.jeasy.JEDataType
public class JEDataType
- extends JEObject
Defines the type, length and format of data to be typed in a JEDataField.
Properties :
- id
The unique id of the root object.
- referenceId
A reference for this jeasy object used to identify this type of jeasy object even if it was cloned. It is used for locale properties of the object and may be used for identification in messages. If no reference is set, the jeasy id will be set as default.
- length
It sets the maximum number of chars or digits of a dataclass.
- primitiveDataType (possible values [CHAR, NUM, DATE, TIME, CURRENCY])
Defines the basic data type.
- mask
The mask set for the DecimalFormat or the SimpleDateFormat. After leaving an inputfuield the entry will be formatted using this mask.
- decimalSeparator
The decimal separator set for the DecimalFormat. If not set the standard is used.
- groupingSeparator
The grouping separator set for the DecimalFormat. If not set the standard is used.
- min
The minimal value of a numeric input field.
- max
The max value of a numeric input field.
- regularExpression
A regular expression. See http://en.wikipedia.org/wiki/Regular_expression.
- Author:
- Harry Pfohl
|
Field Summary |
java.lang.String |
CHAR
|
java.lang.String |
CURRENCY
|
java.lang.String |
DATE
|
java.lang.String |
NUM
|
java.lang.String |
TIME
|
| Fields inherited from class de.cbse.jeasy.JEObject |
aaa, ACTIVITYBAR, ANIMATION, BORDER, BUSINESSOBJECT_NAME, BUTTON, BUTTONGROUP, CHECKBOX, CHECKBOXMENUITEM, COLOR, COMBOBOX, ComboBoxButtonWidth, COMBOLIST, CONSTRAINTS, CONTEXT_HELP_FOCUS_GAINED, CONTEXT_HELP_FOCUS_LOST, CONTEXT_HELP_MOUSE_ENTERED, CONTEXT_HELP_MOUSE_EXITED, DATAFIELD, DATATYPE, DESKTOPPANE, DIALOG, EDITORPANE, FONT, FORMAT, FRAME, GANTTGRID, GLOBAL, GRADIENTPAINT, HELP, ICON, ID_JESTART, INPUT_ERROR_DATE, INPUT_ERROR_LENGTH, INPUT_ERROR_MANDATORY, INPUT_ERROR_PARSE, INPUT_ERROR_RANGE, INPUT_ERROR_REGULAREXPRESSION, INPUT_ERROR_TIME, INPUT_ERRORS, INSETS, INTERNALFRAME, intType, LABEL, LIST, LOCALE, MENU, MENUBAR, MENUITEM, MESSAGE, METHODINVOCATION, NO_CONSTANT, NO_INPUT_ERROR, OPTIONPANE, PANEL, parentId, POPUP, PROGRESSBAR, PROPERTIE_NAME, propertyHashMap, RADIOBUTTON, RADIOBUTTONMENUITEM, refresh, SPINNER, SPLITPANE, START, STORE, STRING, TABBEDPANE, TABLE, TASKPANE, TEXTUREPAINT, THEME, TIPS, TOOLBAR, TREE, TREENODE, type, WINDOW |
| Methods inherited from class de.cbse.jeasy.JEObject |
clearPreview, clone, getApplLocale, getBorderConstantProperty, getBorderProperty, getCharGProperty, getCharProperty, getColorProperty, getConstraintsProperty, getFontProperty, getGProperty, getGradientPaintProperty, getId, getImageConstantProperty, getImageIconProperty, getInsetsProperty, getJEGlobal, getJETexturePaintProperty, getLayoutProperty, getLocaleProperties, getObjectsHashMap, getObjectsNonPreviewHashMap, getParentId, getPreviewHashMap, getPreviewObject, getProjectDirectory, getPropertieHashMap, getProperty, getProperty, getPropertyAsArray, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsInteger, getPropertyAsObject, getPropertyAsObject, getPropertyAsVector, getPropertyAsVector, getReferenceButtonBehind, getReferenceId, getRegisterText, getResourceUrl, getRootPane, getRootPaneId, getSwingConstantProperty, getTabbedPaneConstantProperty, getTexturePaintProperty, getType, getUniqueNumber, hasSuperclass, init, invoke, invoke, invoke, invoke, isApplet, isEnterprise, isGlobalAnimation, isGlobalListening, isInited, isPreview, isPreviewMember, isProfessional, isRefresh, isSetuped, isStandard, registerJEObject, removeProperties, removeProperty, removeProperty, setApplet, setApplLocale, setGlobalAnimation, setGlobalListening, setInited, setJeGlobal, setLocaleProperties, setParentId, setPreview, setPreviewHashMap, setPreviewMember, setPreviewObject, setProjectDirectory, setPropertieHashMap, setProperties, setProperties, setProperty, setProperty, setRefresh, setRootPane, setRootPaneId, setSetuped, setType, setupComponent, show, timerTask |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CHAR
public final java.lang.String CHAR
- See Also:
- Constant Field Values
NUM
public final java.lang.String NUM
- See Also:
- Constant Field Values
CURRENCY
public final java.lang.String CURRENCY
- See Also:
- Constant Field Values
DATE
public final java.lang.String DATE
- See Also:
- Constant Field Values
TIME
public final java.lang.String TIME
- See Also:
- Constant Field Values
JEDataType
public JEDataType(JELocaleProperties hm)
- Reads the properties from a HashMap
- Parameters:
hm - HashMap
JEDataType
public JEDataType(JENode jen)
- Constructor based on a XML file parsed to a TreeNode.
- Parameters:
jen - - See Also:
JESaxParser
getDecimalSeparator
public java.lang.Character getDecimalSeparator()
setDecimalSeparator
public void setDecimalSeparator(char ds)
getGroupingSeparator
public java.lang.Character getGroupingSeparator()
setGroupingSeparator
public void setGroupingSeparator(char ds)
getDecimalFormat
java.text.DecimalFormat getDecimalFormat()
- Gets the DecimalFormat based on the defined mask and separators
- Returns:
getIntegerDigits
int getIntegerDigits()
- Returns:
getFractionDigits
int getFractionDigits()
- Returns:
isNumeric
public boolean isNumeric()
setMask
public void setMask(java.lang.String newmask)
- Parameters:
newmask -
getMask
public java.lang.String getMask()
- Returns:
getPrimitiveDataType
public java.lang.String getPrimitiveDataType()
getLength
public int getLength()
- Returns:
examine
public int examine(java.lang.String s)
- Checks a string against the definitions of this datatype.
- Parameters:
s -
- Returns:
- JEObject.NO_INPUT_ERROR JEObject.INPUT_ERROR_LENGTH
JEObject.INPUT_ERROR_PARSE JEObject.INPUT_ERROR_RANGE
JEObject.INPUT_ERROR_DATE JEObject.INPUT_ERROR_TIME
format
public java.lang.String format(java.lang.String s)
- Formats a string to fit the definitions of the datatype
- Parameters:
s -
- Returns:
- the formatted strinf
setLength
public void setLength(int length)
- Sets the length of the field.
- Parameters:
length -