|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.base.Adaptee
org.norther.tammi.core.base.DefaultObjectFactory
org.norther.tammi.leaf.jfc.DefaultJFCFactory
public class DefaultJFCFactory
A default implementation of JFCFactory. The factory accepts either an explicit lookup resource bundle or a parent component as the second additional constructor parameter for component resources. Both of them require a widget name as the first constructor parameter to resolve resource names.
| Field Summary | |
|---|---|
static int |
DEFAULT_SPACING
The default spacing. |
static String |
TEXT
The text resource. |
static String |
TITLE
The title resource. |
static String |
TOOL_TIP_TEXT
The tool tip text resource. |
| Fields inherited from class org.norther.tammi.core.base.Adaptee |
|---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
| Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate |
|---|
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE |
| Constructor Summary | |
|---|---|
DefaultJFCFactory()
Constructs a new factory. |
|
| Method Summary | |
|---|---|
Border |
createEmptyBorder()
Creates an empty border of the size of the current spacing. |
Border |
createEmptyBorder(int top,
int left,
int bottom,
int right)
Creates an empty border of the specified size. |
Component |
createFiller(Dimension min,
Dimension pref,
Dimension max)
Creates a filler of the specified size. |
Component |
createGlue()
Creates glue. |
Component |
createHorizontalArea(int height)
Creates a horizontal area of the width of the current spacing. |
Component |
createHorizontalGlue()
Creates horizontal glue. |
Component |
createHorizontalStrut()
Creates a horizontal strut of the size of the current spacing. |
Component |
createRigidArea()
Creates a rigid area of the size of the current spacing. |
Component |
createRigidArea(Dimension dim)
Creates a rigid area with the specified dimensions. |
Component |
createRigidArea(int width,
int height)
Creates a rigid area of the specified size. |
Component |
createVerticalArea(int width)
Creates a vertical area of the height of the current spacing. |
Component |
createVerticalGlue()
Creates vertical glue. |
Component |
createVerticalStrut()
Creates a vertical strut of the size of the current spacing. |
protected Component |
findComponent(Component root,
String name,
String path,
boolean wildcard,
String className)
Finds the named component of the specified type. |
Component |
findComponent(Container parent,
String path)
Finds the named component under the specified parent. |
Component |
findComponent(Container parent,
String path,
String className)
Finds the named component of the specified type under the specified parent. |
Component |
findComponent(String path)
Finds the named component. |
Component |
findComponent(String path,
String className)
Finds the named component of the specified type. |
Object |
getInstance(String className,
ObjectName loader,
Object[] params,
String[] signature)
Gets an instance of a named class using a specified class loader. |
Object |
getInstance(String className,
ObjectName loader,
String name,
Container parent)
Gets a new JFC instance for a specified parent by applying the named class loader. |
Object |
getInstance(String className,
ObjectName loader,
String name,
Container parent,
Object[] params,
String[] signature)
Gets a new JFC instance for a specified parent by applying constructor parameters and the named class loader. |
Object |
getInstance(String className,
ObjectName loader,
String name,
LookupResourceBundle bundle)
Gets a new JFC instance with specified resources by applying the named class loader. |
Object |
getInstance(String className,
ObjectName loader,
String name,
LookupResourceBundle bundle,
Object[] params,
String[] signature)
Gets a new JFC instance with specified resources by applying constructor parameters and the named class loader. |
Object |
getInstance(String className,
String name,
Container parent)
Gets a new JFC instance for a specified parent. |
Object |
getInstance(String className,
String name,
Container parent,
Object[] params,
String[] signature)
Gets a new JFC instance for a specified parent by applying constructor parameters. |
Object |
getInstance(String className,
String name,
LookupResourceBundle bundle)
Gets a new JFC instance with specified resources. |
Object |
getInstance(String className,
String name,
LookupResourceBundle bundle,
Object[] params,
String[] signature)
Gets a new JFC instance with specified resources by applying constructor parameters. |
String |
getResource(String resource,
Component component,
Container parent)
Gets the specified resource of the named component from the resource hierarchy. |
String |
getResource(String resource,
Component component,
LookupResourceBundle bundle)
Gets the specified resource of the named component from the resource bundle. |
ObjectName |
getResourceFinderName()
Gets the the resource finder of this factory. |
int |
getSpacing()
Gets the current spacing between components. |
protected void |
loadResources(Object wid,
String name,
List bundles)
Loads resources of the specified widget. |
void |
postmanaged()
This method is called when the implementing adaptee has been managed either during post-registration of the corresponding adapter MBean or just after it is explicitly added to the adapter MBean during run-time. |
void |
resetSystemLookAndFeel()
Resets the system specific look-and-feel. |
void |
setResourceFinderName(ObjectName finder)
Sets the resource finder of this factory. |
void |
setSpacing(int space)
Sets the current spacing between components. |
void |
unmanaged()
This method is called when the implementing adaptee is unmanaged either during pre-deregistration of the corresponding adapter MBean or just before it is explicitly removed from the adapter MBean during run-time. |
| Methods inherited from class org.norther.tammi.core.base.DefaultObjectFactory |
|---|
getInstance, getInstance, getInstance, isLoaderSupported |
| Methods inherited from class org.norther.tammi.core.base.Adaptee |
|---|
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.norther.tammi.core.base.ObjectFactory |
|---|
getInstance, getInstance, getInstance, isLoaderSupported |
| Field Detail |
|---|
public static final String TITLE
public static final String TEXT
public static final String TOOL_TIP_TEXT
public static final int DEFAULT_SPACING
| Constructor Detail |
|---|
public DefaultJFCFactory()
| Method Detail |
|---|
public void postmanaged()
Manageable
postmanaged in interface Manageablepostmanaged in class Adaptee
public void unmanaged()
throws Exception
Manageable
unmanaged in interface Manageableunmanaged in class AdapteeException - if the adaptee refused to be unmanaged.public ObjectName getResourceFinderName()
JFCFactory
getResourceFinderName in interface JFCFactorypublic void setResourceFinderName(ObjectName finder)
JFCFactory
setResourceFinderName in interface JFCFactoryfinder - the object name of the resource finder or a query.
public String getResource(String resource,
Component component,
LookupResourceBundle bundle)
JFCFactory
getResource in interface JFCFactoryresource - the name of the resource.component - the named component.bundle - the resource bundle.
public String getResource(String resource,
Component component,
Container parent)
JFCFactory
getResource in interface JFCFactoryresource - the name of the resource.component - the named component.parent - the parent of the component.
public Object getInstance(String className,
String name,
Container parent)
throws ConstructionException
JFCFactory
getInstance in interface JFCFactoryclassName - the class name of the component.name - the name of the component.parent - the parent of the component.
ConstructionException - if construction fails.
public Object getInstance(String className,
String name,
LookupResourceBundle bundle)
throws ConstructionException
JFCFactory
getInstance in interface JFCFactoryclassName - the class name of the component.name - the name of the component.bundle - the resource bundle.
ConstructionException - if construction fails.
public Object getInstance(String className,
String name,
Container parent,
Object[] params,
String[] signature)
throws ConstructionException
JFCFactory
getInstance in interface JFCFactoryclassName - the class name of the component.name - the name of the component.parent - the parent of the component.params - the parameters.signature - the signature.
ConstructionException - if construction fails.
public Object getInstance(String className,
String name,
LookupResourceBundle bundle,
Object[] params,
String[] signature)
throws ConstructionException
JFCFactory
getInstance in interface JFCFactoryclassName - the class name of the component.name - the name of the component.bundle - the resource bundle.params - the parameters.signature - the signature.
ConstructionException - if construction fails.
public Object getInstance(String className,
ObjectName loader,
String name,
Container parent)
throws ConstructionException
JFCFactory
getInstance in interface JFCFactoryclassName - the class name of the component.loader - the class loader to apply.name - the name of the component.parent - the parent of the component.
ConstructionException - if construction fails.
public Object getInstance(String className,
ObjectName loader,
String name,
LookupResourceBundle bundle)
throws ConstructionException
JFCFactory
getInstance in interface JFCFactoryclassName - the class name of the component.loader - the class loader to apply.name - the name of the component.bundle - the resource bundle.
ConstructionException - if construction fails.
public Object getInstance(String className,
ObjectName loader,
String name,
Container parent,
Object[] params,
String[] signature)
throws ConstructionException
JFCFactory
getInstance in interface JFCFactoryclassName - the class name of the component.loader - the class loader to apply.name - the name of the component.parent - the parent of the component.params - the parameters.signature - the signature.
ConstructionException - if construction fails.
public Object getInstance(String className,
ObjectName loader,
String name,
LookupResourceBundle bundle,
Object[] params,
String[] signature)
throws ConstructionException
JFCFactory
getInstance in interface JFCFactoryclassName - the class name of the component.loader - the class loader to apply.name - the name of the component.bundle - the resource bundle.params - the parameters.signature - the signature.
ConstructionException - if construction fails.public int getSpacing()
JFCFactory
getSpacing in interface JFCFactorypublic void setSpacing(int space)
JFCFactory
setSpacing in interface JFCFactoryspace - the spacing.public Border createEmptyBorder()
JFCFactory
createEmptyBorder in interface JFCFactory
public Border createEmptyBorder(int top,
int left,
int bottom,
int right)
JFCFactory
createEmptyBorder in interface JFCFactorytop - the top width.left - the left width.bottom - the bottom width.right - the right width.
public Component createHorizontalStrut()
JFCFactory
createHorizontalStrut in interface JFCFactorypublic Component createVerticalStrut()
JFCFactory
createVerticalStrut in interface JFCFactorypublic Component createRigidArea()
JFCFactory
createRigidArea in interface JFCFactorypublic Component createRigidArea(Dimension dim)
JFCFactory
createRigidArea in interface JFCFactorydim - the dimensions.
public Component createRigidArea(int width,
int height)
JFCFactory
createRigidArea in interface JFCFactorywidth - the width.height - the height.
public Component createHorizontalArea(int height)
JFCFactory
createHorizontalArea in interface JFCFactoryheight - the height of the area.
public Component createVerticalArea(int width)
JFCFactory
createVerticalArea in interface JFCFactorywidth - the width of the area.
public Component createFiller(Dimension min,
Dimension pref,
Dimension max)
JFCFactory
createFiller in interface JFCFactorymin - the minimum size.pref - the preferred size.max - the maximum size.
public Component createGlue()
JFCFactory
createGlue in interface JFCFactorypublic Component createHorizontalGlue()
JFCFactory
createHorizontalGlue in interface JFCFactorypublic Component createVerticalGlue()
JFCFactory
createVerticalGlue in interface JFCFactory
public Object getInstance(String className,
ObjectName loader,
Object[] params,
String[] signature)
throws ConstructionException
ObjectFactoryClass loaders are supported only if the isLoaderSupported method returns true. Otherwise the loader parameter is ignored.
getInstance in interface ObjectFactorygetInstance in class DefaultObjectFactoryclassName - the name of the class.loader - the class loader.params - an array containing the parameters of the constructor.signature - an array containing the signature of the constructor.
ConstructionException - if construction fails.public Component findComponent(String path)
JFCFactory
findComponent in interface JFCFactorypath - the name path of the component.
public Component findComponent(String path,
String className)
JFCFactory
findComponent in interface JFCFactorypath - the name path of the component.className - the class name of the component.
public Component findComponent(Container parent,
String path)
JFCFactory
findComponent in interface JFCFactoryparent - the parent of the component.path - the name path of the component.
public Component findComponent(Container parent,
String path,
String className)
JFCFactory
findComponent in interface JFCFactoryparent - the parent of the component.path - the name path of the component.className - the class name of the component.
public void resetSystemLookAndFeel()
JFCFactory
resetSystemLookAndFeel in interface JFCFactory
protected Component findComponent(Component root,
String name,
String path,
boolean wildcard,
String className)
root - the root component.name - the name of the component.path - the name path of the parent.wildcard - the wildcard option.className - the class name of the component.
protected void loadResources(Object wid,
String name,
List bundles)
wid - the widget.name - the name of the widget.bundles - a list of resource bundles of the widget.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||