com.cloudgarden.speech.userinterface
Class SpeechEngineTree

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JTree
                          |
                          +--com.cloudgarden.speech.userinterface.SpeechEngineTree
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.Scrollable, java.io.Serializable

public class SpeechEngineTree
extends javax.swing.JTree

A JTree that can be used to display BasicTreeNodes (which includes RecognizerNode, and SynthesizerNode, VoiceNode and SpeakerProfileNode)

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JTree
javax.swing.JTree.AccessibleJTree, javax.swing.JTree.DynamicUtilTreeNode, javax.swing.JTree.EmptySelectionModel, javax.swing.JTree.TreeModelHandler, javax.swing.JTree.TreeSelectionRedirector
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
static int SHOW_RECOGNIZERS
           
static int SHOW_SYNTHESIZERS
           
 
Fields inherited from class javax.swing.JTree
ANCHOR_SELECTION_PATH_PROPERTY, CELL_EDITOR_PROPERTY, CELL_RENDERER_PROPERTY, cellEditor, cellRenderer, editable, EDITABLE_PROPERTY, EXPANDS_SELECTED_PATHS_PROPERTY, INVOKES_STOP_CELL_EDITING_PROPERTY, invokesStopCellEditing, LARGE_MODEL_PROPERTY, largeModel, LEAD_SELECTION_PATH_PROPERTY, ROOT_VISIBLE_PROPERTY, rootVisible, ROW_HEIGHT_PROPERTY, rowHeight, SCROLLS_ON_EXPAND_PROPERTY, scrollsOnExpand, SELECTION_MODEL_PROPERTY, selectionModel, selectionRedirector, SHOWS_ROOT_HANDLES_PROPERTY, showsRootHandles, TOGGLE_CLICK_COUNT_PROPERTY, toggleClickCount, TREE_MODEL_PROPERTY, treeModel, treeModelListener, VISIBLE_ROW_COUNT_PROPERTY, visibleRowCount
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
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
SpeechEngineTree(int mode)
          Creates and initializes a SpeechEngineTree which will contain Recognizers and/or Synthesizers depending on the value of mode (which can be a combination of SHOW_SYNTHESIZERS and SHOW_RECOGNIZERS) Displays all available engines of either type.
SpeechEngineTree(int mode, RecognizerModeDesc requiredRec, SynthesizerModeDesc requiredSyn)
          Creates and initializes a SpeechEngineTree which will contain Recognizers and/or Synthesizers depending on the value of mode (which can be a combination of SHOW_SYNTHESIZERS and SHOW_RECOGNIZERS), but only those Recognizers and/or Synthesizers matching requiredRec and requiredSyn.
 
Method Summary
protected  void addRecognizer(com.cloudgarden.speech.userinterface.RecognizerNode node)
           
protected  void addSynthesizer(com.cloudgarden.speech.userinterface.SynthesizerNode node)
           
 void cleanup()
          Deallocates all Recognizers and Synthesizers which were allocated while the SpeechTree was opened - must be called on exit.
 SpeakerProfile getProfile()
          Returns the SpeakerProfile from the last-selected SpeakerProfileNode
 RecognizerModeDesc getRecognizerModeDesc()
          Returns the RecognizerModeDesc from the last-selected RecognizerNode
 com.cloudgarden.speech.userinterface.SpeechNode getSelectedNode()
           
 SynthesizerModeDesc getSynthesizerModeDesc()
          Returns the SynthesizerModeDesc from the last-selected SynthesizerNode
 Voice getVoice()
          Returns the Voice from the last-selected VoiceNode
protected static void mark(boolean reset)
           
protected  void setProfile(SpeakerProfile prof)
           
protected  void setRecognizerModeDesc(RecognizerModeDesc desc)
           
 void setSelectedNode(com.cloudgarden.speech.userinterface.SpeechNode node)
           
protected  void setSynthesizerModeDesc(SynthesizerModeDesc desc)
           
protected  void setVoice(Voice voice)
           
 
Methods inherited from class javax.swing.JTree
addSelectionInterval, addSelectionPath, addSelectionPaths, addSelectionRow, addSelectionRows, addTreeExpansionListener, addTreeSelectionListener, addTreeWillExpandListener, cancelEditing, clearSelection, clearToggledPaths, collapsePath, collapseRow, convertValueToText, createTreeModel, createTreeModelListener, expandPath, expandRow, fireTreeCollapsed, fireTreeExpanded, fireTreeWillCollapse, fireTreeWillExpand, fireValueChanged, getAccessibleContext, getAnchorSelectionPath, getCellEditor, getCellRenderer, getClosestPathForLocation, getClosestRowForLocation, getDefaultTreeModel, getDescendantToggledPaths, getEditingPath, getExpandedDescendants, getExpandsSelectedPaths, getInvokesStopCellEditing, getLastSelectedPathComponent, getLeadSelectionPath, getLeadSelectionRow, getMaxSelectionRow, getMinSelectionRow, getModel, getPathBetweenRows, getPathBounds, getPathForLocation, getPathForRow, getPreferredScrollableViewportSize, getRowBounds, getRowCount, getRowForLocation, getRowForPath, getRowHeight, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getScrollsOnExpand, getSelectionCount, getSelectionModel, getSelectionPath, getSelectionPaths, getSelectionRows, getShowsRootHandles, getToggleClickCount, getToolTipText, getUI, getUIClassID, getVisibleRowCount, hasBeenExpanded, isCollapsed, isCollapsed, isEditable, isEditing, isExpanded, isExpanded, isFixedRowHeight, isLargeModel, isPathEditable, isPathSelected, isRootVisible, isRowSelected, isSelectionEmpty, isVisible, makeVisible, paramString, removeDescendantSelectedPaths, removeDescendantToggledPaths, removeSelectionInterval, removeSelectionPath, removeSelectionPaths, removeSelectionRow, removeSelectionRows, removeTreeExpansionListener, removeTreeSelectionListener, removeTreeWillExpandListener, scrollPathToVisible, scrollRowToVisible, setAnchorSelectionPath, setCellEditor, setCellRenderer, setEditable, setExpandedState, setExpandsSelectedPaths, setInvokesStopCellEditing, setLargeModel, setLeadSelectionPath, setModel, setRootVisible, setRowHeight, setScrollsOnExpand, setSelectionInterval, setSelectionModel, setSelectionPath, setSelectionPaths, setSelectionRow, setSelectionRows, setShowsRootHandles, setToggleClickCount, setUI, setVisibleRowCount, startEditingAtPath, stopEditing, treeDidChange, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SHOW_SYNTHESIZERS

public static final int SHOW_SYNTHESIZERS

SHOW_RECOGNIZERS

public static final int SHOW_RECOGNIZERS
Constructor Detail

SpeechEngineTree

public SpeechEngineTree(int mode)
Creates and initializes a SpeechEngineTree which will contain Recognizers and/or Synthesizers depending on the value of mode (which can be a combination of SHOW_SYNTHESIZERS and SHOW_RECOGNIZERS) Displays all available engines of either type.

SpeechEngineTree

public SpeechEngineTree(int mode,
                        RecognizerModeDesc requiredRec,
                        SynthesizerModeDesc requiredSyn)
Creates and initializes a SpeechEngineTree which will contain Recognizers and/or Synthesizers depending on the value of mode (which can be a combination of SHOW_SYNTHESIZERS and SHOW_RECOGNIZERS), but only those Recognizers and/or Synthesizers matching requiredRec and requiredSyn.
Method Detail

cleanup

public void cleanup()
Deallocates all Recognizers and Synthesizers which were allocated while the SpeechTree was opened - must be called on exit.

getSelectedNode

public com.cloudgarden.speech.userinterface.SpeechNode getSelectedNode()

setSelectedNode

public void setSelectedNode(com.cloudgarden.speech.userinterface.SpeechNode node)

mark

protected static void mark(boolean reset)

addRecognizer

protected void addRecognizer(com.cloudgarden.speech.userinterface.RecognizerNode node)

addSynthesizer

protected void addSynthesizer(com.cloudgarden.speech.userinterface.SynthesizerNode node)

getProfile

public SpeakerProfile getProfile()
Returns the SpeakerProfile from the last-selected SpeakerProfileNode

setProfile

protected void setProfile(SpeakerProfile prof)

getRecognizerModeDesc

public RecognizerModeDesc getRecognizerModeDesc()
Returns the RecognizerModeDesc from the last-selected RecognizerNode

setRecognizerModeDesc

protected void setRecognizerModeDesc(RecognizerModeDesc desc)

getSynthesizerModeDesc

public SynthesizerModeDesc getSynthesizerModeDesc()
Returns the SynthesizerModeDesc from the last-selected SynthesizerNode

setSynthesizerModeDesc

protected void setSynthesizerModeDesc(SynthesizerModeDesc desc)

getVoice

public Voice getVoice()
Returns the Voice from the last-selected VoiceNode

setVoice

protected void setVoice(Voice voice)