|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.cbse.jeasy.JEObject
com.cbse.jeasy.JEDatafield
public class JEDatafield
A class using a JLabel a JTextfield and a JButton to build an inputfield in a component. A datafield always references a dataclass.
| Properties | ||
|---|---|---|
| name | values | comment |
| id | * | Id of the object. Let it begin with DF_ |
| dataclass | * | Reference to JEDataclass |
| XMLtag | * | The tagname used to serialize the item in xml format. |
| tooltip |   | Text in Tooltip |
| border |   | Id of a border. | button | true false |
Set true will set a button behind the field, which will send the id of the JEDatafield as an ActionCommand to the callBack |
| fieldlength |   | It will overwrite the value of JEDataclass. It sets the length of the JTextfield. It can be overwritten by maxfieldlength in jeglobal. |
| behind |   | A string behind the field |
| horizontalAlignment | LEADING LEFT CENTER RIGHT TRAILING |
|
| text |   | Set the text to be displayed in the field |
| serializeFormatter |   | Set the jeasy formatter to format the source (gui field) to destination xml message |
| deserializeFormatter |   | Set the jeasy formatter to format the source (xml message) to the destination (gui field) |
| text |   | Set the text to be displayed in the field |
| editable | true false |
Set to false will change the field to an outputfield. |
| enabled | true false |
Enables or disables the component. |
| markingBackground | true false |
Set to true will use the global background color. |
| mandatory | true false |
Defines an entry as mandatory |
| markable | true false |
The field will get a focus even it is not editable and you can copy data from it |
| clearBehind | true false |
When the field is cleared the field behind will be cleared too. |
| visible | true false |
Set to false will hide the label and the field in panels and tables. |
| width | int value | The width of the combobox in pixels. |
| height | int value | The height of the combobox in pixels. |
| name |   | It will overwrite the name of the JEDataclass. It is the name of the label of the textfield. |
| labelConstraints |   | Constraints for JLabel |
| labelFont |   | To set an other font then defined in global |
| textfieldFont |   | To set an other font then defined in global |
| textfieldConstraints |   | Constraints for JTextField |
* = property you have to set; bold = default value
| Field Summary |
|---|
| Fields inherited from class com.cbse.jeasy.JEObject |
|---|
DEVELOPPING, INPUT_ERROR_DATE, INPUT_ERROR_LENGTH, INPUT_ERROR_MANDATORY, INPUT_ERROR_PARSE, INPUT_ERROR_RANGE, INPUT_ERROR_TIME, INPUT_ERRORS, NO_INPUT_ERROR, RUNNING |
| Constructor Summary | |
|---|---|
JEDatafield(java.lang.String s)
Reads the properties from a string. |
|
| Method Summary | |
|---|---|
void |
backupEntry()
The current text will be stored internal to check against changes |
void |
changedUpdate(javax.swing.event.DocumentEvent e)
|
void |
clear()
Clears the JTextfield |
java.lang.Object |
deserialize(java.lang.String s)
Converts a String to the format of the datafield |
int |
examine()
Checks and formats the entry of the textfield. |
int |
examine(java.lang.String s)
|
void |
focusGained(java.awt.event.FocusEvent e)
|
void |
focusLost(java.awt.event.FocusEvent e)
|
boolean |
getAntialiasing()
Gets the anialialising flag |
java.lang.String |
getBackupEntry()
Gets the backuped text |
java.lang.String |
getBehind()
The string behind the field |
javax.swing.border.Border |
getBorder()
Get the border |
javax.swing.JComponent |
getComponent()
Gets the JComponent based on this JEasy Object Here it is the JTextfield |
JEDataclass |
getDataclass()
Get the JEDataclass |
JEFormat |
getDeserializeFormatter()
Get the deserializeFormatter |
javax.swing.plaf.ColorUIResource |
getErrorBackground()
|
java.lang.Class |
getJClass()
Get the JClass |
javax.swing.JLabel |
getJLabel()
Get the JLabel |
java.lang.String |
getLastValidText()
|
javax.swing.plaf.ColorUIResource |
getMarkingBackground()
|
java.lang.String |
getMnemonic()
Gets the mnemonic from JEDatafield or JEDataclass |
java.lang.String |
getName()
Gets the name from JEDatafield or JEDataclass |
JEFormat |
getSerializeFormatter()
Get the serializeFormatter |
java.lang.String |
getText()
The text from the JTextfield |
javax.swing.JTextField |
getTextField()
Get the JTextField |
java.lang.String |
getToolTip()
Gets the toolTipText |
boolean |
getVerifyNeeded()
|
java.lang.String |
getXMLtag()
Gets the XMLtag. |
void |
insertUpdate(javax.swing.event.DocumentEvent e)
|
boolean |
isEditable()
False if the Datafield should not be edited in a Table or Panel |
boolean |
isMandatory()
Return if an entry is mandatory |
boolean |
isMarkable()
Return if an entry is markable |
boolean |
isMarkingBackground()
|
boolean |
isNumeric()
|
boolean |
isVisible()
False if the Datafield should not be shown in a Table or Panel |
void |
JEadd(java.awt.Container co,
java.awt.LayoutManager lm)
Adds the Component to a Container. |
void |
JEadd(javax.swing.JTable table)
Adds the Component to a JTable |
void |
JEadd(java.lang.String border,
java.awt.Container co)
Adds the textfield of the JEDatafield to a Container with a BorderLayout |
void |
keyPressed(java.awt.event.KeyEvent e)
|
void |
keyReleased(java.awt.event.KeyEvent e)
|
void |
keyTyped(java.awt.event.KeyEvent e)
|
void |
lostOwnership(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents)
|
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
removeUpdate(javax.swing.event.DocumentEvent e)
|
void |
restoreEntry()
Sets the entry of the component to the backuped value |
java.lang.Object |
serialize()
Gets the text of the textfield and converts thruw the serializeFormatter |
void |
setBackground(javax.swing.plaf.ColorUIResource c)
Sets the background of the datafield |
void |
setBehind(java.lang.String s)
Sets string behind the field |
void |
setClipboardContents(java.lang.String aString)
Place a String on the clipboard, and make this class the owner of the Clipboard's contents. |
void |
setEditable(boolean eb)
Enables/disables the textfield for input |
void |
setEnabled(boolean eb)
Enables/disables the textfield and the button |
boolean |
setFocus()
Sets the focus if editable |
void |
setMandatory(boolean b)
Sets the entry mandatory or not |
void |
setMarkable(boolean eb)
Enables or disables the inputfield for editing |
void |
setSelected(boolean b)
Set the textfield selected or unselect the field |
void |
setText(java.lang.String ts)
Sets a String into the JTextfield |
void |
setVerified(boolean b)
|
void |
setVerifyNeeded(boolean b)
|
void |
setVisible(boolean bv)
setVisible of the label textfield and the button |
void |
setXMLtag(java.lang.String s)
Sets the XMLtag |
void |
start()
Creates the jfc components using the properties |
void |
textUpdate(javax.swing.event.DocumentEvent e)
|
void |
transferFocus()
transfers the focus to the next field |
void |
transferFocusBackward()
transfers the focus to the previuos field |
boolean |
verify()
Activate the verifier as if the focus were lost Call this methode of you want to check the entry after you have set it by setText(...) |
boolean |
wasEntryChanged()
The components compares the current entry with the data stored by backupEntry() |
| Methods inherited from class com.cbse.jeasy.JEObject |
|---|
deserializeValue, getApplet, getApplLocale, getCenter, getEast, getElementAt, getElementSize, getId, getJCallBack, getLabel, getMode, getNorth, getObjLocale, getParentId, getPreview, getProjectDirectory, getProperty, getRegisterText, getSouth, getStarted, getTitle, getType, getWest, isEnabled, isEnterprise, isProfessional, isStandard, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEaddTab, removeProperties, removeProperty, serializeValue, setApplet, setApplLocale, setEditable, setEnabled, setJCallBack, setMarkable, setMode, setObjLocale, setParentId, setPreview, setProjectDirectory, setProperty, setStarted, setVisible |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JEDatafield(java.lang.String s)
s - contains properties and valuesJE#PropertyString| Method Detail |
|---|
public JEDataclass getDataclass()
public javax.swing.JTextField getTextField()
public javax.swing.border.Border getBorder()
public JEFormat getSerializeFormatter()
public JEFormat getDeserializeFormatter()
public void setSelected(boolean b)
public boolean getAntialiasing()
public javax.swing.JLabel getJLabel()
public javax.swing.JComponent getComponent()
getComponent in class JEObjectpublic java.lang.Class getJClass()
getJClass in class JEObjectpublic java.lang.Object deserialize(java.lang.String s)
public java.lang.Object serialize()
public java.lang.String getName()
getName in class JEObjectpublic java.lang.String getXMLtag()
getXMLtag in class JEObjectpublic void setXMLtag(java.lang.String s)
public java.lang.String getMnemonic()
public java.lang.String getToolTip()
public boolean verify()
public java.lang.String getText()
public java.lang.String getBehind()
public void setBehind(java.lang.String s)
public void setText(java.lang.String ts)
public boolean setFocus()
setFocus in class JEObjectpublic void setMandatory(boolean b)
public boolean isMandatory()
public void setMarkable(boolean eb)
JEObject
setMarkable in class JEObjectpublic boolean isMarkable()
public void setEnabled(boolean eb)
setEnabled in class JEObjectpublic void transferFocus()
public void transferFocusBackward()
public void setEditable(boolean eb)
setEditable in class JEObjectpublic void setVisible(boolean bv)
setVisible in class JEObjectpublic boolean isVisible()
isVisible in class JEObjectpublic boolean isEditable()
isEditable in class JEObjectpublic void setBackground(javax.swing.plaf.ColorUIResource c)
public void clear()
clear in class JEObjectpublic void backupEntry()
backupEntry in class JEObjectpublic java.lang.String getBackupEntry()
public void restoreEntry()
restoreEntry in class JEObjectpublic boolean wasEntryChanged()
wasEntryChanged in class JEObjectpublic java.lang.String getLastValidText()
public boolean isMarkingBackground()
public javax.swing.plaf.ColorUIResource getMarkingBackground()
public javax.swing.plaf.ColorUIResource getErrorBackground()
public boolean isNumeric()
public void start()
start in class JEObjectJE#start
public void JEadd(java.lang.String border,
java.awt.Container co)
JEadd in class JEObjectString - "North" "South" "West" "East" "Center"Container - where the textfield is added
public void JEadd(java.awt.Container co,
java.awt.LayoutManager lm)
JEadd in class JEObjectpublic void JEadd(javax.swing.JTable table)
JEadd in class JEObjectpublic void focusGained(java.awt.event.FocusEvent e)
focusGained in interface java.awt.event.FocusListenerpublic void focusLost(java.awt.event.FocusEvent e)
focusLost in interface java.awt.event.FocusListenerpublic void removeUpdate(javax.swing.event.DocumentEvent e)
removeUpdate in interface javax.swing.event.DocumentListenerpublic void insertUpdate(javax.swing.event.DocumentEvent e)
insertUpdate in interface javax.swing.event.DocumentListenerpublic void changedUpdate(javax.swing.event.DocumentEvent e)
changedUpdate in interface javax.swing.event.DocumentListenerpublic void textUpdate(javax.swing.event.DocumentEvent e)
public int examine()
public int examine(java.lang.String s)
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped in interface java.awt.event.KeyListenerpublic void keyPressed(java.awt.event.KeyEvent e)
keyPressed in interface java.awt.event.KeyListenerpublic void setClipboardContents(java.lang.String aString)
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased in interface java.awt.event.KeyListenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void setVerified(boolean b)
public void setVerifyNeeded(boolean b)
public boolean getVerifyNeeded()
public void lostOwnership(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents)
lostOwnership in interface java.awt.datatransfer.ClipboardOwner
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||