|
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.LySwingChoice
public class LySwingChoice
This class implements the Choice object (as described in the dtd) for Swing viewer.
An input field of Choice type allows to display a graphical component containing a set of check boxes. It allows to choose one or more values among a discrete list of values. It is possible to specify whether the choice is multiple or not and whether the boxes should be arranged horizontally or vertically.
LyChoice
Nested Class Summary | |
---|---|
class |
LySwingChoice._LyJChoicePanel
Represents a Swing panel containing the representation of the choice objects. |
class |
LySwingChoice._SpecialPanel
Special panel where its dimensions are based on those of another component. |
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
Constructor Summary | |
---|---|
LySwingChoice(LyChoice choice)
Class constructor of a choice object for the Swing target. |
Method Summary | |
---|---|
void |
addCheckBox(java.awt.Component checkbox,
LyOption option)
Adds a new checkbox with the given options to this current component. |
void |
addCheckBoxToGroup(java.awt.Component box)
Adds a checkbox to the checkbox group. |
void |
addChoiceToPanel(java.awt.Component choice)
Adds a choice element to the panel. |
java.lang.Object |
createCheckBoxGroup()
Creates and configures the object that manage a group of checkboxes (logically). |
java.awt.Container |
createChoicePanel(LyChoiceBase.Fill fill)
Creates and configures the panel that contains all the choices. |
java.lang.Object |
getCheckboxGroup()
Gets the checkbox group of the current component. |
java.awt.Component |
getComponent()
(non-Javadoc). |
java.lang.String |
getValue()
Gets the list of checkboxes that are selected. |
void |
initialize()
Initializes this component and creates a new checkbox group if it is a single choice object. |
boolean |
isChecked(java.awt.Component box)
Returns the state of a given box. |
void |
itemStateChanged(java.awt.event.ItemEvent e)
(non-Javadoc). |
void |
setChecked(java.awt.Component box,
boolean isChecked)
Checks or unchecks a checkbox or a group of checkboxes, depending on this choice object. |
void |
setContent()
Sets the content of this choice component. |
void |
setEditable(boolean editable)
Sets the editable status of all the choices elements of this component. |
void |
setEnabled(boolean status)
Sets the enabled status of all the choices elements of this component. |
void |
setFocus()
Sets the focus to this component. |
void |
setValue(java.lang.String value)
Sets or unsets the checkbox status of the specified elements. |
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 LySwingChoice(LyChoice choice)
choice
- a CHOICE component defined for every type of view targets. This choice
component is initialized specificaly for the Swing view.Method Detail |
---|
public java.lang.Object createCheckBoxGroup()
public void addCheckBoxToGroup(java.awt.Component box)
box
- the checkbox to add. It may be a JCheckBox
if the choices are multiple,
else a JRadioButton
.public java.awt.Container createChoicePanel(LyChoiceBase.Fill fill)
fill
- a short that specifies the way to place the choices
public void setChecked(java.awt.Component box, boolean isChecked)
box
- the checkbox to modifyisChecked
- the state to set for the specified checkboxpublic boolean isChecked(java.awt.Component box)
box
- the box to test
public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged
in interface java.awt.event.ItemListener
ItemListener.itemStateChanged(java.awt.event.ItemEvent)
public void addChoiceToPanel(java.awt.Component choice)
choice
- the choice to addpublic void initialize()
public void setContent()
public void setEditable(boolean editable)
setEditable
in interface LySetEditableInterface
editable
- new statusLySetEditableInterface.setEditable(boolean)
public void setEnabled(boolean status)
setEnabled
in interface LySetEnabledInterface
status
- new statusLySetEnabledInterface.setEnabled(boolean)
public void setFocus()
setFocus
in interface LySetFocusInterface
LySetFocusInterface.setFocus()
public java.lang.Object getCheckboxGroup()
public java.awt.Component getComponent()
getComponent
in interface LySwingComponent
getComponent
in class LySwingObject
LySwingComponent.getComponent()
public void addCheckBox(java.awt.Component checkbox, LyOption option)
checkbox
- the new checkbox component to addoption
- the options of the new checkboxpublic java.lang.String getValue()
getValue
in interface LyGetValueInterface
LyString.SEP
setValue(String)
public void setValue(java.lang.String value)
value
- the list of checkboxes to set their status. This list is a string separated with
LyString.SEP
of the checkboxes id to set. If null
, then
every checkbox is unselected.getValue()
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |