Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.port80.util.attr
Interface IAttrFactory  view IAttrFactory download IAttrFactory.java

All Known Implementing Classes:
BooleanAttrFactory, ColorFactory, DoubleAttrFactory, FloatAttrFactory, FontFactory, IntAttrFactory, LongAttrFactory, PointFactory, RectFactory, StringAttrFactory

public interface IAttrFactory

Attribute factory interface provide methods for attribute creation, type conversion and user interface. . The attribute registry maintains a name->AttrFactory table. . The attribute type methods are used to serialize and de-serialize attributes.


Method Summary
 java.lang.Object createObject(java.lang.String name)
          Create an appropriate object from the String representation of the attribute.
 boolean isValid(java.lang.Object object)
          Check that given object is valid value for this factory.
 java.lang.Object promptUser(java.lang.String prompt)
          Prompt user and present a user interface to obtain an attribute value from user.
 java.lang.String toString()
          The String representation of attribute type itself.
 java.lang.String toString(java.lang.Object object)
          The String representation of an attribute value.
 

Method Detail

createObject

public java.lang.Object createObject(java.lang.String name)
Create an appropriate object from the String representation of the attribute.


isValid

public boolean isValid(java.lang.Object object)
Check that given object is valid value for this factory.


toString

public java.lang.String toString(java.lang.Object object)
The String representation of an attribute value.


toString

public java.lang.String toString()
The String representation of attribute type itself.


promptUser

public java.lang.Object promptUser(java.lang.String prompt)
Prompt user and present a user interface to obtain an attribute value from user.