|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttv.amwa.maj.argument.Fade
public class Fade
Implementation of a fade that used to collect together the audio fade properties of source clip segments into a single method argument and return value. These properties describe the length and type of audio fade ins and outs for a segment.
The fadeInLength
, fadeInType
, fadeOutLength
and
fadeOutType
properties of
source clip are deprecated in the AAF object
specification v1.1. The preferred way of specifying an audio fade is to use a
transition with an appropriate effect.
As this class is used as a convenient means to package up related values as arguments methods of other persistent classes, it has no persistent representation of its own.
SourceClip.setFade(tv.amwa.maj.record.Fade)
,
SourceClip.getFade()
,
FadeType
,
Serialized FormConstructor Summary | |
---|---|
Fade()
Create and initialize a fade description, which describe a fade associated with a source clip . |
|
Fade(long fadeInLength,
FadeType fadeInType,
long fadeOutLength,
FadeType fadeOutType)
Creates a new fade value using the given parameters. |
Method Summary | |
---|---|
Fade |
clone()
|
boolean |
equals(Object o)
|
long |
getFadeInLength()
Returns the fade in length of the fade. |
FadeType |
getFadeInType()
Returns the fade in type of the fade. |
long |
getFadeOutLength()
Returns the fade out length of the fade. |
FadeType |
getFadeOutType()
Returns the fade out type of the fade. |
int |
hashCode()
|
boolean |
isFadeInPresent()
Returns true if details of a fade in are
present in the fade; otherwise false . |
boolean |
isFadeOutPresent()
Returns true if details of a fade out
are present in the fade; otherwise false . |
void |
setFadeInLength(long fadeInLength)
Sets the fade in length of the fade. |
void |
setFadeInType(FadeType fadeInType)
Sets the fade in type of the fade. |
void |
setFadeOutLength(long fadeOutLength)
Sets the fade out length of the fade. |
void |
setFadeOutType(FadeType fadeOutType)
Sets the fade out type of the fade. |
void |
setPropertiesFromInterface(Fade castFrom)
Set the properties of this fade value from the given object that implements the fade interface. |
String |
toString()
Creates a pseudo-XML representation of this fade value, which is loosely based on the AAF XML generated for a source clip. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Fade()
Create and initialize a fade description, which describe a fade
associated with a source clip
. The class is initialized with no
fade in or fade out present and fade lengths set to 0.
public Fade(@LengthType long fadeInLength, FadeType fadeInType, @LengthType long fadeOutLength, FadeType fadeOutType) throws BadLengthException
Creates a new fade value using the given parameters.
Fade in and out lengths must be non-negative values, otherwise an bad length exception will be thrown.
If fade in or out types are set to null
then the fade in and out properties will be
set to not present respectively. For all non-null
values for fade in and out types, the
properties will be set to present.
fadeInLength
- Fade in length for this new fade.fadeInType
- Fade in type for this new fade.fadeOutLength
- Fade out length for this new fade.fadeOutType
- Fade out type for this new fade.
BadLengthException
- One or both of the given length values are negative.Method Detail |
---|
public final void setPropertiesFromInterface(Fade castFrom)
Set the properties of this fade value from the given object that implements the fade interface.
castFrom
- Object implementing the fade interface to cast a value from.@LengthType public long getFadeInLength() throws PropertyNotPresentException
Fade
Returns the fade in length of the fade. This is an optional property.
getFadeInLength
in interface Fade
PropertyNotPresentException
- This optional property is not present in the fade.public FadeType getFadeInType() throws PropertyNotPresentException
Fade
Returns the fade in type of the fade. This is an optional property.
getFadeInType
in interface Fade
PropertyNotPresentException
- This optional property
is not present in the fade.@LengthType public long getFadeOutLength() throws PropertyNotPresentException
Fade
Returns the fade out length of the fade. This is an optional property.
getFadeOutLength
in interface Fade
PropertyNotPresentException
- This optional property
is not present in the fade.public FadeType getFadeOutType() throws PropertyNotPresentException
Fade
Returns the fade out type of the fade. This is an optional property.
getFadeOutType
in interface Fade
PropertyNotPresentException
- This optional property
is not present in the fade.public boolean isFadeInPresent()
Fade
Returns true
if details of a fade in are
present in the fade; otherwise false
.
isFadeInPresent
in interface Fade
public boolean isFadeOutPresent()
Fade
Returns true
if details of a fade out
are present in the fade; otherwise false
.
isFadeOutPresent
in interface Fade
public void setFadeInLength(@LengthType long fadeInLength) throws BadLengthException
Fade
Sets the fade in length of the fade. This is an optional property that can be omitted
by calling setFadeInType(null)
.
setFadeInLength
in interface Fade
fadeInLength
- Fade in length of the fade.
BadLengthException
- Cannot set the fade in length to a negative value.public void setFadeInType(FadeType fadeInType)
Fade
Sets the fade in type of the fade. Set to null
to omit both this optional
property and the associated fade in length property.
setFadeInType
in interface Fade
fadeInType
- Fade in type of the fade.public void setFadeOutLength(@LengthType long fadeOutLength) throws BadLengthException
Fade
Sets the fade out length of the fade. This is an optional property that can be omitted
by calling setFadeOutType(null)
.
setFadeOutLength
in interface Fade
fadeOutLength
- Fade out length of the fade.
BadLengthException
- Cannot set the fade out length to a negative value.public void setFadeOutType(FadeType fadeOutType)
Fade
Sets the fade out type of the fade. Set to null
to omit both this optional
property and the associated fade out length property.
setFadeOutType
in interface Fade
fadeOutType
- Fade out type of the fade.public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public Fade clone()
clone
in class Object
public String toString()
Creates a pseudo-XML representation of this fade value, which is loosely based on the AAF XML generated for a source clip. No XML schema or DTD is defined. For example:
<Fade> <FadeInLength>34</FadeInLength> <FadeInType>LinearAmp</FadeInType> </Fade>
toString
in class Object
InterchangeObject.toString()
|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |