com.softsynth.jsyn.view102
Class InternalSynthScope

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by com.softsynth.jsyn.view102.InternalSynthScope
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.lang.Runnable, javax.accessibility.Accessible
Direct Known Subclasses:
SynthScope, SynthScope

public class InternalSynthScope
extends java.awt.Panel
implements java.lang.Runnable

Oscilloscope

Author:
(C) 1997 Phil Burk, SoftSynth.com, All Rights Reserved
See Also:
TJ_SeeOsc, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
 
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
InternalSynthScope(SynthContext synthContext, int sampleSize)
           
 
Method Summary
 void addProbe(com.softsynth.jsyn.view102.SynthScopeProbePanel probePanel)
          Display a panel for this probe on the scope.
 void capture()
          Acquire fresh data then update the display.
 com.softsynth.jsyn.view102.SynthScopeProbePanel createProbe(SynthOutput outPort, int partNum, java.lang.String name, java.awt.Color color)
          Conveniance call that creates a SynthProbe and adds it to scope.
 com.softsynth.jsyn.view102.SynthScopeProbePanel createProbe(SynthOutput outPort, java.lang.String name, java.awt.Color color)
           
 void finish()
           
 void finish(boolean autoEnabled)
          Call this after your last call to createProbe().
 double getCaptureRate()
          Return rate of automatic capture in Hertz.
 WaveDisplay getWaveDisplay()
           
 void hideControls()
          Hide controls for zooming, panning, etc.
 void removeProbe(com.softsynth.jsyn.view102.SynthScopeProbePanel probePanel)
          Remove the probe from the scope.
 void run()
          Stop the auto capture.
 void setCaptureRate(double capturesPerSecond)
          Set rate of automatic capture in Hertz.
 void showControls()
          Show controls for zooming, panning, probes, etc.
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InternalSynthScope

public InternalSynthScope(SynthContext synthContext,
                          int sampleSize)
Method Detail

finish

public void finish(boolean autoEnabled)
Call this after your last call to createProbe(). This will compile the scopes circuit and enable the auto capture feature.


finish

public void finish()

run

public void run()
Stop the auto capture. FIXME public void stop() { autoBox.setState(false); autoBox.repaint(); handleAutoBox(); }

Specified by:
run in interface java.lang.Runnable

addProbe

public void addProbe(com.softsynth.jsyn.view102.SynthScopeProbePanel probePanel)
              throws SynthException
Display a panel for this probe on the scope.

Throws:
SynthException - If an error occurs.

removeProbe

public void removeProbe(com.softsynth.jsyn.view102.SynthScopeProbePanel probePanel)
                 throws SynthException
Remove the probe from the scope.

Throws:
SynthException - If an error occurs.

createProbe

public com.softsynth.jsyn.view102.SynthScopeProbePanel createProbe(SynthOutput outPort,
                                                                   int partNum,
                                                                   java.lang.String name,
                                                                   java.awt.Color color)
Conveniance call that creates a SynthProbe and adds it to scope. After the last call to createProbe(), you should call finish().


createProbe

public com.softsynth.jsyn.view102.SynthScopeProbePanel createProbe(SynthOutput outPort,
                                                                   java.lang.String name,
                                                                   java.awt.Color color)

showControls

public void showControls()
Show controls for zooming, panning, probes, etc.


hideControls

public void hideControls()
Hide controls for zooming, panning, etc. Just show the wave display.


setCaptureRate

public void setCaptureRate(double capturesPerSecond)
Set rate of automatic capture in Hertz.


getCaptureRate

public double getCaptureRate()
Return rate of automatic capture in Hertz.


capture

public void capture()
Acquire fresh data then update the display.


getWaveDisplay

public WaveDisplay getWaveDisplay()