|
||||||||||
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 Ghost
public 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 EditHistoryRecordable
clone
in class MidiPart
java.lang.CloneNotSupportedException
public void commitEventsAdd()
commitEventsAdd
in class MidiPart
public void commitEventsRemove()
Part
commitEventsRemove
in class MidiPart
public void commitAddPerformed(MultiEvent event)
commitAddPerformed
in interface CommitListener
event
- 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 CommitListener
event
- 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 MidiPart
public Selectable deepCopy(Selectable parent)
Selectable
deepCopy
in interface Selectable
deepCopy
in class MidiPart
parent
- owner of the new object;
public void deepMove(long tick)
Selectable
deepMove
in interface Selectable
deepMove
in class MidiPart
public void drawThumbNail(java.awt.Graphics2D g, java.awt.Rectangle rect, PartView panel)
drawThumbNail
in class MidiPart
public EditHistoryContainer getEditHistoryContainer()
getEditHistoryContainer
in class MidiPart
public int getMidiChannel()
getMidiChannel
in class MidiPart
public java.util.SortedSet<MultiEvent> getMultiEvents()
MidiPart
getMultiEvents
in class MidiPart
public java.util.SortedSet<MultiEvent> getMultiEventSubset(long startTick, long endTick)
MidiPart
getMultiEventSubset
in class MidiPart
public java.lang.String getName()
getName
in class MidiPart
public int[] getPitchRange()
MidiPart
getPitchRange
in class MidiPart
public FrinikaTrackWrapper getTrack()
getTrack
in class MidiPart
public void importFromMidiTrack(long startTickArg, long endTickArg)
MidiPart
importFromMidiTrack
in class MidiPart
startTickArg
- start tick (inclusive)endTickArg
- end tick (exclusive)public void moveContentsBy(double dTick, Lane dstLane)
Part
moveContentsBy
in class MidiPart
protected void moveItemsBy(long deltaTick)
MidiPart
moveItemsBy
in class MidiPart
public void onLoad()
MidiPart
onLoad
in class MidiPart
public void rebuildMultiEventEndTickComparables()
rebuildMultiEventEndTickComparables
in class MidiPart
public void remove(MultiEvent multiEvent)
MidiPart
remove
in interface EditHistoryRecorder<MultiEvent>
remove
in class MidiPart
public void restoreFromClone(EditHistoryRecordable o)
EditHistoryRecordable
restoreFromClone
in interface EditHistoryRecordable
restoreFromClone
in class MidiPart
public void setBoundsFromEvents()
MidiPart
setBoundsFromEvents
in class MidiPart
public void setName(java.lang.String name)
setName
in class MidiPart
public void addToModel()
Selectable
addToModel
in interface Selectable
addToModel
in class Part
public void displayStructure(java.lang.String prefix, java.io.PrintStream out)
displayStructure
in class Part
public java.awt.Color getColor()
getColor
in class Part
public long getDurationInTicks()
getDurationInTicks
in class Part
public long getEndTick()
getEndTick
in class Part
public java.awt.Rectangle getEventBounds()
getEventBounds
in class Part
public Lane getLane()
getLane
in interface Ghost
getLane
in class Part
public long getStartTick()
getStartTick
in interface Ghost
getStartTick
in class Part
public boolean isSelected()
Part
isSelected
in interface Item
isSelected
in class Part
public long leftTickForMove()
Selectable
leftTickForMove
in interface Selectable
leftTickForMove
in class Part
public void moveBy(long deltaTick)
Part
moveBy
in class Part
public void removeFromModel()
Selectable
removeFromModel
in interface Selectable
removeFromModel
in class Part
public long rightTickForMove()
rightTickForMove
in interface Selectable
rightTickForMove
in class Part
public void setEndTick(double tick)
setEndTick
in class Part
tick
- new end tick for display purpose onlypublic void setSelected(boolean b)
Part
setSelected
in interface Item
setSelected
in interface Selectable
setSelected
in class Part
public void setStartTick(double tick)
Part
setStartTick
in class Part
tick
- new start tick
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |