com.inline.feature.common
Class AbstractFeatureConstructor
java.lang.Object
|
+--com.inline.feature.ui.AbstractDisplayable
|
+--com.inline.feature.common.AbstractFeatureConstructor
- Direct Known Subclasses:
- RandomFieldConstructor, SimpleFeatureConstructor
- public abstract class AbstractFeatureConstructor
- extends AbstractDisplayable
- implements FeatureConstructor
Recommended superclass for FeatureConstructors.
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
AbstractFeatureConstructor
public AbstractFeatureConstructor(Feature parent,
java.lang.String featureType)
getFeatureType
public java.lang.String getFeatureType()
getParentFeature
public Feature getParentFeature()
isDefault
public boolean isDefault()
- Calls
FeatureModel.isDefaultFeatureConstructor()
.
It is the feature model's responsibility to choose
between multiple constructors that could all be the default one. Overriding
implementations of this method must call super.isDefault() and
return false if it returns false.
- Specified by:
- isDefault in interface FeatureConstructor
- See Also:
FeatureModel.isDefaultFeatureConstructor(Feature,String,FeatureConstructor)
isEnabled
public boolean isEnabled()
- Calls
FeatureModel.isConstructorEnabled()
. Overriding
implementations of this method must call super.isEnabled() and
return false if it returns false.
- Specified by:
- isEnabled in interface FeatureConstructor
- See Also:
FeatureModel.isDefaultFeatureConstructor(Feature,String,FeatureConstructor)
isAddFeatureActionAllowed
public boolean isAddFeatureActionAllowed()
- Returns true.
- Specified by:
- isAddFeatureActionAllowed in interface FeatureConstructor
getDisplayType
public java.lang.String getDisplayType()
- Returns
"constructor." + featureType + '.' + getName()
- Overrides:
- getDisplayType in class AbstractDisplayable
getName
public java.lang.String getName()
- Returns null
- Specified by:
- getName in interface FeatureConstructor
constructAndInsert
public Feature constructAndInsert()
throws InvalidFeatureException
- Constructs and inserts a feature at once. It is implemented like this:
Feature feature = construct();
insert(feature);
return feature;
- Specified by:
- constructAndInsert in interface FeatureConstructor
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object