com.inline.feature.example
Class RandomFieldConstructor
java.lang.Object
|
+--com.inline.feature.ui.AbstractDisplayable
|
+--com.inline.feature.common.AbstractFeatureConstructor
|
+--com.inline.feature.example.RandomFieldConstructor
- public class RandomFieldConstructor
- extends AbstractFeatureConstructor
Method Summary |
Feature |
construct()
Creates a new feature or features. |
java.lang.String |
getDisplayType()
Returns "constructor." + featureType + '.' + getName() |
java.lang.String |
getName()
Returns null |
void |
insert(Feature feature)
Call this method with a feature constructed using the same constructor
to insert it into the feature model. |
boolean |
isDefault()
Calls FeatureModel.isDefaultFeatureConstructor() . |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
NAME
public static final java.lang.String NAME
DISPLAY_TYPE
public static final java.lang.String DISPLAY_TYPE
RandomFieldConstructor
public RandomFieldConstructor(Feature feature)
getDisplayType
public java.lang.String getDisplayType()
- Description copied from class: AbstractFeatureConstructor
- Returns
"constructor." + featureType + '.' + getName()
- Overrides:
- getDisplayType in class AbstractFeatureConstructor
getName
public java.lang.String getName()
- Description copied from class: AbstractFeatureConstructor
- Returns null
- Overrides:
- getName in class AbstractFeatureConstructor
isDefault
public boolean isDefault()
- Description copied from class: AbstractFeatureConstructor
- 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.
- Overrides:
- isDefault in class AbstractFeatureConstructor
- Tags copied from class: AbstractFeatureConstructor
- See Also:
FeatureModel.isDefaultFeatureConstructor(Feature,String,FeatureConstructor)
construct
public Feature construct()
- Description copied from interface: FeatureConstructor
- Creates a new feature or features. You will need to call
insert(feature)
to actually add the feature to the feature model. If you choose not to insert it
into the model after all, call feature.release()
.
insert
public void insert(Feature feature)
throws InvalidFeatureException
- Description copied from interface: FeatureConstructor
- Call this method with a feature constructed using the same constructor
to insert it into the feature model. If the feature has children at this
point, all those features should be automatically inserted as well.
Call
featureModel.commit()
to make the new feature(s) persistent.