com.silvermindsoftware.hitch.annotations
Annotation Type BoundComponent


@Target(value=FIELD)
@Documented
@Retention(value=RUNTIME)
public @interface BoundComponent

BoundComponent to bind domain objects to Swing components

File-location:
BoundComponent
Last check-in date:
2009-08-04 13:59:45 +0200 (Di, 04. Aug 2009) by swismer for revision 3873

Optional Element Summary
 Class handler
          If specified.
 String[] handlerValues
          This is a set of string parameters that can be passed component handler.
 String modelId
          If specified.
 String property
           If specified.
 ReadOnly readOnly
          This attribute specifies whether a component is read only.
 Class type
           If specified.
 

type

public abstract Class type

If specified. This is the type the component value will be converted to before being set on the model object.

If not specified an attempt will be made to determine the type to be set based on the model objects getter return type or field type.

Returns:
Default:
void.class

property

public abstract String property

If specified. This is the property the component will be bound to on the model class.

If not specified an attempt will be made to find an identically named property on the model.

Returns:
Default:
"[default]"

modelId

public abstract String modelId
If specified. This is the id of the ModelObject that will be used when performing bindings.

If not it will use the default ModelObject

Returns:
Default:
"[default]"

handler

public abstract Class handler
If specified. This is a custom component handler that will be used to handle value extraction and setting of a component. If not specified the default class component handler will be used. void.class is used in this case because Java annotations does not provide a means to default a value to null.

Returns:
Default:
void.class

handlerValues

public abstract String[] handlerValues
This is a set of string parameters that can be passed component handler. These parameters need to be passed in the form of "[property]=[value]". You can pass as many property/value combos as you like. In order for the property/value to be useful your ComponentHandler must have compatible setters.

Returns:
Default:
""

readOnly

public abstract ReadOnly readOnly
This attribute specifies whether a component is read only. If read only is true the component will be updated during the updateForm but will not be accessed when performing an updateModel. If default is specified then the default behavior is used. This could be different for the type of component being bound. Currently JLabels are defaulted to be read-only.

Returns:
Default:
com.silvermindsoftware.hitch.ReadOnly.DEFAULT


Copyright © 2005-2011 ELCA. All Rights Reserved.