LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.win.swing
Class LySwingFormField

java.lang.Object
  extended by leon.view.graphic.LyGraphicalObject
      extended by leon.view.win.swing.LySwingObject
          extended by leon.view.win.swing.LySwingFormField
All Implemented Interfaces:
LyActionListener, LyEventTransmitter, LySelectionListener, LyGraphicalComponent, LyGraphicalFieldItem, LyGraphicalFormField, LyGraphicalPanel, LyViewComponent, LyFreeInterface, LyResetContentInterface, LySetEditableInterface, LySetEnabledInterface, LySetFocusInterface, LySetHiddenInterface, LySetOptionalInterface, LySetStateInterface, LySwingComponent

public class LySwingFormField
extends LySwingObject
implements LySwingComponent, LyGraphicalFormField, LyActionListener, LySelectionListener, LyEventTransmitter, LyResetContentInterface, LySetFocusInterface

This class implements the internal description of a Field object as described in the dtd.

A field is contained in a form and allows to show or to input application data. It is principally made up of a label (optional) and an input field depending of the type of the data (text, number, date, color...). It is possible to associate a tool bar and a help entry to this field.

See Also:
LyFormField

Field Summary
static java.lang.String __VERSION
           
 
Constructor Summary
LySwingFormField(LyFormField formField)
          Class constructor of a Field object for the Swing target.
 
Method Summary
 void actionPerformed(LyActionEvent actionEvent)
          (non-Javadoc).
 java.awt.Container createPanel(java.awt.LayoutManager layout)
          Creates a panel.
 LyActionTransmitter getActionTransmitter()
          (non-Javadoc).
 java.awt.Component getCaptionComponent()
          Returns the current caption component.
 java.awt.Component getComponent()
          (non-Javadoc).
 java.awt.Component getFullComponent()
          Returns all the components of the current form.
 java.awt.Component getItemComponent()
          Returns the current item component.
 LySelectionTransmitter getSelectionTransmitter()
          (non-Javadoc).
 void resetContent()
          (non-Javadoc).
 void resetContent(boolean full)
          (non-Javadoc).
 void selectionPerformed(LySelectionEvent selectionEvent)
          (non-Javadoc).
 void setChecked(boolean checked)
          (non-Javadoc)
 void setContent()
          Sets the default content of the current field component.
 void setEditable(boolean editable)
          (non-Javadoc).
 void setEditable(boolean editable, boolean init)
          Sets the editable status of this field item.
 void setEnabled(boolean enabled)
          (non-Javadoc).
 void setEnabled(boolean enabled, boolean init)
          Sets the enabled status of this form field.
 void setFocus()
          Gives the focus to this formField.
 void setHidden(boolean hidden)
          (non-Javadoc).
 void setMessage(java.lang.String message)
          Updates attribute message to the given value.
 void setOptional(boolean optional)
          (non-Javadoc).
 void setState(short state)
          Sets the state of this field.
 void setToolBar(LyToolBar toolBar)
          Set the toolbar for the form field.
 
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

LySwingFormField

public LySwingFormField(LyFormField formField)
Class constructor of a Field object for the Swing target.

Parameters:
formField - a FIELD component defined for every type of view targets. This component is filled with the default values.
Method Detail

setContent

public void setContent()
Sets the default content of the current field component.


resetContent

public void resetContent()
(non-Javadoc).

Specified by:
resetContent in interface LyResetContentInterface
See Also:
LyResetContentInterface.resetContent()

resetContent

public void resetContent(boolean full)
(non-Javadoc).

Specified by:
resetContent in interface LyResetContentInterface
Parameters:
full - indicates whether old components must be removed from graphical view.
See Also:
LyResetContentInterface.resetContent(boolean)

setEditable

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

Parameters:
editable - new status
init - indicates if called by initialisation of the component. If true, the field toolbar is uneditable, if false, the toolbar follows the field status.

createPanel

public java.awt.Container createPanel(java.awt.LayoutManager layout)
Creates a panel.

Parameters:
layout - the LayoutManager to use
Returns:
a new panel with the specified layout manager

getCaptionComponent

public java.awt.Component getCaptionComponent()
Returns the current caption component.

Returns:
the caption component

getItemComponent

public java.awt.Component getItemComponent()
Returns the current item component.

Returns:
the item component

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

getFullComponent

public java.awt.Component getFullComponent()
Returns all the components of the current form. If this form field has a toolbar, the components are added to a new panel.

Returns:
the full form component

actionPerformed

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

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

selectionPerformed

public void selectionPerformed(LySelectionEvent selectionEvent)
(non-Javadoc).

Specified by:
selectionPerformed in interface LySelectionListener
Parameters:
selectionEvent - description of the selection which has occured
See Also:
LySelectionListener.selectionPerformed(leon.view.event.LySelectionEvent)

setEditable

public void setEditable(boolean editable)
(non-Javadoc).

Specified by:
setEditable in interface LyGraphicalFormField
Specified by:
setEditable in interface LySetEditableInterface
Parameters:
editable - Boolean indicating if attribute editable is set or unset.
See Also:
LySetEditableInterface.setEditable(boolean)

setOptional

public void setOptional(boolean optional)
(non-Javadoc).

Specified by:
setOptional in interface LyGraphicalFormField
Specified by:
setOptional in interface LySetOptionalInterface
Parameters:
optional - Boolean indicating if attribute optional is set or unset.
See Also:
LySetOptionalInterface.setOptional(boolean)

setState

public void setState(short state)
Sets the state of this field.

Specified by:
setState in interface LyGraphicalFormField
Specified by:
setState in interface LySetStateInterface
Parameters:
state - the state value that defines this field's foreground color. This is one of the following value:
See Also:
LySetStateInterface.setState(short)

setMessage

public void setMessage(java.lang.String message)
Updates attribute message to the given value.

Specified by:
setMessage in interface LyGraphicalFormField
Parameters:
message - New value of message.

setEnabled

public void setEnabled(boolean enabled)
(non-Javadoc).

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

setEnabled

public void setEnabled(boolean enabled,
                       boolean init)
Sets the enabled status of this form field.

Parameters:
enabled - new status
init - indicates if called by initialisation of the component

setChecked

public void setChecked(boolean checked)
(non-Javadoc)

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

setHidden

public void setHidden(boolean hidden)
(non-Javadoc).

Specified by:
setHidden in interface LyGraphicalFormField
Specified by:
setHidden in interface LySetHiddenInterface
Parameters:
hidden - Boolean indicating if attribute hidden is set or unset.
See Also:
LyGraphicalFormField.setHidden(boolean)

setToolBar

public void setToolBar(LyToolBar toolBar)
Set the toolbar for the form field.

Specified by:
setToolBar in interface LyGraphicalFormField
Parameters:
toolBar - New value of toolBar
See Also:
LyGraphicalFormField.setToolBar(LyToolBar)

getActionTransmitter

public LyActionTransmitter getActionTransmitter()
(non-Javadoc).

Specified by:
getActionTransmitter in interface LyEventTransmitter
Returns:
the action transmitter of this component
See Also:
LyEventTransmitter.getActionTransmitter()

getSelectionTransmitter

public LySelectionTransmitter getSelectionTransmitter()
(non-Javadoc).

Specified by:
getSelectionTransmitter in interface LyEventTransmitter
Returns:
the selection transmitter of this component
See Also:
LyEventTransmitter.getSelectionTransmitter()

setFocus

public void setFocus()
Gives the focus to this formField.

Specified by:
setFocus in interface LySetFocusInterface
See Also:
LySetFocusInterface.setFocus()

(c) January 2013 - W4 S.A.

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