|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel dguitar.gui.SongPanel
Nested Class Summary |
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 int |
count
|
private DisplayOptions |
displayOptions
|
private java.awt.GridBagLayout |
gridBagLayout
|
private boolean |
hasTracks
|
private int |
linesOnBottom
How many lines are added to the bottom |
private int |
linesOnTop
How many lines are added to the top |
private java.util.List |
measures
|
private MusicCursorPosition |
musicCursorPosition
|
private int |
numMeasures
|
private int |
numTracks
|
private javax.swing.JPanel |
Panel
|
private GPSong |
piece
|
private boolean |
spacingChange
|
private javax.swing.JTabbedPane |
TabPane
|
private java.util.List |
tracks
|
private boolean |
viewChange
|
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 | |
SongPanel()
Creates a new instance of SongPanel |
|
SongPanel(DisplayOptions aDisplayOptions)
To create a SongPanel with displayOptions already created. |
Method Summary | |
private void |
addScrollPane()
|
private void |
addTabPane()
|
private void |
addTrackMeasures()
add The different track and measures of a song, but they are empty. |
private void |
addTrackPanel(GPTrack track)
Adds a tracks...VERY IMPORTANT validate() method should be invoqued as required |
protected void |
alignBars()
|
void |
changeView()
|
void |
displayPiece()
this method sets the MeasuresTracksPairs, and the then calls refresh() ; |
DisplayOptions |
getDisplayOptions()
|
protected TrackPanel |
getFirstTrackPanel()
a method to start to Iterate over the Track Panels is provided |
private int |
getMaxWidth(int m)
|
boolean |
getMinPieceSpacing()
|
protected TrackPanel |
getNextTrackPanel()
|
int |
getNoteSpacing()
|
int |
getNumTracks()
|
GPSong |
getPiece()
Gets the Piece object that was read using readPieceFrom(GPInputStream GIS) |
TrackPanel |
getTrackPanel(int pos)
This method allows you to obtain the TrackPanel at pos position, starting from 0 |
boolean |
hasChanged()
|
private void |
initComponents()
|
boolean |
isMultiTrackView()
|
private GPDuration |
minDurationOfMeasure(int m)
calculate the min duration of the beat of measure ´m´ it is assumed that m < numMeasures |
private void |
multiTrackViewChanged()
Call this method when you change variable this.DO.multiTrackView |
void |
musicCursorsAlign()
|
void |
musicCursorsSetEnable(boolean value)
|
void |
musicCursorsSetVisible(boolean value)
|
boolean |
readPieceFrom(GPInputStream GPis)
This method reads from a GPInputStream, and displays any exceptions |
private void |
removeScrollPane()
|
private void |
removeTabPane()
|
protected void |
scrollOthers(TrackPanel tp)
NOT USED...and not working Scrolls the other TrackPanel according to TP |
void |
setDisplayOptions(DisplayOptions dO)
|
private void |
setMeasuresTracksPairs()
|
private void |
setMinDuration(GPDuration minDuration,
int m)
this methos propagate the minDuration vertically..acrros the tracks m is the measure number |
void |
setMinPieceSpacing(boolean b)
|
private void |
setMinWidth(int min,
int m)
|
void |
setMultiTrackView(boolean b)
|
void |
setMusicCursorSingleColor(boolean single)
|
void |
setNoteSpacing(int ns)
|
void |
setNumTracks(int numTracks)
|
void |
toggleDisplayUnsupportedEffects()
remember to call validate when necesary. |
void |
toggleMinPieceSpacing()
Call this to swith back and forward between the two types of spacing remember to call validate when necesary. |
void |
toggleMultiTrackView()
|
void |
toggleSingleMusicCursorColor()
|
void |
toggleViewMusicCursors()
|
void |
validate()
Validates this container and all of its subcomponents. |
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, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, 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, 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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.awt.GridBagLayout gridBagLayout
private GPSong piece
private java.util.List measures
private java.util.List tracks
private int numMeasures
private int numTracks
private javax.swing.JTabbedPane TabPane
private javax.swing.JPanel Panel
private int count
private boolean hasTracks
private boolean viewChange
private boolean spacingChange
private DisplayOptions displayOptions
private MusicCursorPosition musicCursorPosition
private int linesOnTop
private int linesOnBottom
Constructor Detail |
public SongPanel()
public SongPanel(DisplayOptions aDisplayOptions)
aDisplayOptions
- Method Detail |
public void setDisplayOptions(DisplayOptions dO)
setDisplayOptions
in interface OptionsDisplay
dO
- The displayOptions to set.public DisplayOptions getDisplayOptions()
getDisplayOptions
in interface OptionsDisplay
private void initComponents()
private void addScrollPane()
private void addTabPane()
private void removeScrollPane()
private void removeTabPane()
public void setMinPieceSpacing(boolean b)
public void toggleMinPieceSpacing()
public void toggleDisplayUnsupportedEffects()
public void toggleSingleMusicCursorColor()
public void toggleViewMusicCursors()
public boolean getMinPieceSpacing()
public GPSong getPiece()
public void changeView()
public void displayPiece()
public void musicCursorsAlign()
public void musicCursorsSetVisible(boolean value)
public void musicCursorsSetEnable(boolean value)
private void multiTrackViewChanged()
public void setMultiTrackView(boolean b)
public void toggleMultiTrackView()
public boolean isMultiTrackView()
private void addTrackPanel(GPTrack track)
public TrackPanel getTrackPanel(int pos)
pos
- the trackPanel index starting from 0
protected TrackPanel getFirstTrackPanel()
protected TrackPanel getNextTrackPanel()
private GPDuration minDurationOfMeasure(int m)
private void setMinDuration(GPDuration minDuration, int m)
private void setMinWidth(int min, int m)
private int getMaxWidth(int m)
protected void alignBars()
private void setMeasuresTracksPairs()
private void addTrackMeasures()
public boolean hasChanged()
public boolean readPieceFrom(GPInputStream GPis)
public int getNoteSpacing()
public void setNoteSpacing(int ns)
public void setMusicCursorSingleColor(boolean single)
public void validate()
The validate
method is used to cause a container to lay
out its subcomponents again. It should be invoked when this container's
subcomponents are modified (added to or removed from the container, or
layout-related information changed) after the container has been
displayed.
Container.add(java.awt.Component)
,
Component.invalidate()
,
JComponent.revalidate()
protected void scrollOthers(TrackPanel tp)
public void setNumTracks(int numTracks)
numTracks
- The numTracks to set.public int getNumTracks()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |