|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.inline.feature.common.AbstractResourceListener | +--com.inline.feature.common.AbstractFeatureSet | +--com.inline.feature.common.AbstractTypedFeatureSet
Recommended superclass for FeatureSets handling Features of exactly one type.
Field Summary | |
protected java.lang.String |
type
|
Fields inherited from class com.inline.feature.common.AbstractResourceListener |
active,
featureModel,
parent,
resourceAdapters,
resourceSetAdapters,
revalidate |
Constructor Summary | |
AbstractTypedFeatureSet(Feature parent,
java.lang.String type)
|
Method Summary | |
protected void |
activate()
Refreshes the set and then keeps it in sync until the feature is passivated. |
protected abstract Feature |
allocateFeature(java.lang.String signature)
Override this method to allocate an instance of a Feature of the set's type. |
Feature |
allocateFeature(java.lang.String type,
java.lang.String signature)
Calls allocateFeature(signature) . |
boolean |
canChangeSet()
Override this to return false if the set is read-only. |
protected void |
featureAdded(Feature feature)
Called by getFeatures() when it discovers that a new
feature was added to the set. |
protected void |
featureRemoved(Feature feature)
Called by getFeatures() when it discovers that
a feature was removed from the set. |
protected void |
featureReplaced(Feature oldFeature,
Feature newFeature)
Called by getFeatures() when it discovers that one
feature was replaced by another one. |
Feature |
getFeature(java.lang.String type,
java.lang.String signature)
Looks up the feature with the specified parameters |
com.sun.java.util.collections.Set |
getFeatureConstructors()
Returns getFeatureConstructors(type) |
com.sun.java.util.collections.Set |
getFeatures()
Returns the set of all features for this set. |
com.sun.java.util.collections.Set |
getFeatures(java.lang.String type)
If the parameter matches this set's type, the method simply returns getFeatures() . |
protected abstract com.sun.java.util.collections.Set |
getFeatureSignatures()
Override this method to perform parsing of resources and build a set of signatures of all Features of the set's type found on the set's parent Feature. |
protected com.sun.java.util.collections.Set |
getPrimitiveFeatureConstructors(java.lang.String type)
Override to specify a set of primitive feature constructors. |
Feature[] |
getSortedFeatures()
Returns features sorted according to their DisplayProperty's preferences. |
java.lang.String |
getType()
Returns the type of Features supported by this set. |
void |
insert(Feature feature)
Inserts the supplied feature and all of its subfeatures into the model. |
protected boolean |
isDefaultPrimitiveFeatureConstructorAllowed()
Override and return false if the simple feature constructor that allocates a new empty feature should not be provided. |
boolean |
isEmpty()
This method exists for optimization purposes. |
protected void |
refresh()
Call this from canChangeSet() to assure that dependencies are registered. |
void |
release()
Releases all features in the set. |
protected void |
removeAll()
Removes all features from the set. |
void |
resourceAdded(ResourceSetAdapter source,
com.inline.resources.ResourceReference ref)
Event handler for resource set adapters. |
protected void |
resourceChanged(ResourceAdapter adapter,
java.lang.String property,
java.lang.Object oldValue,
java.lang.Object newValue)
Event handler for resource adapters. |
void |
resourceRemoved(ResourceSetAdapter source,
com.inline.resources.ResourceReference ref)
Event handler for resource set adapters. |
java.lang.String |
toString()
|
Methods inherited from class com.inline.feature.common.AbstractFeatureSet |
addFeatureSetListener,
fireFeatureAdded,
fireFeatureRemoved,
fireFeatureReplaced,
getDefaultFeatureConstructor,
getFeatureConstructor,
getFeatureConstructors,
removeFeatureSetListener,
shouldCheckHasChildren |
Methods inherited from class com.inline.feature.common.AbstractResourceListener |
getFeatureModel,
getParent,
invalidate,
passivate,
propertyChange,
registerDependencies,
registerResourceAdapter,
registerResourceAdapter,
registerResourceSetAdapter,
registerResourceSetAdapter,
unregisterResourceAdapter,
unregisterResourceSetAdapter |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected java.lang.String type
Constructor Detail |
public AbstractTypedFeatureSet(Feature parent, java.lang.String type)
Method Detail |
public java.lang.String getType()
protected void refresh()
protected abstract com.sun.java.util.collections.Set getFeatureSignatures()
public com.sun.java.util.collections.Set getFeatures(java.lang.String type)
getFeatures()
.public Feature getFeature(java.lang.String type, java.lang.String signature)
public com.sun.java.util.collections.Set getFeatures()
invalidate()
, the method
calls getFeatureSignatures()
and updates the set of Features
accordingly.public Feature[] getSortedFeatures()
DisplayProperties
protected void removeAll()
getFeatureSignatures()
is empty.public boolean isEmpty()
public Feature allocateFeature(java.lang.String type, java.lang.String signature)
allocateFeature(signature)
.protected abstract Feature allocateFeature(java.lang.String signature)
public boolean canChangeSet()
protected com.sun.java.util.collections.Set getPrimitiveFeatureConstructors(java.lang.String type)
isDefaultPrimitiveFeatureConstructorAllowed()
returns true.public com.sun.java.util.collections.Set getFeatureConstructors()
getFeatureConstructors(type)
protected boolean isDefaultPrimitiveFeatureConstructorAllowed()
public void insert(Feature feature)
public void release()
protected void featureReplaced(Feature oldFeature, Feature newFeature)
getFeatures()
when it discovers that one
feature was replaced by another one.protected void featureAdded(Feature feature)
getFeatures()
when it discovers that a new
feature was added to the set.protected void featureRemoved(Feature feature)
getFeatures()
when it discovers that
a feature was removed from the set.protected void activate()
AbstractFeature.addPropertyChangeListener(PropertyChangeListener)
,
AbstractFeatureSet.addFeatureSetListener(FeatureSetListener)
protected void resourceChanged(ResourceAdapter adapter, java.lang.String property, java.lang.Object oldValue, java.lang.Object newValue)
this.invalidate()
.public void resourceAdded(ResourceSetAdapter source, com.inline.resources.ResourceReference ref)
this.invalidate()
.public void resourceRemoved(ResourceSetAdapter source, com.inline.resources.ResourceReference ref)
this.invalidate()
.public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |