Package net.sf.freecol.common.option
Class AudioMixerOption
- java.lang.Object
- 
- net.sf.freecol.common.model.FreeColObject
- 
- net.sf.freecol.common.model.FreeColSpecObject
- 
- net.sf.freecol.common.option.AbstractOption<AudioMixerOption.MixerWrapper>
- 
- net.sf.freecol.common.option.AudioMixerOption
 
 
 
 
- 
- All Implemented Interfaces:
- java.lang.Cloneable,- java.lang.Comparable<FreeColObject>,- ObjectWithId,- Option<AudioMixerOption.MixerWrapper>
 
 public class AudioMixerOption extends AbstractOption<AudioMixerOption.MixerWrapper> Option for selecting an audio mixer.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classAudioMixerOption.MixerWrapperA wrapper for the mixer, including the Mixer.Info including a potentially null value.
 - 
Field SummaryFields Modifier and Type Field Description private static java.util.List<AudioMixerOption.MixerWrapper>audioMixersThe available audio mixers.static java.lang.StringAUTO_NAMEAutodetect the mixer?private static javax.sound.sampled.MixerAUTODETECTED_MIXERThe autodetected mixer.private static AudioMixerOption.MixerWrapperDEFAULT_MIXER_WRAPPERThe default mixer wrapper around the autodetected mixer.private static java.util.logging.Loggerloggerstatic java.lang.StringTAGprivate AudioMixerOption.MixerWrappervalueThe value of this option.- 
Fields inherited from class net.sf.freecol.common.option.AbstractOptionACTION_TAG, DEFAULT_VALUE_TAG, isDefined
 - 
Fields inherited from class net.sf.freecol.common.model.FreeColObjectARRAY_SIZE_TAG, DEFAULT_CLASS_INDEX, fcoComparator, ID_ATTRIBUTE_TAG, PARTIAL_ATTRIBUTE_TAG, VALUE_TAG
 
- 
 - 
Constructor SummaryConstructors Constructor Description AudioMixerOption(Specification specification)Creates a newAudioMixerOption.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description AudioMixerOptioncloneOption()Clone this option.java.util.List<AudioMixerOption.MixerWrapper>getChoices()Gets a list of the available audio mixers.private AudioMixerOption.MixerWrappergetMixerWrapperByName(java.lang.String name)Gets a mixer wrapper by name.AudioMixerOption.MixerWrappergetValue()Gets the value of this option.java.lang.StringgetXMLTagName()Get the serialization tag for this object.protected voidsetValue(java.lang.String valueString, java.lang.String defaultValueString)Sets the value of this option from the given string representation.voidsetValue(AudioMixerOption.MixerWrapper newValue)Sets the value of this option.java.lang.StringtoString()protected voidwriteAttributes(FreeColXMLWriter xw)Write the attributes of this object to a stream.- 
Methods inherited from class net.sf.freecol.common.option.AbstractOptiongenerateChoices, getEnabledBy, getGroup, isNullValueOK, readAttributes, readOption, setGroup, setValues
 - 
Methods inherited from class net.sf.freecol.common.model.FreeColSpecObjectcopyIn, getSpecification, setSpecification
 - 
Methods inherited from class net.sf.freecol.common.model.FreeColObjectaddAbility, addFeatures, addModifier, addPropertyChangeListener, addPropertyChangeListener, apply, apply, applyModifiers, applyModifiers, arrayKey, compareIds, compareTo, containsAbilityKey, containsModifierKey, copy, copy, copy, copy, copyInCast, dumpObject, equals, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAbilities, getAbilities, getAbilities, getAbilities, getClassIndex, getDefenceModifiers, getDisplayObject, getFeatureContainer, getFreeColObjectClass, getFreeColObjectClassByName, getGame, getId, getIdNumber, getIdType, getIdTypeByName, getModifiers, getModifiers, getModifiers, getModifiers, getObjectClassIndex, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getSortedAbilities, getSortedModifiers, getSuffix, getSuffix, hasAbility, hasAbility, hasAbility, hashCode, hasListeners, hasModifier, hasModifier, hasModifier, idEquals, invokeMethod, logFreeColObjects, readChild, readChildren, readFromXML, readFromXMLPartial, removeAbilities, removeAbility, removeFeatures, removeModifier, removeModifiers, removePropertyChangeListener, removePropertyChangeListener, save, save, save, save, serialize, serialize, serialize, serialize, setGame, setId, toXML, toXML, toXMLPartial, toXMLPartial, writeChildren
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface net.sf.freecol.common.ObjectWithIdgetId
 - 
Methods inherited from interface net.sf.freecol.common.option.OptionreadFromXML, toXML
 
- 
 
- 
- 
- 
Field Detail- 
loggerprivate static java.util.logging.Logger logger 
 - 
TAGpublic static final java.lang.String TAG - See Also:
- Constant Field Values
 
 - 
AUTO_NAMEpublic static final java.lang.String AUTO_NAME Autodetect the mixer?
 - 
AUTODETECTED_MIXERprivate static final javax.sound.sampled.Mixer AUTODETECTED_MIXER The autodetected mixer.
 - 
DEFAULT_MIXER_WRAPPERprivate static final AudioMixerOption.MixerWrapper DEFAULT_MIXER_WRAPPER The default mixer wrapper around the autodetected mixer.
 - 
audioMixersprivate static final java.util.List<AudioMixerOption.MixerWrapper> audioMixers The available audio mixers.
 - 
valueprivate AudioMixerOption.MixerWrapper value The value of this option.
 
- 
 - 
Constructor Detail- 
AudioMixerOptionpublic AudioMixerOption(Specification specification) Creates a newAudioMixerOption.- Parameters:
- specification- The- Specificationto refer to.
 
 
- 
 - 
Method Detail- 
getMixerWrapperByNameprivate AudioMixerOption.MixerWrapper getMixerWrapperByName(java.lang.String name) Gets a mixer wrapper by name.- Parameters:
- name- The mixer wrapper name.
- Returns:
- The mixer wrapper with the name given, or null if none.
 
 - 
getChoicespublic java.util.List<AudioMixerOption.MixerWrapper> getChoices() Gets a list of the available audio mixers.- Returns:
- The available mixers.
 
 - 
cloneOptionpublic AudioMixerOption cloneOption() Clone this option.- Specified by:
- cloneOptionin interface- Option<AudioMixerOption.MixerWrapper>
- Specified by:
- cloneOptionin class- AbstractOption<AudioMixerOption.MixerWrapper>
- Returns:
- A clone of this option.
 
 - 
getValuepublic final AudioMixerOption.MixerWrapper getValue() Gets the value of this option.- Specified by:
- getValuein interface- Option<AudioMixerOption.MixerWrapper>
- Specified by:
- getValuein class- AbstractOption<AudioMixerOption.MixerWrapper>
- Returns:
- The value of this Option.
 
 - 
setValuepublic final void setValue(AudioMixerOption.MixerWrapper newValue) Sets the value of this option.- Specified by:
- setValuein interface- Option<AudioMixerOption.MixerWrapper>
- Specified by:
- setValuein class- AbstractOption<AudioMixerOption.MixerWrapper>
- Parameters:
- newValue- The new value of this- Option.
 
 - 
setValueprotected void setValue(java.lang.String valueString, java.lang.String defaultValueString)Sets the value of this option from the given string representation. Both parameters must not be null at the same time. This method does nothing. Override it if the option has a suitable string representation.- Overrides:
- setValuein class- AbstractOption<AudioMixerOption.MixerWrapper>
- Parameters:
- valueString- The string representation of the value of this- Option.
- defaultValueString- The string representation of the default value of this- Option.
 
 - 
writeAttributesprotected void writeAttributes(FreeColXMLWriter xw) throws javax.xml.stream.XMLStreamException Write the attributes of this object to a stream. To be overridden if required by any object that has attributes and uses the toXML(FreeColXMLWriter, String) call.- Overrides:
- writeAttributesin class- AbstractOption<AudioMixerOption.MixerWrapper>
- Parameters:
- xw- The- FreeColXMLWriterto write to.
- Throws:
- javax.xml.stream.XMLStreamException- if there are any problems writing to the stream.
 
 - 
getXMLTagNamepublic java.lang.String getXMLTagName() Get the serialization tag for this object.- Specified by:
- getXMLTagNamein class- FreeColObject
- Returns:
- The tag.
 
 - 
toStringpublic java.lang.String toString() - Specified by:
- toStringin interface- Option<AudioMixerOption.MixerWrapper>
- Overrides:
- toStringin class- FreeColObject
 
 
- 
 
-