LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.win.swing
Class LySwingOption

java.lang.Object
  extended by leon.view.graphic.LyGraphicalObject
      extended by leon.view.win.swing.LySwingObject
          extended by leon.view.win.swing.LySwingOption
All Implemented Interfaces:
LyGraphicalComponent, LyGraphicalOption, LyViewComponent, LyFreeInterface, LySetEnabledInterface, LySwingComponent

public class LySwingOption
extends LySwingObject
implements LySwingComponent, LyGraphicalOption

This class implements the Option object (as described in the dtd) for swing viewer.

An option represents a possible value in an input field of Choice type. It can be represented by a check box (case of a multiple choice) or else by a radio button (case of a simple choice).

See Also:
LyOption

Field Summary
static java.lang.String __VERSION
           
 
Constructor Summary
LySwingOption(LyOption option)
          Class constructor of an Option object for the Swing target.
 
Method Summary
 java.awt.Component createCheckBox(java.lang.String label, boolean isChecked)
          Creates an option component.
 java.awt.Component getComponent()
          (non-Javadoc).
 void setChecked(boolean status)
          (non-Javadoc).
 void setContent()
          Sets the content of this component and enables it if necessary.
 void setEnabled(boolean status)
          Sets the enabled status of this number component.
 
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

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values
Constructor Detail

LySwingOption

public LySwingOption(LyOption option)
Class constructor of an Option object for the Swing target.

Parameters:
option - an OPTION component defined for every type of view targets. This number component is initialized specificaly for the Swing view.
Method Detail

setContent

public void setContent()
Sets the content of this component and enables it if necessary.


createCheckBox

public java.awt.Component createCheckBox(java.lang.String label,
                                         boolean isChecked)
Creates an option component. Depending on the parent multiple selection property, this option will be a check box or a radio button.

Parameters:
label - the label of this option
isChecked - the checked status of this option
Returns:
the new option component with the specified label and status

setChecked

public void setChecked(boolean status)
(non-Javadoc).

Specified by:
setChecked in interface LyGraphicalOption
Parameters:
status - Boolean indicating if attribute checked is set or unset.
See Also:
LyGraphicalOption.setChecked(boolean)

setEnabled

public void setEnabled(boolean status)
Sets the enabled status of this number component.

Specified by:
setEnabled in interface LyGraphicalOption
Specified by:
setEnabled in interface LySetEnabledInterface
Parameters:
status - Boolean indicating if attribute enabled is set or unset.
See Also:
LyGraphicalOption.setEnabled(boolean)

getComponent

public java.awt.Component getComponent()
(non-Javadoc).

Specified by:
getComponent in interface LySwingComponent
Overrides:
getComponent in class LySwingObject
Returns:
this Swing view component
See Also:
LySwingComponent.getComponent()

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com