devs.musicpackage
Class LevelMeter

java.lang.Object
  extended by devs.musicpackage.LevelMeter

public class LevelMeter
extends java.lang.Object

a user interface component to show an amplitude value

Version:
1, January 20, 2005
Author:
Ulrich Hilger, Light Development, http://www.lightdev.com, info@lightdev.com, published under the terms and conditions of the GNU General Public License, for details see file license.txt in the distribution package of this software

Constructor Summary
LevelMeter(java.awt.image.BufferedImage bi, int index, int width, int height, int min, int max)
          constructor
 
Method Summary
 void paintInitially()
          paint this level meter without showing a value
 void setOffscreenImage(java.awt.image.BufferedImage bi)
          set the offscreen image this component should draw to
 void setSize(int width, int height)
          set the size of this component
 void setValue(double value)
          set the decibel value this component should display
 void setWidth(int width)
          set the width of this component
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LevelMeter

public LevelMeter(java.awt.image.BufferedImage bi,
                  int index,
                  int width,
                  int height,
                  int min,
                  int max)
constructor

Parameters:
bi - BufferedImage the offscreen image to use for painting
index - int index inside a group of level meters
width - int width of this level meter
height - int height of this level meter
min - int minimum value to display by this level meter
max - int maximum value to display by this level meter
Method Detail

setSize

public void setSize(int width,
                    int height)
set the size of this component

Parameters:
width - int the width
height - int the height

setValue

public void setValue(double value)
set the decibel value this component should display

Parameters:
value - double the decibel value to display

setWidth

public void setWidth(int width)
set the width of this component

Parameters:
width - int the width

paintInitially

public void paintInitially()
paint this level meter without showing a value


setOffscreenImage

public void setOffscreenImage(java.awt.image.BufferedImage bi)
set the offscreen image this component should draw to

Parameters:
bi - BufferedImage the offscreen image to draw to