class WidgetFactory
extends AbstractFactory
Factory that accepts pre-existing widget instances of a restricted type.
| Modifiers | Name | Description |
|---|---|---|
protected boolean |
leaf |
Whether created nodes are treated as leaves. |
| Type | Name and description |
|---|---|
Class |
restrictedTypeAccepted runtime type for node values. |
| Constructor and description |
|---|
WidgetFactory(Class restrictedType, boolean leaf)Creates a new factory that accepts pre-existing widget instances of a restricted type. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
boolean |
isLeaf()Indicates whether nodes created by this factory accept children. |
|
Object |
newInstance(FactoryBuilderSupport builder, Object name, Object value, Map attributes)Creates the node handled by this factory. |
|
void |
setChild(FactoryBuilderSupport builder, Object parent, Object child)Attaches a child node to its parent. |
| Methods inherited from class | Name |
|---|---|
class AbstractFactory |
isHandlesNodeChildren, isLeaf, onFactoryRegistration, onHandleNodeAttributes, onNodeChildren, onNodeCompleted, setChild, setParent |
Accepted runtime type for node values.
Creates a new factory that accepts pre-existing widget instances of a restricted type.
restrictedType - the accepted widget typeleaf - whether created nodes are leaf nodesIndicates whether nodes created by this factory accept children.
Creates the node handled by this factory.
builder - the factory buildername - the node namevalue - the node valueattributes - the node attributesAttaches a child node to its parent.
builder - the factory builderparent - the parent nodechild - the child nodeCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.