|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.frinika.sequencer.model.Part
com.frinika.sequencer.model.MidiPart
public class MidiPart
Contains a List of MultiEvents. Belongs to a lane.
Nested Class Summary | |
---|---|
protected class |
MidiPart.MidiPartPropertiesPanel
Instance returned via createProperitesPanel(). |
Nested classes/interfaces inherited from class com.frinika.sequencer.model.Part |
---|
Part.PropertiesPanel |
Field Summary |
---|
Fields inherited from class com.frinika.sequencer.model.Part |
---|
lane, selected |
Constructor Summary | |
---|---|
MidiPart()
|
|
MidiPart(MidiLane lane)
Constructor for an MidiPart. |
Method Summary | |
---|---|
void |
add(MultiEvent ev)
Add a MultiEvent to the track. |
void |
addCommitListener(CommitListener l)
|
java.lang.Object |
clone()
If restoration from a clone is needed - this method should return a clone otherwise throw the CloneNotSupportedException |
void |
commitEventsAdd()
|
void |
commitEventsRemove()
Called when part is removed from the model |
void |
copyBy(double deltaTick,
Lane dst)
|
protected OptionsEditor |
createPropertiesPanel(ProjectFrame frame)
Create PropertiesPanel. |
Selectable |
deepCopy(Selectable parent)
Complete copy of object. |
void |
deepMove(long tick)
Move object and all children by tick |
void |
drawThumbNail(java.awt.Graphics2D g,
java.awt.Rectangle rect,
PartView panel)
|
EditHistoryContainer |
getEditHistoryContainer()
|
int |
getMidiChannel()
|
java.util.SortedSet<MultiEvent> |
getMultiEvents()
Returns the multievent array. |
java.util.SortedSet<MultiEvent> |
getMultiEventSubset(long startTick,
long endTick)
Returns a subset of the multievent array including startTick excluding endTick |
java.lang.String |
getName()
|
int[] |
getPitchRange()
deprecated |
FrinikaTrackWrapper |
getTrack()
|
void |
importFromMidiTrack(long startTickArg,
long endTickArg)
Import Midi events into a Part from a section of track. |
void |
importFromMidiTrack(javax.sound.midi.Track track,
long startTickArg,
long endTickArg)
Import Midi events into a Part from a section of track. |
protected void |
initContextMenu(ProjectFrame frame,
javax.swing.JPopupMenu popup)
Fills the part's context menu with menu-items. |
void |
moveContentsBy(double dTick,
Lane dstLane)
move the contents by tick into dstLane |
protected void |
moveItemsBy(long deltaTick)
Make sure part is detached before calling this then reattach after This operation does not change the database rep so we do not call setChanged() |
void |
onLoad()
Commit the MultiEvents as MidiEvents to a Sequencers Track event list. |
void |
rebuildMultiEventEndTickComparables()
|
void |
remove(MultiEvent multiEvent)
Remove a MultiEvent from the track |
void |
removeCommitListener(CommitListener l)
|
void |
restoreFromClone(EditHistoryRecordable o)
On removal the EditHistoryContainer will attempt to clone the object - and if restored later it will use the restoreFromClone method to restore the cloned data on the original instance. |
void |
setBoundsFromEvents()
Rebuild the bounds from the multievent startTicks |
void |
setName(java.lang.String name)
|
Methods inherited from class com.frinika.sequencer.model.Part |
---|
addPluginRightButtonMenu, addToModel, createPropertiesDialog, displayStructure, getColor, getDuration, getDurationInSecs, getDurationInTicks, getEditParent, getEnd, getEndInSecs, getEndTick, getEventBounds, getLane, getMultiPart, getPartResourceId, getRootPart, getStart, getStartInSecs, getStartTick, getTransparentColor, isAttached, isSelected, leftTickForMove, moveBy, removeFromModel, rightTickForMove, setChanged, setColor, setEditParent, setEndInSecs, setEndTick, setMultiPart, setPartResourceId, setRootPart, setSelected, setStartInSecs, setStartTick, showContextMenu, showPropertiesDialog, showRightButtonMenu |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MidiPart()
public MidiPart(MidiLane lane)
lane
- Method Detail |
---|
public void setBoundsFromEvents()
public void importFromMidiTrack(long startTickArg, long endTickArg)
startTickArg
- start tick (inclusive)endTickArg
- end tick (exclusive)public void importFromMidiTrack(javax.sound.midi.Track track, long startTickArg, long endTickArg)
startTickArg
- start tick (inclusive)endTickArg
- end tick (exclusive)public java.lang.String getName()
public void setName(java.lang.String name)
public void add(MultiEvent ev)
add
in interface EditHistoryRecorder<MultiEvent>
ev
- public void remove(MultiEvent multiEvent)
remove
in interface EditHistoryRecorder<MultiEvent>
multiEvent
- public void commitEventsRemove()
Part
commitEventsRemove
in class Part
public java.util.SortedSet<MultiEvent> getMultiEvents()
public java.util.SortedSet<MultiEvent> getMultiEventSubset(long startTick, long endTick)
startTick
- endTick
-
public FrinikaTrackWrapper getTrack()
public int getMidiChannel()
public EditHistoryContainer getEditHistoryContainer()
protected void moveItemsBy(long deltaTick)
moveItemsBy
in class Part
public void moveContentsBy(double dTick, Lane dstLane)
Part
moveContentsBy
in class Part
public void restoreFromClone(EditHistoryRecordable o)
EditHistoryRecordable
restoreFromClone
in interface EditHistoryRecordable
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
EditHistoryRecordable
clone
in interface EditHistoryRecordable
clone
in class Part
java.lang.CloneNotSupportedException
public void commitEventsAdd()
commitEventsAdd
in class Part
public void copyBy(double deltaTick, Lane dst)
copyBy
in class Part
public Selectable deepCopy(Selectable parent)
Selectable
deepCopy
in interface Selectable
parent
- owner of the new object;
public void deepMove(long tick)
Selectable
deepMove
in interface Selectable
public void rebuildMultiEventEndTickComparables()
public int[] getPitchRange()
public void onLoad()
onLoad
in class Part
public void drawThumbNail(java.awt.Graphics2D g, java.awt.Rectangle rect, PartView panel)
drawThumbNail
in class Part
public void addCommitListener(CommitListener l)
public void removeCommitListener(CommitListener l)
protected void initContextMenu(ProjectFrame frame, javax.swing.JPopupMenu popup)
initContextMenu
in class Part
popup
- protected OptionsEditor createPropertiesPanel(ProjectFrame frame)
createPropertiesPanel
in class Part
frame
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |