de.cbse.jeasy
Class JEList

java.lang.Object
  extended by de.cbse.jeasy.JEObject
      extended by de.cbse.jeasy.JEComponent
          extended by de.cbse.jeasy.JEList
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.ComponentListener, java.awt.event.FocusListener, java.awt.event.InputMethodListener, java.awt.event.ItemListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.awt.event.WindowFocusListener, java.awt.event.WindowListener, java.beans.PropertyChangeListener, java.util.EventListener, javax.swing.event.CaretListener, javax.swing.event.ChangeListener, javax.swing.event.DocumentListener, javax.swing.event.ListSelectionListener, javax.swing.event.MenuKeyListener, javax.swing.event.PopupMenuListener, javax.swing.event.TableModelListener, javax.swing.event.TreeExpansionListener, javax.swing.event.TreeModelListener, javax.swing.event.TreeSelectionListener

public class JEList
extends JEComponent

Implements a JList. See a demonstration in the program JEasyExample tab "Components".

Properties :

Author:
Harry Pfohl

Field Summary
 
Fields inherited from class de.cbse.jeasy.JEComponent
animated, backup, buttonBehind, caretPosition, component, endMarkPosition, enterPressed, isPressed, jeButtonBehind, label, labelBehind, labelText, parentId, scrollPane, tree, treeNode, window
 
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, 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
JEList(JELocaleProperties hm)
          Reads the properties from a HashMap
JEList(JENode jen)
          Constructor based on a XML file parsed to a TreeNode.
 
Method Summary
 int addItem(java.lang.Object obj)
          Add an item to the list if it not exist yet.
 void clear()
          Remove all emelents of the list.
 javax.swing.JList getJList()
          Returns the JList.
 javax.swing.DefaultListModel getModel()
          Returns the data model that holds the list of items displayed by the JList component.
 int getSize()
          Returns the length of the list.
 java.lang.String getValue()
          Gets the value of the selected item.
 java.lang.String getValueAt(int i)
          Gets the value of the item.
protected  void init()
          Initialization of the SWING objects.
 void moveSelectedDown()
          Moves the selected item one position up.
 void moveSelectedUp()
          Moves the selected item one position up.
 void remove()
          Removes all entries
 int removeItem(java.lang.Object item)
          Removes an item from the list.
 void removeSelectedItem()
          Removes the selected item from the list.
 void setSelectedIndex(int i)
          Select index
 void setText(java.lang.Object text)
          Sets the selected item to text
 void setupComponent()
          Set the property values to the component.
 void setValue(java.lang.Object item)
          Calls attItem and selects the entry.
 void setValue(java.lang.String item)
          Calls attItem and selects the entry.
 void setValues(java.util.Vector items)
          Calls addItem for all elements of the vector.
 
Methods inherited from class de.cbse.jeasy.JEComponent
actionPerformed, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, addListeners, backupEntry, caretPositionChanged, caretUpdate, changedUpdate, componentHidden, componentMoved, componentResized, componentShown, examine, examine, focusGained, focusLost, getAddableComponent, getAnimation, getBackupEntry, getButtonBehind, getClosedIcon, getColumns, getComponent, getDataType, getIcon, getJEButtonBehind, getJLabel, getJScrollpane, getLabel, getLabelBehind, getLabelText, getLeafIcon, getMandatory, getName, getOpenIcon, getParentId, getToolTipText, getTreeNode, getValueBeforeFocus, getValueNotNull, getValues, getWindow, inputMethodTextChanged, insertUpdate, isAnimated, isEditable, isExiting, isListening, isShowing, isVerified, isVisible, itemStateChanged, jCallBackInputVerifier, keyPressed, keyReleased, keyTyped, menuKeyPressed, menuKeyReleased, menuKeyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, popupMenuCanceled, popupMenuWillBecomeInvisible, popupMenuWillBecomeVisible, propertyChange, refresh, remove, removeActionListeners, removeUpdate, repaint, restoreEntry, restoreValueBeforeFocus, setAnimated, setBackground, setBackground, setEnabled, setEnabled, setExiting, setFocus, setForeground, setForeground, setIcon, setListening, setMandatory, setParentId, setProperties, setText, setToolTipText, setTreeNode, setValueBeforeFocus, setVerified, setVisible, setVisible, stateChanged, tableChanged, textUpdate, timerTask, transferFocus, transferFocusBackward, treeCollapsed, treeExpanded, treeNodesChanged, treeNodesInserted, treeNodesRemoved, treeStructureChanged, valueChanged, valueChanged, wasEntryChanged, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowGainedFocus, windowIconified, windowLostFocus, windowOpened
 
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, 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, 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, setPreview, setPreviewHashMap, setPreviewMember, setPreviewObject, setProjectDirectory, setPropertieHashMap, setProperties, setProperties, setProperty, setProperty, setRefresh, setRootPane, setRootPaneId, setSetuped, setType, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JEList

public JEList(JELocaleProperties hm)
Reads the properties from a HashMap

Parameters:
hm - HashMap

JEList

public JEList(JENode jen)
Constructor based on a XML file parsed to a TreeNode.

Parameters:
jen -
See Also:
JESaxParser
Method Detail

getValue

public java.lang.String getValue()
Gets the value of the selected item.

Overrides:
getValue in class JEComponent
Returns:
value of the selected text element of the ComboBox

getValueAt

public java.lang.String getValueAt(int i)
Gets the value of the item.

Returns:
value of the item as a String

getModel

public javax.swing.DefaultListModel getModel()
Returns the data model that holds the list of items displayed by the JList component.

Returns:

setValue

public void setValue(java.lang.Object item)
Calls attItem and selects the entry.

Parameters:
item -

setValue

public void setValue(java.lang.String item)
Calls attItem and selects the entry.

Overrides:
setValue in class JEComponent
Parameters:
item -

setValues

public void setValues(java.util.Vector items)
Calls addItem for all elements of the vector.

Overrides:
setValues in class JEComponent
Parameters:
itemVector -

getJList

public javax.swing.JList getJList()
Returns the JList.

Returns:

setText

public void setText(java.lang.Object text)
Sets the selected item to text

Parameters:
text - the string to be set

getSize

public int getSize()
Returns the length of the list.

Parameters:
boolean -

moveSelectedUp

public void moveSelectedUp()
Moves the selected item one position up.


moveSelectedDown

public void moveSelectedDown()
Moves the selected item one position up.


addItem

public int addItem(java.lang.Object obj)
Add an item to the list if it not exist yet.

Parameters:
text -
Returns:
the index of the item

removeItem

public int removeItem(java.lang.Object item)
Removes an item from the list.

Parameters:
text -
Returns:
the index of the item

clear

public void clear()
Remove all emelents of the list.


removeSelectedItem

public void removeSelectedItem()
Removes the selected item from the list.


setSelectedIndex

public void setSelectedIndex(int i)
Select index


remove

public void remove()
Removes all entries


init

protected void init()
Initialization of the SWING objects.

Overrides:
init in class JEComponent

setupComponent

public void setupComponent()
Set the property values to the component.

Overrides:
setupComponent in class JEComponent