org.objectweb.jac.aspects.gui
Class Utils

java.lang.Object
  extended byorg.objectweb.jac.aspects.gui.Utils

public class Utils
extends Object

A class with static methods to factorize code between display types (swing and web)


Constructor Summary
Utils()
           
 
Method Summary
static void registerCollection(Object object, CollectionItem collection, CollectionUpdate client)
          Register for the collection events of an object.
static void registerCollection(Object object, CollectionItem collection, CollectionUpdate client, Object param)
          Register for the collection events of an object.
static void registerCollection(Object object, String collectionName, CollectionUpdate client)
          Register for the collection events of an object.
static void registerField(Object object, FieldItem field, FieldUpdate client)
          Register field events for the field of an object.
static void registerField(Object object, FieldItem field, FieldUpdate client, Object param)
          Register field events for the field of an object (with parameters).
static void registerMethod(Object object, MethodItem method, MethodUpdate client)
          Register for method events.
static void registerMethod(Object object, MethodItem method, MethodUpdate client, Object param)
          Register for method events.
static void registerObject(Object object, ObjectUpdate client)
          Register object events for a single object.
static void registerObject(Object object, ObjectUpdate client, Object param)
          Register object events for a single object with extra parameters.
static URL stringToURL(String string)
          Converts a string into an URL
static void unregister(Object object, CollectionUpdate client)
          Unregister from an object's events.
static void unregisterCollection(Object object, CollectionItem collection, CollectionUpdate client)
          Unregister from a single object's collection.
static void unregisterCollection(Object object, String collectionName, CollectionUpdate client)
          Unregister from a single object's collection.
static void unregisterField(Object object, FieldItem field, FieldUpdate client)
          Unregister from a single object's field.
static void unregisterMethod(Object object, MethodItem method, MethodUpdate client)
          Unregister from a single object's method.
static void unregisterObject(Object object, ObjectUpdate client)
          Unregister from a single object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

stringToURL

public static URL stringToURL(String string)
Converts a string into an URL


registerObject

public static void registerObject(Object object,
                                  ObjectUpdate client)
Register object events for a single object.

Parameters:
object - the object that is listened to
client - the object that is notified for the events

registerObject

public static void registerObject(Object object,
                                  ObjectUpdate client,
                                  Object param)
Register object events for a single object with extra parameters.

Parameters:
object - the object that is listened to
client - the object that is notified for the events
param - extra info that can be passed to the event listeners

registerField

public static void registerField(Object object,
                                 FieldItem field,
                                 FieldUpdate client)
Register field events for the field of an object.

Parameters:
object - the object that owns the field
field - the field that is listened to
client - the object that is notified for the events

registerField

public static void registerField(Object object,
                                 FieldItem field,
                                 FieldUpdate client,
                                 Object param)
Register field events for the field of an object (with parameters).

Parameters:
object - the object that owns the field
field - the field that is listened to
client - the object that is notified for the events
param - extra info that can be passed to the event listeners

registerCollection

public static void registerCollection(Object object,
                                      CollectionItem collection,
                                      CollectionUpdate client)
Register for the collection events of an object.

Parameters:
object - the object that owns the collection
collection - the collection that is listened to
client - the object that is notified for the events

registerCollection

public static void registerCollection(Object object,
                                      String collectionName,
                                      CollectionUpdate client)
Register for the collection events of an object.

Parameters:
object - the object that owns the collection
collectionName - name the collection that is listened to
client - the object that is notified for the events

registerMethod

public static void registerMethod(Object object,
                                  MethodItem method,
                                  MethodUpdate client)
Register for method events. The client will be notified if the value returned by the method changes.

Parameters:
object - the object that owns the field
method - the method that is listened to
client - the object that is notified for the events

registerMethod

public static void registerMethod(Object object,
                                  MethodItem method,
                                  MethodUpdate client,
                                  Object param)
Register for method events. The client will be notified if the value returned by the method changes.

Parameters:
object - the object that owns the field
method - the method that is listened to
client - the object that is notified for the events
param - extra info that can be passed to the event listeners

registerCollection

public static void registerCollection(Object object,
                                      CollectionItem collection,
                                      CollectionUpdate client,
                                      Object param)
Register for the collection events of an object.

Parameters:
object - the object that owns the collection
collection - the collection that is listened to
client - the object that is notified for the events
param - extra info that can be passed to the event listeners

unregisterObject

public static void unregisterObject(Object object,
                                    ObjectUpdate client)
Unregister from a single object.


unregisterField

public static void unregisterField(Object object,
                                   FieldItem field,
                                   FieldUpdate client)
Unregister from a single object's field.

Parameters:
object - the object whose collection to unregister from
field - the field to unregister from
client - the client object unregister

unregisterCollection

public static void unregisterCollection(Object object,
                                        CollectionItem collection,
                                        CollectionUpdate client)
Unregister from a single object's collection.

Parameters:
object - the object whose collection to unregister from
collection - the collection to unregister from
client - the client object unregister

unregisterCollection

public static void unregisterCollection(Object object,
                                        String collectionName,
                                        CollectionUpdate client)
Unregister from a single object's collection.

Parameters:
object - the object whose collection to unregister from
collectionName - the name of the collection to unregister from
client - the client object to unregister

unregisterMethod

public static void unregisterMethod(Object object,
                                    MethodItem method,
                                    MethodUpdate client)
Unregister from a single object's method.

Parameters:
object - the object whose method to unregister from
method - the method to unregister from
client - the client object unregister

unregister

public static void unregister(Object object,
                              CollectionUpdate client)
Unregister from an object's events.

Parameters:
object - the object to unregister from
client - the client object to unregister