com.im.ijc.core/1 5.9.4

com.im.ijc.core.api.renderers
Interface RendererFactory


public interface RendererFactory


Nested Class Summary
static interface RendererFactory.Registration
          Annotation to register RendererFactory instances.
static class RendererFactory.RendererType
          Type of renderer.
 
Field Summary
static int DEFAULT_NOT_SUITABLE_BUT_STILL_POSSIBLE
          This constant represent the least suitable value for renderers to be supported.
static int DEFAULT_SUPPORTED
          Default suitability for field.
static int UNSUPPORTED
          Not supported suitability for field.
 
Method Summary
 IJCWidgetTableCellRenderer createTableCellRenderer()
           
 IJCWidgetRenderer createWidgetRenderer()
           
 IJCWidgetTextRenderer createWidgetTextRenderer()
           
 int getSuitabilityFor(DFField field, RendererFactory.RendererType type)
          Test the suitability of renderers provided by this factory for the given field.
 

Field Detail

UNSUPPORTED

static final int UNSUPPORTED
Not supported suitability for field. The value is 0.

See Also:
Constant Field Values

DEFAULT_SUPPORTED

static final int DEFAULT_SUPPORTED
Default suitability for field. This is a default value which best IJC built-in renderer should provide. If you want to make your renderer default in any case then use value greater than this one. Currently it's set to 90.

See Also:
Constant Field Values

DEFAULT_NOT_SUITABLE_BUT_STILL_POSSIBLE

static final int DEFAULT_NOT_SUITABLE_BUT_STILL_POSSIBLE
This constant represent the least suitable value for renderers to be supported. Currently the value is set to 10. This value means that renderer can still render the field, but it's definitely not the best one. It should be used only if there is really no other more suitable renderer in the registry. This constant is used by IJC default built-in renderer factories. If you want to have your renderer in registry available for some fields, but not to be a default one (with pretty high probability) then use some value between UNSUPPORTED and this value. Then you'll be below least suitable IJC build-in renderer.

See Also:
Constant Field Values
Method Detail

getSuitabilityFor

int getSuitabilityFor(DFField field,
                      RendererFactory.RendererType type)
Test the suitability of renderers provided by this factory for the given field.

Parameters:
field - The field which we need the renderer for
type - One of the type from RendererFactory.RendererType enum constants
Returns:
The level of suitability of usage of this renderer for the given field. The returned value should be between 0 and 100 (0 = not supported, 100=the best renderer). See also UNSUPPORTED and DEFAULT_SUPPORTED.

createTableCellRenderer

IJCWidgetTableCellRenderer createTableCellRenderer()

createWidgetRenderer

IJCWidgetRenderer createWidgetRenderer()

createWidgetTextRenderer

IJCWidgetTextRenderer createWidgetTextRenderer()

com.im.ijc.core/1 5.9.4