|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.view.graphic.LyGraphicalObject
leon.view.win.swing.LySwingObject
leon.view.win.swing.LySwingFieldItem
leon.view.win.swing.LySwingPanel
leon.view.win.swing.LySwingForm
public class LySwingForm
This class implements the Form object (as described in the dtd) for swing viewer.
A form allows to show a set of fields. This type of component is used to allow a user of an application to consult application data (non editable form) or else to input data (editable form).
The default arrangement of the fields inside a form is based on a grid of two columns comprising as many lines as there are fields. The first column contains the labels of the fields and the second one contains the input fields.
LyForm
Nested Class Summary | |
---|---|
class |
LySwingForm._LyJFormComponentAdapter
Handles component resize and checks if minimum sizes are valid. |
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
Constructor Summary | |
---|---|
LySwingForm(LyForm form)
Class constructor of a Footer object for the Swing target. |
Method Summary | |
---|---|
void |
actionPerformed(LyActionEvent actionEvent)
(non-Javadoc). |
void |
addField(LyFormField field,
java.util.Vector<leon.view.win.swing.LySwingForm._LyFormContent> content)
Adds the label/item couple to the layout and sets its display contraints. |
java.awt.GridBagConstraints |
buildConstraint(LyComponent comp,
LyConstraint requestedConstraint,
boolean isCaption)
Builds a contraint object for the layout for the specified label or component. |
java.awt.GridBagConstraints |
buildDefaultConstraint(LyComponent comp,
boolean isCaption)
Builds a contraint object for the layout of the specified label or component. |
java.awt.Container |
createFormPanel(java.awt.LayoutManager layout)
Creates the panel that contains the form fields. |
java.awt.Container |
createToolBarPanel()
Creates the panel for this form's toolbar. |
java.awt.Color |
getColor()
Gets the background color of this component. |
java.awt.Component |
getComponent()
(non-Javadoc). |
void |
initialize()
Initializes the current component with the default values. |
void |
resetContent()
(non-Javadoc). |
void |
resetContent(boolean full)
(non-Javadoc). |
void |
setContent()
Sets the content of this component. |
void |
setEditable(boolean editable)
Sets the editable status of this form. |
void |
setEditable(boolean editable,
boolean init)
Sets the editable status of this form. |
void |
setEnabled(boolean enabled)
Sets the enabled status of this form. |
void |
setEnabled(boolean enabled,
boolean init)
Sets the enabled status of this form. |
Methods inherited from class leon.view.win.swing.LySwingPanel |
---|
setPopupMenu |
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 |
---|
public static final java.lang.String __VERSION
Constructor Detail |
---|
public LySwingForm(LyForm form)
form
- a FORM component defined for every type of view targets. This component is
initialized specificaly for the Swing view.Method Detail |
---|
public java.awt.Container createFormPanel(java.awt.LayoutManager layout)
layout
- the layoutManager of the returned panel
public java.awt.Container createToolBarPanel()
public void initialize()
public java.awt.GridBagConstraints buildDefaultConstraint(LyComponent comp, boolean isCaption)
comp
- a component, not used in this implementationisCaption
- Applies constraints specific to the captions.
public java.awt.GridBagConstraints buildConstraint(LyComponent comp, LyConstraint requestedConstraint, boolean isCaption)
comp
- component to build the constraintsrequestedConstraint
- constraint object to apply on the componentisCaption
- Applies constraints specific to the captions.
public void addField(LyFormField field, java.util.Vector<leon.view.win.swing.LySwingForm._LyFormContent> content)
field
- label to addcontent
- component listpublic void setContent()
public void resetContent()
resetContent
in interface LyResetContentInterface
LyResetContentInterface.resetContent()
public void resetContent(boolean full)
resetContent
in interface LyResetContentInterface
full
- indicates whether old components must be removed from graphical view.LyResetContentInterface.resetContent(boolean)
public void actionPerformed(LyActionEvent actionEvent)
actionPerformed
in interface LyActionListener
LyActionListener.actionPerformed(leon.view.event.LyActionEvent)
public void setEditable(boolean editable)
setEditable
in interface LyGraphicalForm
setEditable
in interface LySetEditableInterface
editable
- Boolean indicating if attribute editable is set or unset.setEditable(boolean, boolean)
,
LySetEditableInterface.setEditable(boolean)
public void setEditable(boolean editable, boolean init)
editable
- new statusinit
- indicates if called by initialisation of the componentpublic void setEnabled(boolean enabled)
setEnabled
in interface LySetEnabledInterface
setEnabled(boolean, boolean)
,
LySetEnabledInterface.setEnabled(boolean)
public void setEnabled(boolean enabled, boolean init)
enabled
- new statusinit
- indicates if called by initialisation of the componentpublic java.awt.Component getComponent()
getComponent
in interface LySwingComponent
getComponent
in class LySwingObject
LySwingComponent.getComponent()
public java.awt.Color getColor()
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |