org.formaria.aria
Interface ComponentConstructor

All Known Implementing Classes:
EditorRegisteredComponentFactory, RegisteredComponentFactory, SwingComponentFactory, SwtComponentFactory

public interface ComponentConstructor

An interface for building components, used by and to extend componentFactory. This interface can be used to allow new component types to be instantiated by the component factory. Each instance of this interface should be registered with the component factory by calling the registerComponentFactory method. The registration is static so it does not matter what instance of the component factory is used.

Copyright (c) Formaria Ltd., 2008

License: see license.txt

$Revision: 2.6 $


Method Summary
 java.lang.Object addElement(ComponentFactory cf, java.lang.String type, java.lang.String name, java.lang.String content, java.util.Hashtable attribs)
          A generic factory method for adding non component elements.
 java.lang.Object constructComponent(ComponentFactory cf, java.lang.String type, java.lang.String content)
          A generic factory for adding Components.
 ComponentAdapter getComponentAdapter(java.lang.String type)
          Get the component adapter for this type
 void setPackageName(java.lang.String defPackage)
          Set the package name for the factory's widgets.
 void update()
          Notify the component factories that some of their settings may have changed
 

Method Detail

constructComponent

java.lang.Object constructComponent(ComponentFactory cf,
                                    java.lang.String type,
                                    java.lang.String content)
A generic factory for adding Components. The component is constructed, positioned and added to the parent panel if one exists. The component is named with a counter value to uniquely identify the control. When a ScrollPane is addd it becomes the parent.

Parameters:
cf - the calling component factory
type - a name identifying the type of component to be created
content - the component text/content
Returns:
the new component

addElement

java.lang.Object addElement(ComponentFactory cf,
                            java.lang.String type,
                            java.lang.String name,
                            java.lang.String content,
                            java.util.Hashtable attribs)
A generic factory method for adding non component elements.

Parameters:
cf - the calling component factory
type - the object type
name - a name identifying the element to be created
content - the component text/content
attribs - the element attributes if any
Returns:
the new component

update

void update()
Notify the component factories that some of their settings may have changed


setPackageName

void setPackageName(java.lang.String defPackage)
Set the package name for the factory's widgets.

Parameters:
defPackage - the default package name

getComponentAdapter

ComponentAdapter getComponentAdapter(java.lang.String type)
Get the component adapter for this type

Parameters:
type - the name identifying the type