|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.view.graphic.LyGraphicalObject
leon.view.win.swing.LySwingObject
leon.view.win.swing.LySwingFieldItem
leon.view.win.swing.LySwingList
public class LySwingList
This class implements the List object (as described in the dtd) for swing viewer.
An input field of List type allows to choose one or more values among a discrete list of values. It is possible to specify if the selection is multiple or not as well as the height of the list.
LyList
Nested Class Summary | |
---|---|
class |
LySwingList._LyJCellRenderer
This class implements a customized renderer for list cell. |
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
Constructor Summary | |
---|---|
LySwingList(LyList list)
Class constructor of a List object for the Swing target. |
Method Summary | |
---|---|
void |
actionPerformed(LyActionEvent actionEvent)
(non-Javadoc). |
void |
addListOption(LyListOption item,
int pos)
Adds a list option at the given position. |
java.awt.Component |
createListComponent(boolean monoselection,
java.awt.Color selectionColor,
java.awt.Color inactiveSelectionColor)
Creates the component used to display this list. |
void |
fillList()
Fills this list component with the elements in the description. |
java.awt.Component |
getComponent()
Gets the swing component of this list. |
java.lang.Object[] |
getSelectedObjects(java.awt.Component listComponent)
Gets the list of selected elements in this list. |
java.lang.String |
getValue()
Returns the ids of the elements in this list. |
void |
initialize()
Builds the component and registers events. |
void |
removeListOption(LyListOption listOption)
Removes the given list option from this list. |
void |
selectionPerformed(LySelectionEvent selectionEvent)
Invoked when an selection occurs: the list component is refreshed. |
void |
selectListOption(java.lang.Object[] selectedOptions)
Selects the specified list elements in this list. |
void |
setContent()
Sets the content of this list. |
void |
setEditable(boolean editable)
Disabling is not implemented on Swing lists. |
void |
setEnabled(boolean enabled)
Sets the enable status of the field item. |
Methods inherited from class leon.view.win.swing.LySwingFieldItem |
---|
getActionTransmitter, getSelectionTransmitter |
Methods inherited from class leon.view.win.swing.LySwingObject |
---|
getBounds, getChildrenBounds, getDefaultFrame |
Methods inherited from class leon.view.graphic.LyGraphicalObject |
---|
expand, free, getController, getEnv, getEnvironment, getIdCode, getIntResource, getMessage, getMessage, getResource, getString, getString, getString, getViewComponent, getViewManager, isFreed, isFreeing, isImageAnimated, processDemand, processDemand, testResource, translate |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface leon.view.graphic.LyGraphicalComponent |
---|
free, getViewComponent |
Field Detail |
---|
public static final java.lang.String __VERSION
Constructor Detail |
---|
public LySwingList(LyList list)
list
- a LIST component defined for every type of view targets. This list is initialized
for the swing view and filled with the default values.Method Detail |
---|
public void initialize()
public java.awt.Component createListComponent(boolean monoselection, java.awt.Color selectionColor, java.awt.Color inactiveSelectionColor)
monoselection
- a boolean that specifies if this list allow mono or multi
selectionselectionColor
- the background color of selected optionsinactiveSelectionColor
- the color of the inactive selected options. This color is not
used in this implementation.
public void fillList()
public void selectListOption(java.lang.Object[] selectedOptions)
selectedOptions
- an array containing the LyListOption elements to set selectedgetSelectedObjects(Component)
public java.lang.Object[] getSelectedObjects(java.awt.Component listComponent)
listComponent
- the list component to get its selected objects
selectListOption(Object[])
,
JList.getSelectedValues()
public void setContent()
public java.awt.Component getComponent()
JScrollPane
which
preferred size is the same as its parent.
getComponent
in interface LySwingComponent
getComponent
in class LySwingObject
LySwingComponent.getComponent()
public void addListOption(LyListOption item, int pos)
addListOption
in interface LyGraphicalList
addListOption
in interface LySetListOptionsInterface
item
- the list option to addpos
- the position of the option in this listremoveListOption(LyListOption)
,
LyGraphicalList.addListOption(LyListOption, int)
public void removeListOption(LyListOption listOption)
removeListOption
in interface LyGraphicalList
removeListOption
in interface LySetListOptionsInterface
listOption
- the list option to removeaddListOption(LyListOption, int)
,
LyGraphicalList.removeListOption(LyListOption)
public void setEditable(boolean editable)
setEditable
in interface LySetEditableInterface
editable
- the new status, not used in this implementationLySetEditableInterface.setEditable(boolean)
public void setEnabled(boolean enabled)
setEnabled
in interface LySetEnabledInterface
enabled
- The new status.LySetEnabledInterface.setEnabled(boolean)
public java.lang.String getValue()
LyJListComponent.ITEM_SEP
.
getValue
in interface LyGetValueInterface
null
if there is noneLyGetValueInterface.getValue()
public void selectionPerformed(LySelectionEvent selectionEvent)
selectionPerformed
in interface LySelectionListener
selectionEvent
- description of the selection which has occuredLySelectionListener.selectionPerformed(LySelectionEvent)
public void actionPerformed(LyActionEvent actionEvent)
actionPerformed
in interface LyActionListener
LyActionListener.actionPerformed(LyActionEvent)
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |