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 --+ | | | util.IEventListener --+ | | | terminal.paintable.IPaintable --+ | | | object --+ | | | | | terminal.variable_owner.IVariableOwner --+ | | | object --+ | | | | | terminal.sizeable.ISizeable --+ | | | component.IComponent --+ | | | component_container.IComponentContainer --+ | AbstractComponentContainer
Extension to AbstractComponent that defines the default implementation for the methods in IComponentContainer. Basic UI components that need to contain other components inherit this class to easily qualify as a component container.
Author: Vaadin Ltd.
Version: 1.1.2
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from |
|
|||
Inherited from Inherited from |
|
|||
Inherited from |
|
|||
Inherited from |
|
Constructs a new component container.
|
Removes all components from the container. This should probably be re-implemented in extending classes for a more powerful implementation. |
Moves all components from an another container into this container.
The components are removed from
|
Notifies all contained components that the container is attached to a window.
See Also: IComponent.attach |
Notifies all contained components that the container is detached from a window.
See Also: IComponent.detach |
Registers a new (generic) component event listener for the component: class Listening(CustomComponent, IListener): # Stored for determining the source of an event ok = None status = None # For displaying info about the event def __init__(self): layout = VerticalLayout() # Some miscellaneous component name = TextField("Say it all here") name.addListener(self) name.setImmediate(true) layout.addComponent(name) # Handle button clicks as generic events instead # of Button.ClickEvent events ok = new Button("OK") ok.addListener(self) layout.addComponent(ok) # For displaying information about an event status = new Label("") layout.addComponent(status) setCompositionRoot(layout) def componentEvent(event): # Act according to the source of the event if (event.getSource() == ok): getWindow().showNotification("Click!") status.setValue("Event from " + event.getSource().__class__.__name__ + ": " + event.__class__.__name__) listening = Listening() layout.addComponent(listening)
|
|
Removes a previously registered component event listener from this component.
|
|
Fires the component attached event. This should be called by the addComponent methods after the component have been added to this container.
|
Fires the component detached event. This should be called by the removeComponent methods after the component have been removed from this container.
|
This only implements the events and component parent calls. The extending classes must implement component list maintenance and call this method after component list maintenance.
See Also: IComponentContainer.addComponent |
This only implements the events and component parent calls. The extending classes must implement component list maintenance and call this method before component list maintenance.
See Also: IComponentContainer.removeComponent |
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
|
Sets the width of the object. Negative number implies unspecified size (terminal is free to set the size).
|
Sets the height of the object. Negative number implies unspecified size (terminal is free to set the size).
|
Causes a repaint of this component, and all components below it. This should only be used in special cases, e.g when the state of a descendant depends on the state of a ancestor.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Aug 31 14:06:38 2013 | http://epydoc.sourceforge.net |