java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
jm.gui.sketch.SketchScore
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.awt.event.WindowListener
- public class SketchScore
- extends java.awt.Frame
- implements java.awt.event.WindowListener, java.awt.event.ActionListener
A jMusic tool which displays a score as a simple
'piano roll' display in a window.
The tool displays a jMusic class as a simple piano roll view. To use it write:
new ViewScore(scoreName);
Where scoreName is the jMusic Score object.
Alternately:
new ViewScore(scoreName, xpos, ypos);
Where xpos and ypos are intergers specifying the topleft position of the window.
This is useful if you want to use ViewScore in conjunction with some other GUI interface
which is already positioned in the top left corner of the screen.
- Version:
- 1.0,Sun Feb 25 18:43
| Nested classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
| Nested classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| Fields inherited from class java.awt.Window |
|
| Fields inherited from class java.awt.Container |
|
| Methods inherited from class java.awt.Frame |
addNotify, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.awt.Window |
addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getGraphicsConfiguration, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusDownCycle, update, 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, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, 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, isOpaque, 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, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle |
maxWidth
private static int maxWidth
maxParts
private static int maxParts
score
protected static jm.music.data.Score score
beatWidth
protected double beatWidth
pan
private java.awt.Panel pan
sketchScoreArea
private SketchScoreArea sketchScoreArea
ruler
private SketchRuler ruler
play
private java.awt.MenuItem play
speedUp
private java.awt.MenuItem speedUp
slowDown
private java.awt.MenuItem slowDown
clear
private java.awt.MenuItem clear
saveMIDI
private java.awt.MenuItem saveMIDI
quit
private java.awt.MenuItem quit
openMIDI
private java.awt.MenuItem openMIDI
openXML
private java.awt.MenuItem openXML
saveXML
private java.awt.MenuItem saveXML
SketchScore
public SketchScore(jm.music.data.Score score)
SketchScore
public SketchScore(jm.music.data.Score score,
int xPos,
int yPos)
getSketchScoreArea
public SketchScoreArea getSketchScoreArea()
windowClosing
public void windowClosing(java.awt.event.WindowEvent we)
- Description copied from interface:
java.awt.event.WindowListener
- This method is called when the user calls the system menu close
function, giving the program a chance to cancel the close.
- Specified by:
windowClosing in interface java.awt.event.WindowListener
windowActivated
public void windowActivated(java.awt.event.WindowEvent we)
- Description copied from interface:
java.awt.event.WindowListener
- This method is called when a window is activated. Only Frames and Dialogs
can be active, and the active window always contains the component with
focus.
- Specified by:
windowActivated in interface java.awt.event.WindowListener
windowClosed
public void windowClosed(java.awt.event.WindowEvent we)
- Description copied from interface:
java.awt.event.WindowListener
- This method is called when the window is closed.
- Specified by:
windowClosed in interface java.awt.event.WindowListener
windowDeactivated
public void windowDeactivated(java.awt.event.WindowEvent we)
- Description copied from interface:
java.awt.event.WindowListener
- This method is called when the window is deactivated.
- Specified by:
windowDeactivated in interface java.awt.event.WindowListener
windowIconified
public void windowIconified(java.awt.event.WindowEvent we)
- Description copied from interface:
java.awt.event.WindowListener
- This method is called when the window is iconified.
- Specified by:
windowIconified in interface java.awt.event.WindowListener
windowDeiconified
public void windowDeiconified(java.awt.event.WindowEvent we)
- Description copied from interface:
java.awt.event.WindowListener
- This method is called when the window is deiconified.
- Specified by:
windowDeiconified in interface java.awt.event.WindowListener
windowOpened
public void windowOpened(java.awt.event.WindowEvent we)
- Description copied from interface:
java.awt.event.WindowListener
- This method is called when the window is made visible.
- Specified by:
windowOpened in interface java.awt.event.WindowListener
update
public void update()
- recalulate and draw the sketch
getWidthAndParts
private void getWidthAndParts()
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Description copied from interface:
java.awt.event.ActionListener
- This method is invoked when an action occurs.
- Specified by:
actionPerformed in interface java.awt.event.ActionListener
playScore
private void playScore()
speedItUp
private void speedItUp()
slowItDown
private void slowItDown()
clearNotes
private void clearNotes()
saveMidi
public void saveMidi()
- Dialog to save phrase as a MIDI file.
saveXMLFile
public void saveXMLFile()
- Save score as a jMusic XML file.
openMidi
public void openMidi()
- Read a MIDI file and display its data.
openXMLFile
public void openXMLFile()
- Read a jMusic XML file and display its data.