Base class for GXT components. All subclasses of Component can automatically participate in the standard GXT component lifecycle of creation, attach and detach. They also have automatic support for basic hide/show and enable/disable behavior. Component allows any subclass to be lazy-rendered into any GXT {@link Container}. Components added to a GWT {@link Panel} willbe rendered when inserted. All visual widgets that require rendering into a layout should subclass Component (or {@link BoxComponent} if managed boxmodel handling is required).
The following 4 methods inherited from UIObject (setSize, setWidth, setHeight, setPixelSize) have been overridden and do nothing. Any component whose size can change should subclass {@link BoxComponent}.
All components are registered and unregistered with the {@link ComponentManager} when the are attached and detached.
- Events:
- Enable : ComponentEvent(component)
Fires after the component is enabled.
- Disable : ComponentEvent(component)
Fires after the component is disabled.
- BeforeHide : ComponentEvent(component)
Fires before the component is hidden. Listeners can cancel the action by calling {@link BaseEvent#setCancelled(boolean)}.
- BeforeShow : ComponentEvent(component)
Fires before the component is shown. Listeners can cancel the action by calling {@link BaseEvent#setCancelled(boolean)}.
- Hide : ComponentEvent(component)
Fires after the component is hidden.
- Show : ComponentEvent(component)
Fires after the component is shown.
- Attach : ComponentEvent(component)
Fires after the component is attached.
- Detach : ComponentEvent(component)
Fires after the component is detached.
- BeforeRender : ComponentEvent(component)
Fires before the component is rendered. Listeners can cancel the action by calling {@link BaseEvent#setCancelled(boolean)}.
- Render : ComponentEvent(component)
Fires after the component is rendered.
- BrowserEvent : ComponentEvent(component, event)
Fires on any browser event the component receives. Listeners will be called prior to any event processing and before {@link #onComponentEvent(ComponentEvent)} is called. Listeners can call{@link BaseEvent#setCancelled(boolean)} to cancel the processing of theevent.
- component : this
- event : event
- BeforeStateRestore : ComponentEvent(component, state)
Fires before the state of the component is restored. Listeners can cancel the action by calling {@link BaseEvent#setCancelled(boolean)}.
- component : this
- state : the state values
- StateRestore : ComponentEvent(component, state)
Fires after the state of the component is restored.
- component : this
- state : map of state key / value pairs
- BeforeStateSave : ComponentEvent(component, state)
Fires before the state of the component is saved to the configured state provider. Listeners can cancel the action by calling {@link BaseEvent#setCancelled(boolean)}.
- component : this
- state : map of state key / value pairs
- StateSave : ComponentEvent(component, state)
Fires after the state of the component is saved to the configured state provider.
- component : this
- state : map of state key / value pairs
@see ComponentManager