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

📄 floatcontrol.java

📁 java处理声音文件
💻 JAVA
字号:
/* *	FloatControl.java *//* *  Copyright (c) 1999 by Matthias Pfisterer <Matthias.Pfisterer@gmx.de> * * *   This program is free software; you can redistribute it and/or modify *   it under the terms of the GNU Library General Public License as published *   by the Free Software Foundation; either version 2 of the License, or *   (at your option) any later version. * *   This program 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 Library General Public License for more details. * *   You should have received a copy of the GNU Library General Public *   License along with this program; if not, write to the Free Software *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */package	javax.sound.sampled;public abstract class FloatControl	extends		Control{	private static final String	DEFAULT_TRUE_LABEL = "true";	private static final String	DEFAULT_FALSE_LABEL = "false";	private float		m_fValue;	private float		m_fMinimum;	private float		m_fMaximum;	private float		m_fPrecision;	private int		m_nUpdatePeriod;	private String		m_strUnits;	private String		m_strMinLabel;	private String		m_strMidLabel;	private String		m_strMaxLabel;	protected FloatControl(Type type,			       float fMinimum,			       float fMaximum,			       float fPrecision,			       int nUpdatePeriod,			       float fInitialValue,			       String strUnits,			       String strMinLabel,			       String strMidLabel,			       String strMaxLabel)	{		super(type);		m_fMinimum = fMinimum;		m_fMaximum = fMaximum;		m_fPrecision = fPrecision;		m_nUpdatePeriod = nUpdatePeriod;		setValue(fInitialValue);		m_nUpdatePeriod = nUpdatePeriod;		m_strMinLabel = strMinLabel;		m_strMidLabel = strMidLabel;		m_strMaxLabel = strMaxLabel;	}	protected FloatControl(Type type,			       float fMinimum,			       float fMaximum,			       float fPrecision,			       int nUpdatePeriod,			       float fInitialValue,			       String strUnits)	{		this(type,		     fMinimum,		     fMaximum,		     fPrecision,		     nUpdatePeriod,		     fInitialValue,		     strUnits,		     "Left",		     "Center",		     "Right");	}	public void setValue(float fValue)	{		m_fValue = fValue;	}	public float getValue()	{		return m_fValue;	}	public float getMaximum()	{		return m_fMaximum;	}	public float getMinimum()	{		return m_fMinimum;	}	public String getUnits()	{		return m_strUnits;	}	public String getMinLabel()	{		return m_strMinLabel;	}	public String getMidLabel()	{		return m_strMidLabel;	}	public String getMaxLabel()	{		return m_strMaxLabel;	}	public float getPrecision()	{		return m_fPrecision;	}	public int getUpdatePeriod()	{		return m_nUpdatePeriod;	}	public String toString()	{		return super.toString() + " [value = " + getValue() + "]";	}	public static class Type		extends	Control.Type	{		public static final Type	MASTER_GAIN = new Type("MASTER_GAIN");		public static final Type	AUX_SEND = new Type("AUX_SEND");		public static final Type	AUX_RETURN = new Type("AUX_RETURN");		public static final Type	REVERB_SEND = new Type("REVERB_SEND");		public static final Type	REVERB_RETURN = new Type("REVERB_RETURN");		public static final Type	VOLUME = new Type("VOLUME");		public static final Type	PAN = new Type("PAN");		public static final Type	BALANCE = new Type("BALANCE");		protected Type(String strName)		{			super(strName);		}	}}/*** FloatControl.java ***/

⌨️ 快捷键说明

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