|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.implementation.AbstractNamedBean
jmri.implementation.AbstractAudio
public abstract class AbstractAudio
Base implementation of the Audio class.
Specific implementations will extend this base class.
Audio bean system names are always upper case.
JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
| Field Summary |
|---|
| Fields inherited from class jmri.implementation.AbstractNamedBean |
|---|
mSystemName, mUserName |
| Fields inherited from interface jmri.Audio |
|---|
AT, BUFFER, CMD_BIND_BUFFER, CMD_FADE_IN, CMD_FADE_OUT, CMD_INIT_FACTORY, CMD_LOAD_SOUND, CMD_PAUSE, CMD_PAUSE_TOGGLE, CMD_PLAY, CMD_PLAY_TOGGLE, CMD_RESET_POSITION, CMD_RESUME, CMD_REWIND, CMD_STOP, DECIMAL_PLACES, FADE_IN, FADE_NONE, FADE_OUT, LISTENER, MAX_DISTANCE, SOURCE, STATE_EMPTY, STATE_INITIAL, STATE_LOADED, STATE_MOVING, STATE_PLAYING, STATE_POSITIONED, STATE_STOPPED, UP |
| Fields inherited from interface jmri.NamedBean |
|---|
INCONSISTENT, UNKNOWN |
| Constructor Summary | |
|---|---|
AbstractAudio(String systemName)
Abstract constructor for new Audio with system name |
|
AbstractAudio(String systemName,
String userName)
Abstract constructor for new Audio with system name and user name |
|
| Method Summary | |
|---|---|
protected abstract void |
cleanUp()
Abstract method that concrete classes will implement to perform necessary cleanup routines. |
int |
getState()
Provide generic access to internal state. |
static float |
roundDecimal(float value)
Static method to round a float value to the number of decimal places defined by DECIMAL_PLACES. |
static float |
roundDecimal(float value,
double places)
Static method to round a float value to the specified number of decimal places |
void |
setState(int newState)
Provide generic access to internal state. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jmri.Audio |
|---|
getSubType, stateChanged |
| Constructor Detail |
|---|
public AbstractAudio(String systemName)
systemName - Audio object system name (e.g. IAS1, IAB4)
public AbstractAudio(String systemName,
String userName)
systemName - Audio object system name (e.g. IAS1, IAB4)userName - Audio object user name| Method Detail |
|---|
public int getState()
NamedBeanThis generally shouldn't be used by Java code; use the class-specific form instead. (E.g. getCommandedState in Turnout) This provided to make Jython script access easier to read.
getState in interface NamedBeanpublic void setState(int newState)
NamedBeanThis generally shouldn't be used by Java code; use the class-specific form instead. (E.g. setCommandedState in Turnout) This provided to make Jython script access easier to read.
setState in interface NamedBeanpublic String toString()
toString in class Objectprotected abstract void cleanUp()
public static float roundDecimal(float value,
double places)
value - float value to roundplaces - number of decimal places to round to
public static float roundDecimal(float value)
value - float value to round
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||