|
||||||||
| 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.JESpinner
public class JESpinner
A class using a JLabel a JSpinner and a JButton to build an spinnerfield in a component.
| Properties | ||
|---|---|---|
| name | values | comment |
| id | * | Id of the object. Let it begin with SN_ |
| dataclass | * | Reference to JEDataclass |
| tooltip |   | Text in Tooltip | button | true false |
Set true will set a button behind the field, which will send the id of the JESpinner 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 |
| text |   | Set the text to be displayed in the field |
| editable | true false |
Set to false will change the field to an outputfield. |
| mandatory | true false |
Defines an entry as mandatory |
| markingBackgorund | true false |
Set to true will use the global background color. |
| visible | true false |
Set to false will hide the label and the field in panels and tables. |
| name |   | It will overwrite the name of the JEDataclass. It is the name of the label of the spinner. |
| labelConstraints |   | Constraints for JLabel |
| labelFont |   | To set an other font then defined in global |
| spinnerFont |   | To set an other font then defined in global |
| textfieldConstraints |   | Constraints for JTextField |
| model | Number int Number double Date List |
SpinnerModel for a sequence of numbers, dates or text entries |
| ivalue |   | Initial integer value set in the field. |
| iminimum |   | Minimum integer value. |
| imaximum |   | Maximum integer value. |
| istepsize |   | Stepsize integer used when spinning up and down. |
| dvalue |   | Initial double value set in the field. |
| dminimum |   | Minimum double value. |
| dmaximum |   | Maximum double value. |
| dstepsize |   | Stepsize double used when spinning up and down. |
| elements |   | A list of strings used as a sequence for a SpinnerListModel. |
| calendarField | ERA YEAR MONTH WEEK_OF_YEAR WEEK_OF_MONTH DAY_OF_MONTH DAY_OF_YEAR DAY_OF_WEEK DAY_OF_WEEK_IN_MONTH AM_PM HOUR HOUR_OF_DAYMINUTE SECOND MILLISECOND |
Defines the part of the date that will be changed. |
* = 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 | |
|---|---|
JESpinner(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 |
clear()
Clears the JTextfield |
int |
examine()
Checks if an entry is mandatoy |
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.JSpinner |
getButton()
Gets the JSpinner |
javax.swing.JComponent |
getComponent()
Gets the JComponent based on this JEasy Object Here it is the JTextfield |
java.lang.Class |
getJClass()
Get the JClass |
javax.swing.JLabel |
getJLabel()
Get the JLabel |
boolean |
getMarkingBackground()
|
java.lang.String |
getMnemonic()
Gets the mnemonic from JESpinner or JEDataclass |
java.lang.String |
getName()
Gets the name from JESpinner or JEDataclass |
java.lang.String |
getText()
The text from the JTextfield |
java.lang.String |
getToolTip()
Gets the toolTipText |
java.lang.String |
getXMLtag()
Gets the XMLtag. |
boolean |
isEditable()
False if the Spinner should not be edited in a Table or Panel |
boolean |
isMandatory()
Return if an entry is mandatory |
boolean |
isNumeric()
|
boolean |
isVisible()
False if the Spinner 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 spinner of the JESpinner to a Container with a BorderLayout |
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 |
restoreEntry()
Sets the entry of the component to the backuped value |
void |
setBackground(java.awt.Color c)
Sets the background of the spinner |
void |
setDateMask(java.lang.String mask)
Sets the date mask if the spinner model is of type date |
void |
setEnabled(boolean eb)
Enables/disables the spinner and the button |
boolean |
setFocus()
Sets the focus if editable |
void |
setMandatory(boolean b)
Sets the entry mandatory or not |
void |
setText(java.lang.String ts)
Sets a String into the JTextfield |
void |
setVisible(boolean bv)
setVisible of the label spinner and the button |
void |
setXMLtag(java.lang.String s)
Sets the XMLtag |
void |
start()
Creates the jfc components using the properties |
void |
stateChanged(javax.swing.event.ChangeEvent e)
|
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, setEditable, setEnabled, setJCallBack, setMarkable, 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 JESpinner(java.lang.String s)
s - contains properties and valuesJE#PropertyString| Method Detail |
|---|
public javax.swing.JLabel getJLabel()
public javax.swing.JComponent getComponent()
getComponent in class JEObjectpublic void setMandatory(boolean b)
public boolean isMandatory()
public java.lang.Class getJClass()
getJClass in class JEObjectpublic javax.swing.JSpinner getButton()
public java.lang.String getName()
getName in class JEObjectpublic java.lang.String getXMLtag()
getXMLtag in class JEObjectpublic void setXMLtag(java.lang.String s)
public void setDateMask(java.lang.String mask)
public java.lang.String getMnemonic()
public java.lang.String getToolTip()
public java.lang.String getText()
public java.lang.String getBehind()
public void setText(java.lang.String ts)
public boolean setFocus()
setFocus in class JEObjectpublic void setEnabled(boolean eb)
setEnabled in class JEObjectpublic boolean getAntialiasing()
public void setVisible(boolean bv)
setVisible in class JEObjectpublic boolean isVisible()
isVisible in class JEObjectpublic boolean isEditable()
isEditable in class JEObjectpublic boolean isNumeric()
public void setBackground(java.awt.Color 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 int examine()
public boolean wasEntryChanged()
wasEntryChanged in class JEObjectpublic boolean getMarkingBackground()
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 spinner 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 stateChanged(javax.swing.event.ChangeEvent e)
stateChanged in interface javax.swing.event.ChangeListenerpublic 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.MouseListener
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||