public class TLcdFeaturedAerodrome extends TLcdAerodrome implements ILcdDefaultDisplayNameSettable
TLcdAISPoint
, and so it is required to set a
delegate point implementation using the setLocation()
method
before using the aerodrome object.TLcdAISPoint
,
Serialized FormAERODROME_TYPE_PROPERTY, COLLOCATED_AERODROMES_PROPERTY, LOCATION_PROPERTY
Constructor and Description |
---|
TLcdFeaturedAerodrome(ILcdEditableAerodrome aAerodrome)
Constructs a new
TLcdFeaturedAerodrome from an
ILcdFeatured or ILcdDataObject aerodrome. |
TLcdFeaturedAerodrome(int aNumberOfFeatures)
Deprecated.
|
TLcdFeaturedAerodrome(TLcdDataType aDataType)
Creates a new instance for the given type.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canSetFeature(int aIndex)
Checks whether the specified feature is editable.
|
String |
getDefaultDisplayName()
Returns the
String to be used to display
the ILcdDefaultDisplayNameSettable object. |
int |
getDefaultDisplayNameIndex()
Returns the current index of the feature to be uses in the display name.
|
Object |
getFeature(int aIndex)
Returns the feature
Object at the given index. |
int |
getFeatureCount()
Returns the number of features.
|
Object |
getValue(TLcdDataProperty aProperty)
Returns the value of the given property.
|
boolean |
hasValue(TLcdDataProperty aProperty)
Indicates whether this data object has a value for the given property.
|
void |
setDefaultDisplayNameIndex(int aDefaultDisplayNameIndex)
Sets the index of the feature to be used in the display name.
|
void |
setFeature(int aIndex,
Object aObject)
Sets the feature
Object at the given index. |
void |
setValue(TLcdDataProperty aProperty,
Object aValue)
Sets the value of the given property for this data object.
|
String |
toString() |
addCollocatedAerodrome, getAerodromeType, getCollocatedAerodrome, getCollocatedAerodromesCount, getDataType, getValue, hasValue, removeCollocatedAerodrome, setAerodromeType, setValue
clone, cloneAs2DEditablePoint, cloneAs3DEditablePoint, contains2D, contains2D, contains3D, contains3D, equals, getBounds, getCosX, getCosY, getFocusPoint, getSinX, getSinY, getTanX, getTanY, getX, getY, getZ, hashCode, move2D, move2D, move3D, move3D, setLocation, translate2D, translate3D
finalize, getClass, notify, notifyAll, wait, wait, wait
cloneAs2DEditablePoint, cloneAs3DEditablePoint, equals, getCosX, getCosY, getSinX, getSinY, getTanX, getTanY, getX, getY, getZ
move3D, move3D, translate3D
move2D, move2D, translate2D
contains2D, contains2D, contains3D, contains3D, getFocusPoint
getBounds
clone
@Deprecated public TLcdFeaturedAerodrome(int aNumberOfFeatures)
TLcdFeaturedAerodrome(TLcdDataType)
TLcdFeaturedAerodrome
. The user has to pass
on the number of features he wants this featured aerodrome to have.aNumberOfFeatures
- the number of features for the new objectpublic TLcdFeaturedAerodrome(ILcdEditableAerodrome aAerodrome)
TLcdFeaturedAerodrome
from an
ILcdFeatured
or ILcdDataObject
aerodrome. The new
object will contain the same properties and the same coordinates as the
given aerodrome object. In addition, it will have room for collocated
aerodromes as well.aAerodrome
- an implementation of ILcdFeatured
and
ILcdEditableAerodrome
.public TLcdFeaturedAerodrome(TLcdDataType aDataType)
aDataType
- the data type of the returned instanceIllegalArgumentException
- if TLcdAISDataTypes.Aerodrome
is not assignable from
the given data typeTLcdAISDataTypes.Aerodrome
public Object getFeature(int aIndex)
ILcdFeatured
Object
at the given index.getFeature
in interface ILcdFeatured
aIndex
- a valid feature index.Object
at the given index.ILcdFeatured.setFeature(int, java.lang.Object)
public void setFeature(int aIndex, Object aObject)
ILcdFeatured
Object
at the given index.setFeature
in interface ILcdFeatured
aIndex
- a valid feature index.aObject
- the new feature Object
.ILcdFeatured.getFeature(int)
,
ILcdFeatured.canSetFeature(int)
public int getFeatureCount()
ILcdFeatured
getFeatureCount
in interface ILcdFeatured
public boolean canSetFeature(int aIndex)
ILcdFeatured
canSetFeature
in interface ILcdFeatured
aIndex
- a valid feature index.public void setDefaultDisplayNameIndex(int aDefaultDisplayNameIndex)
ILcdDefaultDisplayNameSettable
setDefaultDisplayNameIndex
in interface ILcdDefaultDisplayNameSettable
aDefaultDisplayNameIndex
- a valid index in the list of featuresILcdDefaultDisplayNameSettable.getDefaultDisplayNameIndex()
public int getDefaultDisplayNameIndex()
ILcdDefaultDisplayNameSettable
getDefaultDisplayNameIndex
in interface ILcdDefaultDisplayNameSettable
ILcdDefaultDisplayNameSettable.setDefaultDisplayNameIndex(int)
public String getDefaultDisplayName()
ILcdDefaultDisplayNameSettable
String
to be used to display
the ILcdDefaultDisplayNameSettable
object.getDefaultDisplayName
in interface ILcdDefaultDisplayNameSettable
String
to be used to display
the ILcdDefaultDisplayNameSettable
objectpublic String toString()
toString
in class TLcdAerodrome
public Object getValue(TLcdDataProperty aProperty)
ILcdDataObject
Returns the value of the given property.
If the property is a collection, the returned value will never be null. If the property has not been set, an empty collection of the appropriate type will be returned (Set, List or Map).
The property must not be null, and must be declared in the data object's type
or in one of its super types.
Otherwise an IllegalArgumentException
is thrown.
getValue
in interface ILcdDataObject
getValue
in class TLcdAerodrome
aProperty
- the property for which the value is to be returnedpublic void setValue(TLcdDataProperty aProperty, Object aValue)
ILcdDataObject
Sets the value of the given property for this data object. The implementation is allowed to throw an exception if the given value can't be set.
The given property must be declared in thedata object's type
or in one of its super types. In
other words, getDataType().getProperties().contains( aProperty ) should always be true.
Otherwise, the implementation should throw an IllegalArgumentException
.setValue
in interface ILcdDataObject
setValue
in class TLcdAerodrome
aProperty
- the property for which the value is to be setaValue
- the value to setTLcdDataType.getProperty(String)
public boolean hasValue(TLcdDataProperty aProperty)
ILcdDataObject
aProperty
is from the right data type
, and this instance has a value for it: returns true
aProperty
is from the right data type
, and this instance has no value for it: returns false
aProperty
is not from the right data type
: not allowed, you will get IllegalArgumentExceptionaProperty
is null
: not allowed, you will get NullPointerExceptionhasValue
in interface ILcdDataObject
hasValue
in class TLcdAerodrome
aProperty
- the property for which to return whether a value is present or not.true
if this data object has a value for the given property, false
otherwise.