com.frinika.sequencer.gui.menu.midi
Class MidiStepRecordActionDialog

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Dialog
                  extended by javax.swing.JDialog
                      extended by com.frinika.gui.AbstractDialog
                          extended by com.frinika.sequencer.gui.menu.midi.MidiStepRecordActionDialog
All Implemented Interfaces:
OptionsEditor, SelectionListener, MidiMessageListener, SongPositionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class MidiStepRecordActionDialog
extends AbstractDialog
implements OptionsEditor, SongPositionListener, SelectionListener, MidiMessageListener

GUI-dialog of a MidiStepRecordAction. Unlike other dialogs used in this package, this dialog is non-modal, thus once the dialog is opened, it remains 'floating' above the main window while elements in the main-window remain editable. (Created with NetBeans 5.5 gui-editor, see corresponding .form file.)

Author:
Jens Gulden
See Also:
MidiStepRecordAction, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.frinika.gui.AbstractDialog
AbstractDialog.MoreLessButtonListener
 
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
 
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static long AUTO_RECORD_DELAY_INTERVAL
           
 
Fields inherited from class com.frinika.gui.AbstractDialog
canceled
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPE
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
MidiStepRecordActionDialog(ProjectFrame frame, MidiStepRecordAction action)
          Creates new form MidiStepRecordActionDialog
 
Method Summary
 void addToBuffer(int note)
           
 void addToBuffer(java.lang.String s)
           
 java.lang.String getBuffer()
           
 void hide()
           
 void midiMessage(javax.sound.midi.MidiMessage message)
          Implementation of MidiMessageListener.midiMessage()
 void notifyTickPosition(long tick)
          This method is called each time a new tick is played by the sequencer.
 void refresh()
          Refreshes the GUI so that it reflects the model's current state.
 void removeFromBuffer(int note)
           
 void removeFromBuffer(java.lang.String s)
           
 boolean requiresNotificationOnEachTick()
          Your implementation should return true if your listener requires to be notified for each and every tick.
 void selectionChanged(SelectionContainer selection)
          Notify observers that the slection has changed.
 void setBuffer(java.lang.String s)
           
 void update()
          Updates the model so that it contains the values set by the user
 
Methods inherited from class com.frinika.gui.AbstractDialog
cancel, centerOnScreen, getProjectFrame, isCanceled, ok, registerMoreLessButtonPanel
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, setVisible, show, toBack
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AUTO_RECORD_DELAY_INTERVAL

public static final long AUTO_RECORD_DELAY_INTERVAL
See Also:
Constant Field Values
Constructor Detail

MidiStepRecordActionDialog

public MidiStepRecordActionDialog(ProjectFrame frame,
                                  MidiStepRecordAction action)
Creates new form MidiStepRecordActionDialog

Method Detail

refresh

public void refresh()
Description copied from interface: OptionsEditor
Refreshes the GUI so that it reflects the model's current state.

Specified by:
refresh in interface OptionsEditor

update

public void update()
Description copied from interface: OptionsEditor
Updates the model so that it contains the values set by the user

Specified by:
update in interface OptionsEditor

hide

public void hide()
Overrides:
hide in class java.awt.Dialog

midiMessage

public void midiMessage(javax.sound.midi.MidiMessage message)
Implementation of MidiMessageListener.midiMessage()

Specified by:
midiMessage in interface MidiMessageListener

selectionChanged

public void selectionChanged(SelectionContainer selection)
Description copied from interface: SelectionListener
Notify observers that the slection has changed.

Specified by:
selectionChanged in interface SelectionListener

notifyTickPosition

public void notifyTickPosition(long tick)
Description copied from interface: SongPositionListener
This method is called each time a new tick is played by the sequencer. Note that this method should return as soon as possible (immediately).

Specified by:
notifyTickPosition in interface SongPositionListener

requiresNotificationOnEachTick

public boolean requiresNotificationOnEachTick()
Description copied from interface: SongPositionListener
Your implementation should return true if your listener requires to be notified for each and every tick. Otherwise (which is in most cases) return false. WARNING: If you return true on this method, you MUST return absolutely immediately everytime. Otherwise it may result in a halting song.

Specified by:
requiresNotificationOnEachTick in interface SongPositionListener
Returns:

setBuffer

public void setBuffer(java.lang.String s)

getBuffer

public java.lang.String getBuffer()

addToBuffer

public void addToBuffer(java.lang.String s)

removeFromBuffer

public void removeFromBuffer(java.lang.String s)

addToBuffer

public void addToBuffer(int note)

removeFromBuffer

public void removeFromBuffer(int note)