javax.rad.genui
Class UIResource<UI extends IResource>

java.lang.Object
  extended by javax.rad.genui.UIResource<UI>
Type Parameters:
UI - the corresponding UI Resource.
All Implemented Interfaces:
IResource
Direct Known Subclasses:
UICellFormat, UIComponent, UICursor, UIDimension, UIInsets, UILayout, UIPoint, UIRectangle

public abstract class UIResource<UI extends IResource>
extends java.lang.Object
implements IResource

Platform and technology independent wrapper for IFactory Resource.


Field Summary
protected  UI uiResource
          The IFactory Resource.
 
Constructor Summary
protected UIResource(UI pUIResource)
          Constructs a new UIResource.
 
Method Summary
 boolean equals(java.lang.Object pObject)
          
 ResourceHandler eventResourceChanged()
          Gets the resource changed event handler.
 ResourceHandler eventResourceChanged(java.lang.String pName)
          Gets the resource handler for a single parameter/object name.
protected  void fireResourceChanged(ResourceEvent.EventType pType, java.lang.String pName, java.lang.Object pOld, java.lang.Object pNew)
          Notifies all listeners about a change.
 java.lang.Object getObject(java.lang.String pObjectName)
          Get the specific Object.
 java.util.Collection<java.lang.String> getObjectNames()
          Gets a Collection of all object names that are currently stored as property on this resource.
 java.lang.Object getResource()
          Gets the original resource corresponding with this wrapper object.
 UI getUIResource()
          Gets the UI resource corresponding with this wrapper object.
 int hashCode()
          
protected  boolean hasResourceHandler()
          Gets whether the resource has at least one ResourceHandler.
 java.lang.Object putObject(java.lang.String pObjectName, java.lang.Object pObject)
          Puts the specific property.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

uiResource

protected UI extends IResource uiResource
The IFactory Resource.

Constructor Detail

UIResource

protected UIResource(UI pUIResource)
Constructs a new UIResource.

Parameters:
pUIResource - the IFactory Resource.
Method Detail

getResource

public java.lang.Object getResource()
Gets the original resource corresponding with this wrapper object.

Specified by:
getResource in interface IResource
Returns:
the original resource

equals

public boolean equals(java.lang.Object pObject)

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

getUIResource

public UI getUIResource()
Gets the UI resource corresponding with this wrapper object.

Returns:
the original resource

getObject

public java.lang.Object getObject(java.lang.String pObjectName)
Get the specific Object.

Parameters:
pObjectName - the property name.
Returns:
the property value.
See Also:
getObjectNames(), putObject(String, Object)

getObjectNames

public java.util.Collection<java.lang.String> getObjectNames()
Gets a Collection of all object names that are currently stored as property on this resource. Returns an empty Collection if there are no objects put. The returned Collection is a copy of the original collection of names.

Returns:
the Collection of all object names. If there are no objects put, returns an empty Collection.
See Also:
getObject(String), putObject(String, Object)

putObject

public java.lang.Object putObject(java.lang.String pObjectName,
                                  java.lang.Object pObject)
Puts the specific property.

Parameters:
pObjectName - the property name.
pObject - the property values.
Returns:
the old pObject.
See Also:
getObject(String), getObjectNames()

fireResourceChanged

protected void fireResourceChanged(ResourceEvent.EventType pType,
                                   java.lang.String pName,
                                   java.lang.Object pOld,
                                   java.lang.Object pNew)
Notifies all listeners about a change.

Parameters:
pType - the event type
pName - the parameter/object name
pOld - the old value
pNew - the new value

hasResourceHandler

protected boolean hasResourceHandler()
Gets whether the resource has at least one ResourceHandler.

Returns:
true if at least one resource handler is configured, false otherwise

eventResourceChanged

public ResourceHandler eventResourceChanged()
Gets the resource changed event handler.

Returns:
the handler

eventResourceChanged

public ResourceHandler eventResourceChanged(java.lang.String pName)
Gets the resource handler for a single parameter/object name.

Parameters:
pName - the parameter/object name
Returns:
the handler


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.