LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.win.swing
Class LySwingNumber

java.lang.Object
  extended by leon.view.graphic.LyGraphicalObject
      extended by leon.view.win.swing.LySwingObject
          extended by leon.view.win.swing.LySwingFieldItem
              extended by leon.view.win.swing.LySwingNumber
All Implemented Interfaces:
java.awt.event.KeyListener, java.util.EventListener, LyActionListener, LyEventTransmitter, LyGetLabelInterface, LyGraphicalComponent, LyGraphicalFieldItem, LyGraphicalNumber, LyViewComponent, LyFreeInterface, LySetEditableInterface, LySetEnabledInterface, LySetLabelInterface, LySetNumberInterface, LySwingComponent

public class LySwingNumber
extends LySwingFieldItem
implements LySwingComponent, LyActionListener, LySetEnabledInterface, LySetEditableInterface, LySetLabelInterface, LySetNumberInterface, LyGraphicalNumber, LyGetLabelInterface, java.awt.event.KeyListener

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

An input field of Number type allows to display a graphical component allowing to input or to consult a number value. It does not comprise any element. It is possible to specify the minimum and the maximum values, the incrementation step, the number of decimals and the unit.

See Also:
LyNumber

Field Summary
static java.lang.String __VERSION
           
 
Constructor Summary
LySwingNumber(LyNumber number)
          Class constructor of a Number object for the Swing target.
 
Method Summary
 void actionPerformed(LyActionEvent actionEvent)
          (non-Javadoc).
 java.awt.Component getComponent()
          (non-Javadoc).
 java.lang.String getLabel()
          Accessor to the label (LyGetLabelInterface interface).
 void keyPressed(java.awt.event.KeyEvent e)
           
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
           
 void setContent()
          Sets the content of this component.
 void setDecimals(int decimals)
          (non-Javadoc).
 void setEditable(boolean editable)
          Sets the editable status of the field item.
 void setEnabled(boolean status)
          Sets the enabled status of this number component.
 void setFormat(java.lang.String format)
          (non-Javadoc).
 void setLabel(java.lang.String label)
          Sets the label of this component, with the correct number of decimals.
 void setPitch(double pitch)
          (non-Javadoc).
 void setVMax(double vMax)
          (non-Javadoc).
 void setVMin(double vMin)
          (non-Javadoc).
 
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

__VERSION

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

LySwingNumber

public LySwingNumber(LyNumber number)
Class constructor of a Number object for the Swing target.

Parameters:
number - a NUMBER 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. Creates the LyJNumberSelector associated with this number description, sets its default values and registers the event listeners.


keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Specified by:
keyTyped in interface java.awt.event.KeyListener

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Specified by:
keyReleased in interface java.awt.event.KeyListener

setEditable

public void setEditable(boolean editable)
Sets the editable status of the field item.

Specified by:
setEditable in interface LySetEditableInterface
Parameters:
editable - the new editable status
See Also:
LySetEditableInterface.setEditable(boolean)

setEnabled

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

Specified by:
setEnabled in interface LySetEnabledInterface
See Also:
LySetEnabledInterface.setEnabled(boolean)

setLabel

public void setLabel(java.lang.String label)
Sets the label of this component, with the correct number of decimals.

Specified by:
setLabel in interface LyGraphicalNumber
Specified by:
setLabel in interface LySetLabelInterface
Parameters:
label - the new label
See Also:
LySetLabelInterface.setLabel(String)

getLabel

public java.lang.String getLabel()
Description copied from interface: LyGetLabelInterface
Accessor to the label (LyGetLabelInterface interface).

Specified by:
getLabel in interface LyGetLabelInterface

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()

actionPerformed

public void actionPerformed(LyActionEvent actionEvent)
(non-Javadoc).

Specified by:
actionPerformed in interface LyActionListener
See Also:
LyActionListener.actionPerformed(leon.view.event.LyActionEvent)

setFormat

public void setFormat(java.lang.String format)
(non-Javadoc).

Specified by:
setFormat in interface LyGraphicalNumber
Specified by:
setFormat in interface LySetNumberInterface
Parameters:
format - New value of format.
See Also:
LySetNumberInterface.setFormat(java.lang.String)

setVMin

public void setVMin(double vMin)
(non-Javadoc).

Specified by:
setVMin in interface LyGraphicalNumber
Specified by:
setVMin in interface LySetNumberInterface
Parameters:
vMin - New value of the minimum.
See Also:
LySetNumberInterface.setVMin(double)

setVMax

public void setVMax(double vMax)
(non-Javadoc).

Specified by:
setVMax in interface LyGraphicalNumber
Specified by:
setVMax in interface LySetNumberInterface
Parameters:
vMax - New value of maximum.
See Also:
LySetNumberInterface.setVMax(double)

setPitch

public void setPitch(double pitch)
(non-Javadoc).

Specified by:
setPitch in interface LyGraphicalNumber
Specified by:
setPitch in interface LySetNumberInterface
Parameters:
pitch - New value of pitch.
See Also:
LySetNumberInterface.setPitch(double)

setDecimals

public void setDecimals(int decimals)
(non-Javadoc).

Specified by:
setDecimals in interface LyGraphicalNumber
Specified by:
setDecimals in interface LySetNumberInterface
Parameters:
decimals - New value of the number of decimals.
See Also:
LySetNumberInterface.setDecimals(int)

(c) January 2013 - W4 S.A.

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