|
||||||||
| 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.JEComboList
public class JEComboList
A class using a JLabel a JComboBox and a JButton. ComboList is like a ComboBox where all items are selected. It is not used to select one but showing all selected items. When it is transfered to a message, all items are put into the message. In a combobox only the selected item you see in the box will be transfered. You can use the button to get a callback for organizing the list of items.
| Properties | ||
|---|---|---|
| name | values | comment |
| id | * | Id of the object. Let it begin with CL_ |
| button | true false |
Set true will set a button behind the field, which will send the id of the JEComboList as an ActionCommand to the callBack |
| XMLtag | * | The tagname used to serialize the item in xml format. |
| name |   | It is the name of the label. |
| labelConstraints |   | Constraints for JLabel |
| textfieldConstraints |   | Constraints for JTextField |
| width | int value | The width of the combobox in pixels. |
| height | int value | The height of the combobox in pixels. |
| visible | true false |
Set to false will hide the label and the field in panels and tables. |
| editable | true false |
Set true will make the box editable |
| mandatory | true false |
Defines an entry as mandatory |
| E1 . En |
  | Textelements to be shown in the ComboList |
* = 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 | |
|---|---|
JEComboList()
|
|
JEComboList(java.lang.String s)
Reads the properties from a string. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
backupEntry()
The current selected item will be stored internal to check against changes |
void |
clear()
Removes all entries of the combobox |
void |
disableListeners()
Removes the Key- Action- Item- and FocusListener |
void |
enableListeners()
Adds the Key- Action- Item- and FocusListener after a previous disableListeners() |
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 |
javax.swing.DefaultListModel |
getBackupEntry()
Gets the backuped selected item |
javax.swing.JComboBox |
getComboBox()
Gets the jfc-Component JCombobox |
javax.swing.JComponent |
getComponent()
Gets the JComponent based on this JEasy Object |
java.lang.String |
getElementAt(int n)
Gets the component of element n |
int |
getElementSize()
Gets the number of elements |
java.lang.Class |
getJClass()
Get the JClass |
java.awt.GridBagConstraints |
getLabelConstraints()
|
java.awt.Font |
getLabelFont()
|
javax.swing.DefaultListModel |
getListModel()
Gets the ListModel of the combobox |
java.lang.String |
getName()
Gets the name of the label |
java.lang.String |
getText()
Gets the selected item |
java.awt.GridBagConstraints |
getTextFieldConstraints()
|
java.awt.Font |
getTextFieldFont()
|
java.lang.String |
getXMLtag()
Gets the XMLtag. |
boolean |
isEditable()
See isEnabled() |
boolean |
isEnabled()
False if the state of the ComboBox should not be changed in a Table or Panel |
boolean |
isMandatory()
Return if an entry is mandatory |
boolean |
isVisible()
False if the ComboBox should not be shown in a Table or Panel |
void |
itemStateChanged(java.awt.event.ItemEvent e)
|
void |
JEadd(java.awt.Container co,
java.awt.LayoutManager lm)
Adds the JEObject to the Container and the Containers LayoutManager |
void |
JEadd(java.lang.String border,
java.awt.Container co)
Adds the JEObject 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 |
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 |
remove()
Removes all entries of the combobox |
void |
restoreEntry()
Selects the item that was backuped before |
void |
setEditable(boolean b)
setEditable of the combolist |
void |
setEnabled(boolean eb)
Enables/disables the combobox and the button |
void |
setMandatory(boolean b)
Sets the entry mandatory or not |
void |
setText(java.lang.String ts)
Sets the selected item to ts |
void |
setVisible(boolean bv)
setVisible of the ComboBox |
void |
setXMLtag(java.lang.String s)
Sets the XMLtag |
void |
start()
Creates the jfc components using the properties |
void |
transferFocus()
transfers the focus to the next field |
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, getId, getJCallBack, getLabel, getMode, getNorth, getObjLocale, getParentId, getPreview, getProjectDirectory, getProperty, getRegisterText, getSouth, getStarted, getTitle, getType, getWest, isEnterprise, isProfessional, isStandard, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEaddTab, removeProperties, removeProperty, serializeValue, setApplet, setApplLocale, setEditable, setEnabled, setFocus, 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 JEComboList(java.lang.String s)
s - contains properties and valuesJE#PropertyStringpublic JEComboList()
| Method Detail |
|---|
public int getElementSize()
JEObject
getElementSize in class JEObjectpublic java.lang.String getElementAt(int n)
JEObject
getElementAt in class JEObjectpublic java.lang.String getName()
getName in class JEObjectpublic void setMandatory(boolean b)
public boolean isMandatory()
public javax.swing.JComboBox getComboBox()
public javax.swing.JComponent getComponent()
getComponent in class JEObjectpublic javax.swing.DefaultListModel getListModel()
public java.lang.Class getJClass()
getJClass in class JEObjectpublic java.lang.String getText()
public void setText(java.lang.String ts)
the - string to be setpublic java.lang.String getXMLtag()
getXMLtag in class JEObjectpublic void setXMLtag(java.lang.String s)
public void setEditable(boolean b)
setEditable in class JEObjectpublic void setEnabled(boolean eb)
setEnabled in class JEObjectpublic void setVisible(boolean bv)
setVisible in class JEObjectpublic boolean isVisible()
isVisible in class JEObjectpublic boolean isEnabled()
isEnabled in class JEObjectpublic boolean isEditable()
isEditable in class JEObjectpublic int examine()
public java.awt.Font getLabelFont()
public java.awt.Font getTextFieldFont()
public java.awt.GridBagConstraints getLabelConstraints()
public java.awt.GridBagConstraints getTextFieldConstraints()
public void disableListeners()
public void enableListeners()
public boolean getAntialiasing()
public void clear()
clear in class JEObjectpublic void remove()
public void backupEntry()
backupEntry in class JEObjectpublic javax.swing.DefaultListModel getBackupEntry()
public void restoreEntry()
restoreEntry in class JEObjectpublic boolean wasEntryChanged()
wasEntryChanged in class JEObjectpublic void transferFocus()
public void start()
start in class JEObjectJE#start
public void JEadd(java.awt.Container co,
java.awt.LayoutManager lm)
JEObject
JEadd in class JEObject
public void JEadd(java.lang.String border,
java.awt.Container co)
JEObject
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 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 keyReleased(java.awt.event.KeyEvent e)
keyReleased in interface java.awt.event.KeyListenerpublic 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 itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged in interface java.awt.event.ItemListenerpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListener
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||