com.softsynth.view
Class CustomFaderDouble

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Canvas
          extended by com.softsynth.view.CustomFader
              extended by com.softsynth.view.CustomFaderDouble
All Implemented Interfaces:
ValueController, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class CustomFaderDouble
extends CustomFader
implements ValueController

Custom Fader that generates floating point values.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
static int EXPONENTIAL
           
static int LINEAR
           
 
Fields inherited from class com.softsynth.view.CustomFader
HORIZONTAL, VERTICAL
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CustomFaderDouble(int orientation, double initialValue, double min, double max)
           
 
Method Summary
 void addValueListener(ValueListener listener)
           
 int doubleToFader(double val)
           
 double faderToDouble(int val)
          Convert a value from the integer form to a double value ranging between the specified min and max.
 double getDoubleValue()
           
 double getMaximum()
          Get maximum value.
 double getMinimum()
          Get minimum value.
 int getTaper()
           
 void removeValueListener(ValueListener listener)
           
 void setMaximum(double max)
          Set maximum value corresponding to the rightmost fader position.
 void setMinimum(double min)
          Set minimum value corresponding to the leftmost fader position.
 void setTaper(int taper)
          Set taper to LINEAR or EXPONENTIAL.
 void setValue(double fval)
           
 
Methods inherited from class com.softsynth.view.CustomFader
addCustomFaderListener, getBlockIncrement, getLineIncrement, getValue, getVisibleAmount, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, paint, removeCustomFaderListener, setBlockIncrement, setUnitIncrement, setValue, setValues, setVisibleAmount, update
 
Methods inherited from class java.awt.Canvas
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LINEAR

public static final int LINEAR
See Also:
Constant Field Values

EXPONENTIAL

public static final int EXPONENTIAL
See Also:
Constant Field Values
Constructor Detail

CustomFaderDouble

public CustomFaderDouble(int orientation,
                         double initialValue,
                         double min,
                         double max)
Method Detail

addValueListener

public void addValueListener(ValueListener listener)
Specified by:
addValueListener in interface ValueController

removeValueListener

public void removeValueListener(ValueListener listener)
Specified by:
removeValueListener in interface ValueController

setTaper

public void setTaper(int taper)
Set taper to LINEAR or EXPONENTIAL. When using EXPONENTIAL taper, do not use a minimum of 0.0 because log(0.0) is undefined.


getTaper

public int getTaper()

faderToDouble

public double faderToDouble(int val)
Convert a value from the integer form to a double value ranging between the specified min and max.


doubleToFader

public int doubleToFader(double val)

getMinimum

public double getMinimum()
Description copied from interface: ValueController
Get minimum value.

Specified by:
getMinimum in interface ValueController

getMaximum

public double getMaximum()
Description copied from interface: ValueController
Get maximum value.

Specified by:
getMaximum in interface ValueController

setMinimum

public void setMinimum(double min)
Set minimum value corresponding to the leftmost fader position.

Specified by:
setMinimum in interface ValueController

setMaximum

public void setMaximum(double max)
Set maximum value corresponding to the rightmost fader position.

Specified by:
setMaximum in interface ValueController

setValue

public void setValue(double fval)
Specified by:
setValue in interface ValueController

getDoubleValue

public double getDoubleValue()
Specified by:
getDoubleValue in interface ValueController