LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.info
Class LyUnit

java.lang.Object
  extended by leon.info.LyTag
      extended by leon.info.LyInfo
          extended by leon.info.LyUnit
All Implemented Interfaces:
java.lang.Cloneable, LyCommentInterface

public class LyUnit
extends LyInfo

This class defines a unit associated to a text, a number or a date field.


Nested Class Summary
 
Nested classes/interfaces inherited from class leon.info.LyTag
LyTag.Model
 
Field Summary
static java.lang.String __VERSION
           
 
Method Summary
 java.lang.String getAlias()
          Accessor for alias (shortname) of this unit.
 java.lang.Class<?> getConverterClass()
          Gets the class to convert.
 double getFactor()
          Gets the factor used when converting this unit to the reference one.
 LyFormat getFormat()
          Gets the display format used for presenting this unit.
 java.lang.String getInternalAlias()
          Accessor for alias (shortname) of this instance.
 java.lang.String getJavaName()
          Gets java class name for this unit.
 java.lang.String getName()
          Accessor for name of this unit.
 double getOffset()
          Gets the offset used when converting this unit to the reference one.
 java.lang.String getValue()
          Deprecated. Use getName()
 boolean hasEditionFormat()
          Checks if this unit has an edition format.
 boolean isPrint()
          Checks whether this unit is used for printing.
 
Methods inherited from class leon.info.LyInfo
getApplication, getFile, getId, getInclude, isIncluded, isInternal, isInternal, isLoaded, isLocked, load, setApplication, setFile, toString
 
Methods inherited from class leon.info.LyTag
clone, getCommentsEnd, getCommentsStart, getEnvironment, getModelType, getParent, getRootProject, hasAncestor, isExtern, setCommentsEnd, setCommentsStart, wasCloned
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface leon.parser.LyCommentInterface
getCommentsEnd, getCommentsStart, setCommentsEnd, setCommentsStart
 

Field Detail

__VERSION

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

getFactor

public double getFactor()
Gets the factor used when converting this unit to the reference one.

Returns:
Factor between this unit and the reference (1.0 is this unit is the reference).

getOffset

public double getOffset()
Gets the offset used when converting this unit to the reference one.

Returns:
Offset between this unit and the reference (0.0 is this unit is the reference).

getFormat

public LyFormat getFormat()
Gets the display format used for presenting this unit.

Returns:
Display format of this unit.

getName

public final java.lang.String getName()
Accessor for name of this unit.

Overrides:
getName in class LyInfo
Returns:
Name of this instance.

getAlias

public final java.lang.String getAlias()
Accessor for alias (shortname) of this unit.

Overrides:
getAlias in class LyInfo
Returns:
Alias of this unit. If the alias is null, this method returns the name.

getInternalAlias

public final java.lang.String getInternalAlias()
Accessor for alias (shortname) of this instance. This method doesn't compute a value if it is null.

Returns:
Alias of this instance.

isPrint

public final boolean isPrint()
Checks whether this unit is used for printing.

Returns:
True if this unit is used for printing, false otherwise.

getValue

public final java.lang.String getValue()
Deprecated. Use getName()

Gets value of the unit. Kept for upward compatibility.


getJavaName

public java.lang.String getJavaName()
Gets java class name for this unit. This is the name of java class used to convert this unit to the reference when the user selects this unit.

Returns:
Name of the java class for this unit.

getConverterClass

public java.lang.Class<?> getConverterClass()
Gets the class to convert.

Returns:
The class of the converter.

hasEditionFormat

public boolean hasEditionFormat()
Checks if this unit has an edition format. Format used to edit value from a simple string.


(c) January 2013 - W4 S.A.

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