intarsys runtime library

de.intarsys.tools.ui
Class UIComponent<M extends INotificationSupport,C,T>

java.lang.Object
  extended by de.intarsys.tools.ui.UIComponent<M,C,T>
Type Parameters:
M - The model object
C - The toolkit container class
T - The toolkit component class
All Implemented Interfaces:
IDisposable, INotificationObserver<M>, IArgsConfigurable, IComponentProvider<C,T>, IUIComponent<M,C,T>
Direct Known Subclasses:
UIWizard

public abstract class UIComponent<M extends INotificationSupport,C,T>
extends Object
implements IUIComponent<M,C,T>, IArgsConfigurable

Abstraction of an user interface component.

The UIComponent spans a hierarchical tree. Each UIComponent maps to a real toolkit interface component that gets realized upon calling "createComponent".

A UIComponent is associated with a model object via the INotificationObserver interface.


Constructor Summary
UIComponent()
           
UIComponent(IUIComponent<? extends INotificationSupport,C,T> parent)
           
 
Method Summary
 void configure(IArgs args)
           
 void createComponent(C parent)
          Create the associated toolkit component.
 void dispose()
           
 T getComponent()
          The associated toolkit component.
 IArgs getConfiguration()
           
 M getObservable()
          The observed object.
 IUIComponent getParent()
           
 boolean isDisposed()
           
 void setObservable(M observable)
          Assign the object to be observed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UIComponent

public UIComponent()

UIComponent

public UIComponent(IUIComponent<? extends INotificationSupport,C,T> parent)
Method Detail

configure

public void configure(IArgs args)
               throws ArgsConfigurationException
Specified by:
configure in interface IArgsConfigurable
Throws:
ArgsConfigurationException

createComponent

public final void createComponent(C parent)
Description copied from interface: IComponentProvider
Create the associated toolkit component. This is a factory method called by a container to create a concrete UI component.

Specified by:
createComponent in interface IComponentProvider<C,T>

dispose

public void dispose()
Specified by:
dispose in interface IDisposable

getComponent

public final T getComponent()
Description copied from interface: IComponentProvider
The associated toolkit component. This is not valid until after a call to createComponent.

Specified by:
getComponent in interface IComponentProvider<C,T>
Returns:
The associated toolkit component.

getConfiguration

public IArgs getConfiguration()

getObservable

public M getObservable()
Description copied from interface: INotificationObserver
The observed object.

Specified by:
getObservable in interface INotificationObserver<M extends INotificationSupport>
Returns:
The observed object.

getParent

public IUIComponent getParent()

isDisposed

public boolean isDisposed()
Specified by:
isDisposed in interface IDisposable

setObservable

public void setObservable(M observable)
Description copied from interface: INotificationObserver
Assign the object to be observed.

Specified by:
setObservable in interface INotificationObserver<M extends INotificationSupport>

intarsys runtime library

Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.