| java.lang.Object com.sun.rave.propertyeditors.domains.Domain com.sun.rave.propertyeditors.domains.AttachedDomain com.sun.rave.propertyeditors.domains.EditableDomain
All known Subclasses: com.sun.rave.propertyeditors.domains.HtmlFrameTargetsDomain, com.sun.rave.propertyeditors.domains.CharacterSetsDomain, com.sun.rave.propertyeditors.domains.DateFormatPatternsDomain, com.sun.rave.propertyeditors.domains.MimeTypesDomain,
EditableDomain | abstract public class EditableDomain extends AttachedDomain (Code) | | Specialized domain which may be extended by the addition and re-ordering of
elements. Added elements and information about order are stored in one of
three contexts: the design context, the project context, or the IDE context.
By default, an editable domain contains only its pre-defined elements in
their pre-defined order. Any changes made are "permanent" within the context
defined by the domain. A storage context must be specified when an instance
of this class is created.
Editable domains impose the restriction that their elements must all
contain values of the same final type. This is in part to facilitate user
editing of values in the IDE, in part to make storage of elements more
predictable. A value class must be specified when an instance of this class
is created. Elements added whose value is not of this type will be rejected.
Nota Bene: Currently only the following value classes
will be stored correctly, due to limitations in the design-time support for
data storage:
java.lang.String
java.lang.Integer
java.util.Date
|
Inner Class :abstract static class StorageProxy | |
Inner Class :static class StringStorageProxy extends StorageProxy | |
Inner Class :static class IntegerStorageProxy extends StorageProxy | |
Inner Class :static class DateStorageProxy extends StorageProxy | |
Constructor Summary | |
protected | EditableDomain(int storageScope) Creates a new instance of ExtensibleDomain, for elements whose values
are of type java.lang.String , for which elements will be
stored in the scope specified. | protected | EditableDomain(int storageScope, Class elementValueClass) Creates a new instance of ExtensibleDomain, for elements whose values
are of the class specified, and for which elements will be stored in the
scope specified. |
DESIGN_CONTEXT_STORAGE | protected static int DESIGN_CONTEXT_STORAGE(Code) | | |
IDE_STORAGE | protected static int IDE_STORAGE(Code) | | |
PROJECT_STORAGE | protected static int PROJECT_STORAGE(Code) | | |
EditableDomain | protected EditableDomain(int storageScope)(Code) | | Creates a new instance of ExtensibleDomain, for elements whose values
are of type java.lang.String , for which elements will be
stored in the scope specified. If the storage scope constant is not
recognized, storage will default to the design context.
|
EditableDomain | protected EditableDomain(int storageScope, Class elementValueClass)(Code) | | Creates a new instance of ExtensibleDomain, for elements whose values
are of the class specified, and for which elements will be stored in the
scope specified. If the storage scope constant is not recognized, storage
will default to the design context.
|
addElement | public void addElement(Element element)(Code) | | Add an element to the end of this domain's list of elements.
|
addElementAt | public void addElementAt(int index, Element element)(Code) | | Add an element to this domain at the index specified. Elements at this
and subsequent indexes are all shifted "down" one to make room for the
new element.
|
appendEncoded | static void appendEncoded(StringBuffer buffer, String str)(Code) | | Utility method to encode a string by escaping "=", "," and "%" using HTTP-style
escape sequences.
|
decode | static String decode(String str)(Code) | | Utility method to decode a string by unescaping "=", "," and "%".
|
getElementAt | public Element getElementAt(int index)(Code) | | Returns the element at the index specified. If the index is out of bounds
or no element exists at the index specified, returns null.
|
getElementValueClass | public Class getElementValueClass()(Code) | | Returns the class of all element values in this domain. Normally, a domain
may contain elements of any value. Editable domains require that their
elements' values be all of the same type.
|
getElements | public Element[] getElements()(Code) | | Returns an array of the elements currently contained in this domain.
|
getSize | public int getSize()(Code) | | Returns the number of elements currently in this domain.
|
refreshStorageProxy | void refreshStorageProxy()(Code) | | |
removeElementAt | public Element removeElementAt(int index)(Code) | | Remove the element at the index specified, and return it. Subsequent
elements are shifted "up" one to vill the void. Returns null if there
is no element at the index specified, or if the index is out of bounds.
|
setDesignProperty | public void setDesignProperty(DesignProperty designProperty)(Code) | | Set the
DesignProperty with which this domain is associated,
and check for a previously stored proxy for this domain's elements. If
one is found, then update this domain's elements to reflect what was
found in storage.
Parameters: designProperty - The new associated DesignProperty |
setElementAt | public Element setElementAt(int index, Element element)(Code) | | Replace the element at the index specified with the element specified.
Returns the element previously at the index specified, null if there
wasn't one.
|
|
|