Java Doc for FloatControl.java in  » 6.0-JDK-Core » sound » javax » sound » sampled » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » sound » javax.sound.sampled 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.sound.sampled.Control
      javax.sound.sampled.FloatControl

FloatControl
abstract public class FloatControl extends Control (Code)
A FloatControl object provides control over a range of floating-point values. Float controls are often represented in graphical user interfaces by continuously adjustable objects such as sliders or rotary knobs. Concrete subclasses of FloatControl implement controls, such as gain and pan, that affect a line's audio signal in some way that an application can manipulate. The FloatControl.Type inner class provides static instances of types that are used to identify some common kinds of float control.

The FloatControl abstract class provides methods to set and get the control's current floating-point value. Other methods obtain the possible range of values and the control's resolution (the smallest increment between returned values). Some float controls allow ramping to a new value over a specified period of time. FloatControl also includes methods that return string labels for the minimum, maximum, and midpoint positions of the control.
See Also:   Line.getControls
See Also:   Line.isControlSupported
author:
   David Rivas
author:
   Kara Kytle
version:
   1.23, 07/05/05
since:
   1.3


Inner Class :public static class Type extends Control.Type


Constructor Summary
protected  FloatControl(Type type, float minimum, float maximum, float precision, int updatePeriod, float initialValue, String units, String minLabel, String midLabel, String maxLabel)
    
protected  FloatControl(Type type, float minimum, float maximum, float precision, int updatePeriod, float initialValue, String units)
     Constructs a new float control object with the given parameters.

Method Summary
public  StringgetMaxLabel()
    
public  floatgetMaximum()
     Obtains the maximum value permitted.
public  StringgetMidLabel()
    
public  StringgetMinLabel()
    
public  floatgetMinimum()
     Obtains the minimum value permitted.
public  floatgetPrecision()
     Obtains the resolution or granularity of the control, in the units that the control measures.
public  StringgetUnits()
    
public  intgetUpdatePeriod()
     Obtains the smallest time interval, in microseconds, over which the control's value can change during a shift.
public  floatgetValue()
     Obtains this control's current value.
public  voidsetValue(float newValue)
     Sets the current value for the control.
public  voidshift(float from, float to, int microseconds)
     Changes the control value from the initial value to the final value linearly over the specified time period, specified in microseconds. This method returns without blocking; it does not wait for the shift to complete.
public  StringtoString()
    


Constructor Detail
FloatControl
protected FloatControl(Type type, float minimum, float maximum, float precision, int updatePeriod, float initialValue, String units, String minLabel, String midLabel, String maxLabel)(Code)
Constructs a new float control object with the given parameters
Parameters:
  type - the kind of control represented by this float control object
Parameters:
  minimum - the smallest value permitted for the control
Parameters:
  maximum - the largest value permitted for the control
Parameters:
  precision - the resolution or granularity of the control.This is the size of the increment between discrete valid values.
Parameters:
  updatePeriod - the smallest time interval, in microseconds, over which the controlcan change from one discrete value to the next during a FloatControl.shift(float,float,int) shift
Parameters:
  initialValue - the value that the control starts with when constructed
Parameters:
  units - the label for the units in which the control's values are expressed,such as "dB" or "frames per second"
Parameters:
  minLabel - the label for the minimum value, such as "Left" or "Off"
Parameters:
  midLabel - the label for the midpoint value, such as "Center" or "Default"
Parameters:
  maxLabel - the label for the maximum value, such as "Right" or "Full"



FloatControl
protected FloatControl(Type type, float minimum, float maximum, float precision, int updatePeriod, float initialValue, String units)(Code)
Constructs a new float control object with the given parameters. The labels for the minimum, maximum, and mid-point values are set to zero-length strings.
Parameters:
  type - the kind of control represented by this float control object
Parameters:
  minimum - the smallest value permitted for the control
Parameters:
  maximum - the largest value permitted for the control
Parameters:
  precision - the resolution or granularity of the control.This is the size of the increment between discrete valid values.
Parameters:
  updatePeriod - the smallest time interval, in microseconds, over which the controlcan change from one discrete value to the next during a FloatControl.shift(float,float,int) shift
Parameters:
  initialValue - the value that the control starts with when constructed
Parameters:
  units - the label for the units in which the control's values are expressed,such as "dB" or "frames per second"




Method Detail
getMaxLabel
public String getMaxLabel()(Code)
Obtains the label for the maximum value, such as "Right" or "Full." the maximum value label, or a zero-length string if no label * has been set



getMaximum
public float getMaximum()(Code)
Obtains the maximum value permitted. the maximum allowable value



getMidLabel
public String getMidLabel()(Code)
Obtains the label for the mid-point value, such as "Center" or "Default." the mid-point value label, or a zero-length string if no label * has been set



getMinLabel
public String getMinLabel()(Code)
Obtains the label for the minimum value, such as "Left" or "Off." the minimum value label, or a zero-length string if no label * has been set



getMinimum
public float getMinimum()(Code)
Obtains the minimum value permitted. the minimum allowable value



getPrecision
public float getPrecision()(Code)
Obtains the resolution or granularity of the control, in the units that the control measures. The precision is the size of the increment between discrete valid values for this control, over the set of supported floating-point values. the control's precision



getUnits
public String getUnits()(Code)
Obtains the label for the units in which the control's values are expressed, such as "dB" or "frames per second." the units label, or a zero-length string if no label



getUpdatePeriod
public int getUpdatePeriod()(Code)
Obtains the smallest time interval, in microseconds, over which the control's value can change during a shift. The update period is the inverse of the frequency with which the control updates its value during a shift. If the implementation does not support value shifting over time, it should set the control's value to the final value immediately and return -1 from this method. update period in microseconds, or -1 if shifting over time is unsupported
See Also:   FloatControl.shift



getValue
public float getValue()(Code)
Obtains this control's current value. the current value



setValue
public void setValue(float newValue)(Code)
Sets the current value for the control. The default implementation simply sets the value as indicated. If the value indicated is greater than the maximum value, or smaller than the minimum value, an IllegalArgumentException is thrown. Some controls require that their line be open before they can be affected by setting a value.
Parameters:
  newValue - desired new value
throws:
  IllegalArgumentException - if the value indicated does not fallwithin the allowable range



shift
public void shift(float from, float to, int microseconds)(Code)
Changes the control value from the initial value to the final value linearly over the specified time period, specified in microseconds. This method returns without blocking; it does not wait for the shift to complete. An implementation should complete the operation within the time specified. The default implementation simply changes the value to the final value immediately.
Parameters:
  from - initial value at the beginning of the shift
Parameters:
  to - final value after the shift
Parameters:
  microseconds - maximum duration of the shift in microseconds
See Also:   FloatControl.getUpdatePeriod



toString
public String toString()(Code)
Provides a string representation of the control a string description



Methods inherited from javax.sound.sampled.Control
public Type getType()(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.