dguitar.gui.unused
Class BarStandard

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bydguitar.gui.Bar
                      extended bydguitar.gui.BarMTP
                          extended bydguitar.gui.unused.BarStandard
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, OptionsDisplay, java.io.Serializable

public class BarStandard
extends BarMTP
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener

This class extends BarMTP, it represents a Bar with a StandardNotation display This class still exists in order to be re-used again in not so distant future.

Author:
Mauricio Gracia Gutiérrez
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class dguitar.gui.BarMTP
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
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
 
Field Summary
private  boolean avoidNoteClipping
           
private  java.util.Vector Notes
           
private  java.awt.Point p
           
private  java.awt.Point pAnt
           
private  boolean showSnap
           
private  java.awt.Rectangle snapRect
           
 
Fields inherited from class dguitar.gui.BarMTP
addEONs, addSilence, colorNext, colorPrev, fontAscent, lastNumHLines, MIN_WIDTH, mtp
 
Fields inherited from class dguitar.gui.Bar
BP, displayTimeSignature, isFirst, isLast, measure, minx, TS
 
Fields inherited from class javax.swing.JPanel
 
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.Container
 
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
BarStandard(DisplayOptions cdo, BarPanel BP)
          Creates a new instance of Bar
 
Method Summary
 int calculateHeightOfString(int s)
           
private  void drawSnap(java.awt.Point pp)
           
 NoteComponent findNote(java.awt.Point pos)
           
 void mouseClicked(java.awt.event.MouseEvent mouseEvent)
           
 void mouseDragged(java.awt.event.MouseEvent mouseEvent)
           
 void mouseEntered(java.awt.event.MouseEvent mouseEvent)
           
 void mouseExited(java.awt.event.MouseEvent mouseEvent)
           
 void mouseMoved(java.awt.event.MouseEvent mouseEvent)
           
 void mousePressed(java.awt.event.MouseEvent mouseEvent)
           
 void mouseReleased(java.awt.event.MouseEvent mouseEvent)
           
 void paintEffects(java.awt.Graphics g, int currentX, int y, GPEffectsOnNote EON, int contEON, GPBeat beat)
           
 void paintNote(java.awt.Graphics g, int x, int y, GPNote note)
          This method paint the notes using g, currentX, y and a GPNote
 void paintRhythmHL(java.awt.Graphics g, int x, int lowest, int n, GPBeat prev)
           
 void paintSilence(java.awt.Graphics g, int currentX, GPBeat beat, int contSilences)
           
 java.awt.Point snap(java.awt.Point pos, java.awt.Point rel)
           
 MusicCursorPosition snapX(int x, MusicCursor ms)
           
 
Methods inherited from class dguitar.gui.BarMTP
calculateWidth, calculateWidth, calculateWidthOfBeat, getBeats, getMeasureTrackPair, getMusicCursorPosition, getMusicCursorPosition, hasBeats, minDurationOfBeats, nextBeat, paintBeat, paintComponent, paintMeasureTrackPair, paintRhythm, setMeasureTrackPair, setMinDuration, setMinWidth
 
Methods inherited from class dguitar.gui.Bar
equals, equalTimeSignature, getBottomOffset, getDisplayOptions, getExtendBottom, getExtendTop, getHeight, getMaximumSize, getMeasure, getMinimumSize, getPreferredSize, getTopOffset, getWidth, paintMeasure, setBottomOffset, setDisplayOptions, setExtendBottom, setExtendTop, setMeasure, setTopOffset
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, 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, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Notes

private java.util.Vector Notes

p

private java.awt.Point p

pAnt

private java.awt.Point pAnt

avoidNoteClipping

private boolean avoidNoteClipping

showSnap

private boolean showSnap

snapRect

private java.awt.Rectangle snapRect
Constructor Detail

BarStandard

public BarStandard(DisplayOptions cdo,
                   BarPanel BP)
Creates a new instance of Bar

Method Detail

findNote

public NoteComponent findNote(java.awt.Point pos)

snapX

public MusicCursorPosition snapX(int x,
                                 MusicCursor ms)
Overrides:
snapX in class BarMTP

snap

public java.awt.Point snap(java.awt.Point pos,
                           java.awt.Point rel)

drawSnap

private void drawSnap(java.awt.Point pp)

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent mouseEvent)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent mouseEvent)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent mouseEvent)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent mouseEvent)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent mouseEvent)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent mouseEvent)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent mouseEvent)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

calculateHeightOfString

public int calculateHeightOfString(int s)
Specified by:
calculateHeightOfString in class BarMTP

paintRhythmHL

public void paintRhythmHL(java.awt.Graphics g,
                          int x,
                          int lowest,
                          int n,
                          GPBeat prev)
Specified by:
paintRhythmHL in class BarMTP

paintNote

public void paintNote(java.awt.Graphics g,
                      int x,
                      int y,
                      GPNote note)
Description copied from class: BarMTP
This method paint the notes using g, currentX, y and a GPNote

Specified by:
paintNote in class BarMTP

paintSilence

public void paintSilence(java.awt.Graphics g,
                         int currentX,
                         GPBeat beat,
                         int contSilences)
Specified by:
paintSilence in class BarMTP

paintEffects

public void paintEffects(java.awt.Graphics g,
                         int currentX,
                         int y,
                         GPEffectsOnNote EON,
                         int contEON,
                         GPBeat beat)
Specified by:
paintEffects in class BarMTP