Home | Trees | Indices | Help |
|
---|
|
object --+ | util.IEventListener --+ | terminal.paintable.IPaintable --+ | object --+ | | | terminal.variable_owner.IVariableOwner --+ | object --+ | | | terminal.sizeable.ISizeable --+ | component.IComponent --+ | object --+ | | | event.method_event_source.IMethodEventSource --+ | abstract_component.AbstractComponent --+ | object --+ | | | data.buffered.IBuffered --+ | | | object --+ | | | | | data.validatable.IValidatable --+ | | | data.buffered.IBufferedValidatable --+ | | | object --+ | | | | | data.property.IValueChangeNotifier --+ | | | object --+ | | | | | data.property.IValueChangeListener --+ | | | object --+ | | | | | data.property.IViewer --+ | | | | | data.property.IEditor --+ | | | object --+ | | | | | util.IEventListener --+ | | | | | terminal.paintable.IPaintable --+ | | | | | object --+ | | | | | | | terminal.variable_owner.IVariableOwner --+ | | | | | object --+ | | | | | | | terminal.sizeable.ISizeable --+ | | | | | component.IComponent --+ | | | | | component.IFocusable --+ | | | field.IField --+ | object --+ | | | event.action.IShortcutNotifier --+ | object --+ | | | data.property.IReadOnlyStatusChangeNotifier --+ | object --+ | | | data.property.IReadOnlyStatusChangeListener --+ | abstract_field.AbstractField --+ | object --+ | | | data.item.IViewer --+ | | | data.item.IEditor --+ | object --+ | | | data.buffered.IBuffered --+ | object --+ | | | data.item.IItem --+ | object --+ | | | data.validatable.IValidatable --+ | object --+ | | | event.action.IContainer --+ | | | event.action.INotifier --+ | Form
Form component provides easy way of creating and managing sets fields.
Form
is a container for fields implementing IField
interface. It provides support for any layouts and provides buffering
interface for easy connection of commit and discard buttons. All the form
fields can be customized by adding validators, setting captions and
icons, setting immediateness, etc. Also direct mechanism for replacing
existing fields with selections is given.
Form
provides customizable editor for classes
implementing IItem interface. Also the form itself implements this
interface for easier connectivity to other items. To use the form as
editor for an item, just connect the item to form with Form.setItemDataSource. If only a part of the item needs
to be edited, Form.setItemDataSource can be used instead. After the
item has been connected to the form, the automatically created fields can
be customized and new fields can be added. If you need to connect a class
that does not implement IItem interface, most properties of any class following
bean pattern, can be accessed trough
muntjac.data.util.BeanItem
.
Version: 1.1.2
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from |
|
|||
Inherited from |
|
|||
CLIENT_WIDGET = None hash(x) |
|||
Inherited from Inherited from |
|
|||
Inherited from |
|
Constructs a new form with given Layout and By default the form uses FormLayout.
|
Paints any needed component-specific things to the given UIDL stream. The more general paint method handles all general attributes common to all components, and it calls this method to paint any component-specific attributes to the UIDL stream.
|
Called when one or more variables handled by the implementing class are changed.
|
The error message of a Form is the error of the first field with a non-empty error. Empty error messages of the contained fields are skipped, because an empty error indicator would be confusing to the user, especially if there are errors that have something to display. This is also the reason why the calculation of the error message is separate from validation, because validation fails also on empty errors.
|
Controls the making validation visible implicitly on commit. Having commit() call setValidationVisible(True) implicitly is the default behaviour. You can disable the implicit setting by setting this property as false. It is useful, because you usually want to start with the form free of errors and only display them after the user clicks Ok. You can disable the implicit setting by setting this property as false.
|
Is validation made automatically visible on commit? See setValidationVisibleOnCommit().
|
Updates all changes since the previous commit to the data source. The
value stored in the object will always be updated into the data source
when
|
Discards all changes since last commit. The object updates its value from the data source.
|
Tests if the value stored in the object has been modified since it was last updated from the data source.
|
Tests if the object is in read-through mode. If the object is in read-through mode, retrieving its value will result in the value being first updated from the data source to the object. The only exception to this rule is that when the object is not in write-through mode and it's buffer contains a modified value, the value retrieved from the object will be the locally modified value in the buffer which may differ from the value in the data source.
|
Tests if the object is in write-through mode. If the object is in
write-through mode, all modifications to it will result in
|
Sets the object's read-through mode to the specified status. When switching read-through mode on, the object's value is updated from the data source.
|
Sets the object's write-through mode to the specified status. When
switching the write-through mode on, the
|
Adds a new property to form and create corresponding field.
See Also: IItem.addItemProperty |
Registers the field with the form and adds the field to the form layout. The property id must not be already used in the form. This field is added to the layout using the attachField method.
|
Register the field with the form. All registered fields are validated when the form is validated and also committed when the form is committed. The property id must not be already used in the form.
|
Adds the field to the form layout. The field is added to the form layout in the default position (the
position used by Override this method to control how the fields are added to the layout. |
The property identified by the property id. The property data source of the field specified with property id is returned. If there is a (with specified property id) having no data source, the field is returned instead of the data source.
See Also: IItem.getItemProperty |
Gets the field identified by the propertyid.
|
Gets the collection of IDs of all Properties stored in the IItem.
|
Removes the property and corresponding field from the form.
See Also: IItem.removeItemProperty |
Called when a form field is detached from a Form. Typically when a new IItem is assigned to Form via setItemDataSource. Override this method to control how the fields are removed from the layout.
|
Removes all properties and fields from the form.
|
Gets the IItem serving as the data source of the viewer.
|
Set the item datasource for the form, but limit the form contents to specified properties of the item. Setting item datasource clears any fields, the form might contain and adds the specified the properties as fields to the form, in the specified order.
See Also:
|
Gets the layout of the form. By default form uses
|
Sets the layout of the form. By default form uses
|
Sets the form field to be selectable from static list of changes. The list values and descriptions are given as array. The value-array must contain the current value of the field and the lengths of the arrays must match. Null values are not supported.
|
Notifies the component that it is connected to an application
See Also: IComponent.attach |
Notifies the component that it is detached from the application.
See Also: IComponent.detach |
Tests the current value of the object against all registered validators
See Also: IValidatable.isValid |
Checks the validity of the validatable.
See Also: IValidatable.validate |
Checks the validabtable object accept invalid values.
See Also: IValidatable.isInvalidAllowed |
Should the validabtable object accept invalid values.
See Also: IValidatable.setInvalidAllowed |
Sets the component's to read-only mode to the specified state.
See Also: IComponent.setReadOnly |
Sets the field factory of Form.
Deprecated: use setFormFieldFactory instead |
Sets the field factory used by this Form to genarate Fields for properties.
|
Get the field factory of the form.
|
Get the field factory of the form.
Deprecated: Use getFormFieldFactory instead. Set the FormFieldFactory using setFormFieldFactory. |
Gets the field type.
See Also: AbstractField.getType |
Sets the internal value. This is relevant when the Form is used as IField.
See Also: AbstractField.setInternalValue |
Gets the first focusable field in form. If there are enabled, non-read-only fields, the first one of them is returned. Otherwise, the field for the first property (or null if none) is returned.
|
Updates the internal form datasource. Method setFormDataSource. |
Returns the visibleProperties.
|
Sets the visibleProperties.
|
Focuses the first field in the form.
See Also: IFocusable.focus |
Sets the Tabulator index of this Focusable component.
See Also: IFocusable.setTabIndex |
Setting the form to be immediate also sets all the fields of the form to the same state.
|
Form is empty if all of its fields are empty.
|
Adding validators directly to form is not supported. Add the validators to form fields instead.
|
Returns a layout that is rendered below normal form contents. This area can be used for example to include buttons related to form contents.
|
Sets the layout that is rendered below normal form contents.
|
Enables or disables the component. The user can not interact disabled components, which are shown with a style that indicates the status, usually shaded in light gray color. Components are enabled by default. Children of a disabled component are automatically disabled; if a child component is explicitly set as disabled, changes in the disabled status of its parents do not change its status: enabled = new Button("Enabled") enabled.setEnabled(True) # the default layout.addComponent(enabled) disabled = Button("Disabled") disabled.setEnabled(False) layout.addComponent(disabled) This method will trigger a RepaintRequestEvent for the component and, if it is a
|
Gets the ActionManager responsible for handling Actions added to this Form. Note that Form has another ActionManager inherited from AbstractField. The ownActionManager handles Actions attached to this Form specifically, while the ActionManager in AbstractField delegates to the containing Window (i.e global Actions). |
Registers a new action handler for this container
|
Removes a previously registered action handler for the contents of this container.
|
|
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Apr 20 16:01:24 2013 | http://epydoc.sourceforge.net |