de.cbse.jeasy
Class JEDataType

java.lang.Object
  extended by de.cbse.jeasy.JEObject
      extended by de.cbse.jeasy.JEDataType

public class JEDataType
extends JEObject

Defines the type, length and format of data to be typed in a JEDataField.

Properties :

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
 
Constructor Summary
JEDataType(JELocaleProperties hm)
          Reads the properties from a HashMap
JEDataType(JENode jen)
          Constructor based on a XML file parsed to a TreeNode.
 
Method Summary
 int examine(java.lang.String s)
          Checks a string against the definitions of this datatype.
 java.lang.String format(java.lang.String s)
          Formats a string to fit the definitions of the datatype
(package private)  java.text.DecimalFormat getDecimalFormat()
          Gets the DecimalFormat based on the defined mask and separators
 java.lang.Character getDecimalSeparator()
           
(package private)  int getFractionDigits()
           
 java.lang.Character getGroupingSeparator()
           
(package private)  int getIntegerDigits()
           
 int getLength()
           
 java.lang.String getMask()
           
 java.lang.String getPrimitiveDataType()
           
 boolean isNumeric()
           
 void setDecimalSeparator(char ds)
           
 void setGroupingSeparator(char ds)
           
 void setLength(int length)
          Sets the length of the field.
 void setMask(java.lang.String newmask)
           
 
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
 

Field Detail

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
Constructor Detail

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
Method Detail

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 -