|
||||||||||
| 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
com.frinika.sequencer.model.MidiPartGhost
public class MidiPartGhost
Ghost ("reference-copy") of a MidiPart. Ghosts appear as Parts in the Tracker-view, but do not contain their own events. Instead, Ghosts are internally linked to the origial Part from which they have been created. They represent the original Part transparently, but are not editable themselves. All changed applied to the original Part will immediately take effect on Ghosts also.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.frinika.sequencer.model.MidiPart |
|---|
MidiPart.MidiPartPropertiesPanel |
| 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 | |
|---|---|
MidiPartGhost(MidiPart referredPart,
Lane lane)
|
|
MidiPartGhost(MidiPart referredPart,
long deltaTicks)
|
|
| Method Summary | |
|---|---|
void |
add(MultiEvent ev)
Add a MultiEvent to the track. |
void |
addToModel()
Add to the model making sure the history is informed |
java.lang.Object |
clone()
If restoration from a clone is needed - this method should return a clone otherwise throw the CloneNotSupportedException |
protected MultiEvent |
commitAddClone(MultiEvent multiEvent)
|
void |
commitAddPerformed(MultiEvent event)
Called when the original MidiPart has undergone changes. |
void |
commitEventsAdd()
|
void |
commitEventsRemove()
Called when part is removed from the model |
protected void |
commitRemoveClone(MultiEvent multiEvent)
|
void |
commitRemovePerformed(MultiEvent event)
Called when the original MidiPart has undergone changes. |
void |
copyBy(double deltaTick,
Lane dst)
|
Selectable |
deepCopy(Selectable parent)
Complete copy of object. |
void |
deepMove(long tick)
Move object and all children by tick |
void |
displayStructure(java.lang.String prefix,
java.io.PrintStream out)
|
void |
drawThumbNail(java.awt.Graphics2D g,
java.awt.Rectangle rect,
PartView panel)
|
java.awt.Color |
getColor()
|
long |
getDistance()
|
long |
getDurationInTicks()
|
EditHistoryContainer |
getEditHistoryContainer()
|
long |
getEndTick()
|
java.awt.Rectangle |
getEventBounds()
|
Lane |
getLane()
|
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 |
MidiPart |
getReferredPart()
|
long |
getStartTick()
|
FrinikaTrackWrapper |
getTrack()
|
void |
importFromMidiTrack(long startTickArg,
long endTickArg)
Import Midi events into a Part from a section of track. |
boolean |
isSelected()
used by the GUI |
long |
leftTickForMove()
return the left tick mark for move operations without quantize a move to destTick should move item by destTick - leftTickForMove(); |
void |
moveBy(long deltaTick)
Moves the part and all it contains by deltaTick. |
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 |
removeFromModel()
Remove from model making sure the history is informed |
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. |
long |
rightTickForMove()
|
void |
setBoundsFromEvents()
Rebuild the bounds from the multievent startTicks |
void |
setEndTick(double tick)
|
void |
setName(java.lang.String name)
|
void |
setReferredPart(MidiPart referredPart)
|
void |
setSelected(boolean b)
used by the GUI |
void |
setStartTick(double tick)
NOTE AudioPert overrides these methods Set the start tick. |
| Methods inherited from class com.frinika.sequencer.model.MidiPart |
|---|
addCommitListener, createPropertiesPanel, importFromMidiTrack, initContextMenu, removeCommitListener |
| Methods inherited from class com.frinika.sequencer.model.Part |
|---|
addPluginRightButtonMenu, createPropertiesDialog, getDuration, getDurationInSecs, getEditParent, getEnd, getEndInSecs, getMultiPart, getPartResourceId, getRootPart, getStart, getStartInSecs, getTransparentColor, isAttached, setChanged, setColor, setEditParent, setEndInSecs, setMultiPart, setPartResourceId, setRootPart, setStartInSecs, showContextMenu, showPropertiesDialog, showRightButtonMenu |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MidiPartGhost(MidiPart referredPart,
Lane lane)
public MidiPartGhost(MidiPart referredPart,
long deltaTicks)
| Method Detail |
|---|
public MidiPart getReferredPart()
getReferredPart in interface Ghostpublic void setReferredPart(MidiPart referredPart)
public long getDistance()
public void add(MultiEvent ev)
MidiPart
add in interface EditHistoryRecorder<MultiEvent>add in class MidiPart
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
EditHistoryRecordable
clone in interface EditHistoryRecordableclone in class MidiPartjava.lang.CloneNotSupportedExceptionpublic void commitEventsAdd()
commitEventsAdd in class MidiPartpublic void commitEventsRemove()
Part
commitEventsRemove in class MidiPartpublic void commitAddPerformed(MultiEvent event)
commitAddPerformed in interface CommitListenerevent - note that MultiEvent is not a subclass of Java's Event class, here the source-object is directly passed as parameter to the listener-method without being wrapped in an Eventpublic void commitRemovePerformed(MultiEvent event)
commitRemovePerformed in interface CommitListenerevent - note that MultiEvent is not a subclass of Java's Event class, here the source-object is directly passed as parameter to the listener-method without being wrapped in an Eventprotected MultiEvent commitAddClone(MultiEvent multiEvent)
protected void commitRemoveClone(MultiEvent multiEvent)
public void copyBy(double deltaTick,
Lane dst)
copyBy in class MidiPartpublic Selectable deepCopy(Selectable parent)
Selectable
deepCopy in interface SelectabledeepCopy in class MidiPartparent - owner of the new object;
public void deepMove(long tick)
Selectable
deepMove in interface SelectabledeepMove in class MidiPart
public void drawThumbNail(java.awt.Graphics2D g,
java.awt.Rectangle rect,
PartView panel)
drawThumbNail in class MidiPartpublic EditHistoryContainer getEditHistoryContainer()
getEditHistoryContainer in class MidiPartpublic int getMidiChannel()
getMidiChannel in class MidiPartpublic java.util.SortedSet<MultiEvent> getMultiEvents()
MidiPart
getMultiEvents in class MidiPart
public java.util.SortedSet<MultiEvent> getMultiEventSubset(long startTick,
long endTick)
MidiPart
getMultiEventSubset in class MidiPartpublic java.lang.String getName()
getName in class MidiPartpublic int[] getPitchRange()
MidiPart
getPitchRange in class MidiPartpublic FrinikaTrackWrapper getTrack()
getTrack in class MidiPart
public void importFromMidiTrack(long startTickArg,
long endTickArg)
MidiPart
importFromMidiTrack in class MidiPartstartTickArg - start tick (inclusive)endTickArg - end tick (exclusive)
public void moveContentsBy(double dTick,
Lane dstLane)
Part
moveContentsBy in class MidiPartprotected void moveItemsBy(long deltaTick)
MidiPart
moveItemsBy in class MidiPartpublic void onLoad()
MidiPart
onLoad in class MidiPartpublic void rebuildMultiEventEndTickComparables()
rebuildMultiEventEndTickComparables in class MidiPartpublic void remove(MultiEvent multiEvent)
MidiPart
remove in interface EditHistoryRecorder<MultiEvent>remove in class MidiPartpublic void restoreFromClone(EditHistoryRecordable o)
EditHistoryRecordable
restoreFromClone in interface EditHistoryRecordablerestoreFromClone in class MidiPartpublic void setBoundsFromEvents()
MidiPart
setBoundsFromEvents in class MidiPartpublic void setName(java.lang.String name)
setName in class MidiPartpublic void addToModel()
Selectable
addToModel in interface SelectableaddToModel in class Part
public void displayStructure(java.lang.String prefix,
java.io.PrintStream out)
displayStructure in class Partpublic java.awt.Color getColor()
getColor in class Partpublic long getDurationInTicks()
getDurationInTicks in class Partpublic long getEndTick()
getEndTick in class Partpublic java.awt.Rectangle getEventBounds()
getEventBounds in class Partpublic Lane getLane()
getLane in interface GhostgetLane in class Partpublic long getStartTick()
getStartTick in interface GhostgetStartTick in class Partpublic boolean isSelected()
Part
isSelected in interface ItemisSelected in class Partpublic long leftTickForMove()
Selectable
leftTickForMove in interface SelectableleftTickForMove in class Partpublic void moveBy(long deltaTick)
Part
moveBy in class Partpublic void removeFromModel()
Selectable
removeFromModel in interface SelectableremoveFromModel in class Partpublic long rightTickForMove()
rightTickForMove in interface SelectablerightTickForMove in class Partpublic void setEndTick(double tick)
setEndTick in class Parttick - new end tick for display purpose onlypublic void setSelected(boolean b)
Part
setSelected in interface ItemsetSelected in interface SelectablesetSelected in class Partpublic void setStartTick(double tick)
Part
setStartTick in class Parttick - new start tick
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||