LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view
Class LyChoiceBase

java.lang.Object
  extended by leon.view.LyComponent
      extended by leon.view.LyFieldItem
          extended by leon.view.LyChoiceBase
All Implemented Interfaces:
LyGetIdInterface, LyUpdateViewContentInterface
Direct Known Subclasses:
LyChoice

public abstract class LyChoiceBase
extends LyFieldItem
implements LyGetIdInterface

The LyChoiceBase class is a generated Java implementation that corresponds to the element CHOICE of the descriptive grammar of the views (views.dtd). <CHOICE> : Input Field of Choice Type An input field of Choice type allows displaying a graphical component containing a set of check boxes. It allows choosing 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.

See Also:
LyFieldItem, See also tag CHOICE of grammar leon_views.dtd.

Nested Class Summary
static class LyChoiceBase.Fill
          Possible values for attribute 'fill'.
 
Nested classes/interfaces inherited from class leon.view.LyComponent
LyComponent.EventType
 
Field Summary
static java.lang.String __VERSION
           
 
Fields inherited from class leon.view.LyComponent
_nbComponents, INIT_RESOURCE_ID, INTERNAL_ID_SEP, REWRITING_MODE, SEP_ID
 
Constructor Summary
LyChoiceBase()
          Default constructor.
 
Method Summary
 void addOption(LyOption option)
          Adds a sub-component option.
 LyComponent cloneComponent()
          Method for cloning a component.
 java.lang.String getBean()
          Gets value of bean.
 java.lang.String getColor()
          Gets value of color.
 LyChoiceBase.Fill getFill()
          Gets value of fill.
static LyChoiceBase.Fill getFill(java.lang.String token)
          Utility method to get fill value from a string.
 java.lang.String getFont()
          Gets value of font.
 java.lang.String getFontColor()
          Gets value of fontColor.
 java.lang.String getId()
          Gets value of id.
 int getMaxSpan()
          Gets value of maxSpan.
 int getNCols()
          Gets value of nCols.
 int getNRows()
          Gets value of nRows.
 LyOption getOption(int i)
          Get sub-component Option of index i.
 int getOptionCount()
          Get sub-component Option count.
 LyChoice getTemplate()
          Gets value of template.
 void insertOption(LyOption option, int pos)
          Inserts a sub-component option at given position.
 boolean isDefaultColor()
          Checks whether the color attribute is valuated to the default value.
 boolean isDefaultFont()
          Checks whether the font attribute is valuated to the default value.
 boolean isDefaultFontColor()
          Checks whether the fontColor attribute is valuated to the default value.
 boolean isMultiple()
          Checks if value of attribute multiple is set.
 void setBean(java.lang.String bean)
          Initializes attribute bean to the given value.
 void setColor(java.lang.String color)
          Initializes attribute color to the given value.
 void setFill(LyChoiceBase.Fill fill)
          Initializes attribute fill to the given value.
 void setFont(java.lang.String font)
          Initializes attribute font to the given value.
 void setFontColor(java.lang.String fontColor)
          Initializes attribute fontColor to the given value.
 void setId(java.lang.String id)
          Initializes attribute id to the given value.
 void setMaxSpan(int maxSpan)
          Initializes attribute maxSpan to the given value.
 void setMultiple(boolean multiple)
          Initializes attribute multiple to the given value.
 void setNCols(int nCols)
          Initializes attribute nCols to the given value.
 void setNRows(int nRows)
          Initializes attribute nRows to the given value.
 void setTemplate(LyChoice template)
          Initializes attribute template to the given value.
 void writeXml(java.io.PrintWriter pw, boolean debug)
          Method to rewrite XML corresponding to this component.
 
Methods inherited from class leon.view.LyFieldItem
addBeanData, buildBean, free, getBeanComponent, getBeanData, getBeanDatas, getChild, getChildCount, getErrorMessage, getFieldValue, getValue, setBeanComponent, setBeanDatas, setFieldValue, setLabel, updateViewContent, validateInput
 
Methods inherited from class leon.view.LyComponent
addComponent, addData, addEventFunction, clearChildrenBounds, freeze, getBounds, getChildFromCache, getChildrenBounds, getComponent, getComponent, getComponent, getComponent, getComponent, getComponentAt, getComponentAt, getComponentByInternalId, getComponentByLabel, getComponents, getComponentWithModel, getData, getDatas, getEnvironment, getEventFunctions, getIdCode, getInternalId, getInternalView, getInternalView, getLock, getModel, getParent, getParentArea, getParentForm, getParentFormFieldId, getParentSplitter, getParentSplitter, getParentTab, getParentTab, getParentTabs, getParentTabs, getParentView, getRootController, getSetVisibleParent, getTag, getViewManager, isFreed, isFreeing, registerChildrenBounds, removeComponent, reset, resetChildrenCache, resetEventFunctions, setDatas, setInternalView, setVisible, useEventDefaultFunction, writeXml
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__VERSION

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

LyChoiceBase

public LyChoiceBase()
Default constructor.

Method Detail

getFill

public static final LyChoiceBase.Fill getFill(java.lang.String token)
Utility method to get fill value from a string.

Parameters:
token - Token string
Returns:
Fill value corresponding to this token

cloneComponent

public LyComponent cloneComponent()
Method for cloning a component.

Specified by:
cloneComponent in class LyComponent

getId

public java.lang.String getId()
Gets value of id.

Specified by:
getId in interface LyGetIdInterface
Overrides:
getId in class LyComponent
Returns:
value of id.

getTemplate

public LyChoice getTemplate()
Gets value of template.

Returns:
value of template.

isMultiple

public boolean isMultiple()
Checks if value of attribute multiple is set.

Returns:
true if multiple is set, false otherwise.

getFill

public LyChoiceBase.Fill getFill()
Gets value of fill.

Returns:
value of fill.

getMaxSpan

public int getMaxSpan()
Gets value of maxSpan.

Returns:
value of maxSpan.

getBean

public java.lang.String getBean()
Gets value of bean.

Overrides:
getBean in class LyFieldItem
Returns:
value of bean.

getFont

public java.lang.String getFont()
Gets value of font.

Returns:
value of font.

isDefaultFont

public boolean isDefaultFont()
Checks whether the font attribute is valuated to the default value.

Returns:
True if default, false otherwise.

getColor

public java.lang.String getColor()
Gets value of color.

Returns:
value of color.

isDefaultColor

public boolean isDefaultColor()
Checks whether the color attribute is valuated to the default value.

Returns:
True if default, false otherwise.

getFontColor

public java.lang.String getFontColor()
Gets value of fontColor.

Returns:
value of fontColor.

isDefaultFontColor

public boolean isDefaultFontColor()
Checks whether the fontColor attribute is valuated to the default value.

Returns:
True if default, false otherwise.

getNCols

public int getNCols()
Gets value of nCols.

Returns:
value of nCols.

getNRows

public int getNRows()
Gets value of nRows.

Returns:
value of nRows.

getOption

public LyOption getOption(int i)
Get sub-component Option of index i.

Parameters:
i - the index of the Option to get.
Returns:
sub-component Option of index i.

getOptionCount

public int getOptionCount()
Get sub-component Option count.

Returns:
sub-component Option count.

setId

public void setId(java.lang.String id)
Initializes attribute id to the given value.

Parameters:
id - New value of id.

setTemplate

public void setTemplate(LyChoice template)
Initializes attribute template to the given value.

Parameters:
template - New value of template.

setMultiple

public void setMultiple(boolean multiple)
Initializes attribute multiple to the given value.

Parameters:
multiple - Boolean indicating if attribute multiple is set or unset.

setFill

public void setFill(LyChoiceBase.Fill fill)
Initializes attribute fill to the given value.

Parameters:
fill - New value of fill.
Throws:
java.lang.IllegalArgumentException - if fill parameter is null.

setMaxSpan

public void setMaxSpan(int maxSpan)
Initializes attribute maxSpan to the given value.

Parameters:
maxSpan - New value of maxSpan.

setBean

public void setBean(java.lang.String bean)
Initializes attribute bean to the given value.

Overrides:
setBean in class LyFieldItem
Parameters:
bean - New value of bean.

setFont

public void setFont(java.lang.String font)
Initializes attribute font to the given value.

Parameters:
font - New value of font.

setColor

public void setColor(java.lang.String color)
Initializes attribute color to the given value.

Parameters:
color - New value of color.

setFontColor

public void setFontColor(java.lang.String fontColor)
Initializes attribute fontColor to the given value.

Parameters:
fontColor - New value of fontColor.

setNCols

public void setNCols(int nCols)
Initializes attribute nCols to the given value.

Parameters:
nCols - New value of nCols.

setNRows

public void setNRows(int nRows)
Initializes attribute nRows to the given value.

Parameters:
nRows - New value of nRows.

addOption

public void addOption(LyOption option)
Adds a sub-component option.

Parameters:
option - The option to add to options list.

insertOption

public void insertOption(LyOption option,
                         int pos)
Inserts a sub-component option at given position.

Parameters:
option - The option to add to options list.
pos - Position where the sub-component is inserted.

writeXml

public void writeXml(java.io.PrintWriter pw,
                     boolean debug)
Method to rewrite XML corresponding to this component.

Specified by:
writeXml in class LyComponent
Parameters:
pw - the printWriter on which the XML is written.
debug - true if debug mode (full dump).

(c) January 2013 - W4 S.A.

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