⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 audiodeviceenumerator.java

📁 JAVA3D矩陈的相关类
💻 JAVA
字号:
/* * $RCSfile: AudioDeviceEnumerator.java,v $ * * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. * * Use is subject to license terms. * * $Revision: 1.4 $ * $Date: 2007/02/09 17:17:50 $ * $State: Exp $ */package javax.media.j3d;import java.util.Enumeration;import java.util.NoSuchElementException;/** * The class that enumerates all AudioDevices defined in the environment *  * An AudioDeviceEnumerator generates the audio devices defined with the * execution environment of the currently running Java 3D application. */class AudioDeviceEnumerator implements Enumeration {    boolean endOfList;  // NOTE: list length always equals one or zero    AudioDevice device;    AudioDeviceEnumerator(PhysicalEnvironment physicalEnvironment) {        device = physicalEnvironment.getAudioDevice();        if(device == null)            endOfList = true;        else             endOfList = false;    }    void reset() {        if(device != null)             endOfList = false;    }          /**       * Query that tells whether the enumerator has more elements     * @return true if the enumerator has more elements, false otherwise     */      public boolean hasMoreElements() {        if(endOfList == false)             return true;        else             return false;    }       /**       * Return the next element in the enumerators     * @return the next element in this enumerator     */      public Object nextElement() {        if (this.hasMoreElements()) {            endOfList = true;            return ((Object) device);        } else {            throw new NoSuchElementException(J3dI18N.getString("AudioDeviceEnumerator0"));        }    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -