|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.frinika.sequencer.model.Part
public abstract class Part
A Part encapsulates what can be displayed in the partview. The startTick and endTick define the range in the display. (These do not need to correspond to the range of any contained items) It's Lane defines the row of display.
Nested Class Summary | |
---|---|
protected class |
Part.PropertiesPanel
Optionally to be extended by subclass and returned via createProperitesPanel(). |
Field Summary | |
---|---|
protected Lane |
lane
|
protected boolean |
selected
|
Constructor Summary | |
---|---|
protected |
Part()
|
|
Part(Lane lane)
Construct a new Part and add it to it's lane. |
Method Summary | |
---|---|
static void |
addPluginRightButtonMenu(MenuPlugin menuPlugin)
Allow custom menus to be added. |
void |
addToModel()
Add to the model making sure the history is informed |
abstract java.lang.Object |
clone()
If restoration from a clone is needed - this method should return a clone otherwise throw the CloneNotSupportedException |
abstract void |
commitEventsAdd()
|
abstract void |
commitEventsRemove()
Called when part is removed from the model |
abstract void |
copyBy(double tick,
Lane dst)
|
protected javax.swing.JDialog |
createPropertiesDialog(ProjectFrame frame)
|
protected OptionsEditor |
createPropertiesPanel(ProjectFrame frame)
Create PropertiesPanel. |
void |
displayStructure(java.lang.String prefix,
java.io.PrintStream out)
|
abstract void |
drawThumbNail(java.awt.Graphics2D g,
java.awt.Rectangle rect,
PartView partView)
|
java.awt.Color |
getColor()
|
double |
getDuration(boolean sampleBased)
|
double |
getDurationInSecs()
|
long |
getDurationInTicks()
|
Part |
getEditParent()
|
double |
getEnd(boolean sampleBased)
|
double |
getEndInSecs()
|
long |
getEndTick()
|
java.awt.Rectangle |
getEventBounds()
|
Lane |
getLane()
|
MultiPart |
getMultiPart()
|
java.lang.Long |
getPartResourceId()
|
Part |
getRootPart()
|
double |
getStart(boolean sampleBased)
|
double |
getStartInSecs()
|
long |
getStartTick()
|
java.awt.Color |
getTransparentColor()
|
protected void |
initContextMenu(ProjectFrame frame,
javax.swing.JPopupMenu popup)
Fills the context menu with part-type specific (or possibly even instance-specific) items. |
boolean |
isAttached()
|
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)
Deprecated. |
abstract void |
moveContentsBy(double tick,
Lane dstLane)
move the contents by tick into dstLane |
protected abstract void |
moveItemsBy(long deltaTick)
Deprecated. |
abstract void |
onLoad()
|
void |
removeFromModel()
Remove from model making sure the history is informed |
long |
rightTickForMove()
|
void |
setChanged()
Must be called if structure is changed. |
void |
setColor(java.awt.Color col)
|
void |
setEditParent(Part editParent)
|
void |
setEndInSecs(double end)
|
void |
setEndTick(double tick)
|
void |
setMultiPart(MultiPart multiPart)
|
void |
setPartResourceId(java.lang.Long partResourceId)
|
void |
setRootPart(Part rootPart)
|
void |
setSelected(boolean b)
used by the GUI |
void |
setStartInSecs(double start)
|
void |
setStartTick(double tick)
NOTE AudioPert overrides these methods Set the start tick. |
void |
showContextMenu(ProjectFrame frame,
java.awt.Component invoker,
int x,
int y)
Shows the right-click context menu of the current component. |
void |
showPropertiesDialog(ProjectFrame frame)
|
boolean |
showRightButtonMenu(java.awt.Component invoker,
int x,
int y)
Override to customize the right button popup |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.frinika.sequencer.model.Selectable |
---|
deepCopy, deepMove |
Methods inherited from interface com.frinika.sequencer.model.EditHistoryRecordable |
---|
restoreFromClone |
Field Detail |
---|
protected Lane lane
protected transient boolean selected
Constructor Detail |
---|
protected Part()
public Part(Lane lane)
lane
- Method Detail |
---|
public Part getEditParent()
public void setEditParent(Part editParent)
public Part getRootPart()
public void setRootPart(Part rootPart)
public java.lang.Long getPartResourceId()
public void setPartResourceId(java.lang.Long partResourceId)
public Lane getLane()
public long getDurationInTicks()
public long getStartTick()
public long getEndTick()
public double getDurationInSecs()
public double getStartInSecs()
public double getEndInSecs()
public double getDuration(boolean sampleBased)
public double getStart(boolean sampleBased)
public double getEnd(boolean sampleBased)
public boolean isSelected()
isSelected
in interface Item
public void setSelected(boolean b)
setSelected
in interface Item
setSelected
in interface Selectable
public void setStartTick(double tick)
tick
- new start tickpublic void setEndTick(double tick)
tick
- new end tick for display purpose onlypublic void setStartInSecs(double start)
public void setEndInSecs(double end)
public void moveBy(long deltaTick)
tick
- protected abstract void moveItemsBy(long deltaTick)
public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException
EditHistoryRecordable
clone
in interface EditHistoryRecordable
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public abstract void commitEventsAdd()
public abstract void commitEventsRemove()
public abstract void copyBy(double tick, Lane dst)
public abstract void moveContentsBy(double tick, Lane dstLane)
tick
- public void removeFromModel()
Selectable
removeFromModel
in interface Selectable
public boolean isAttached()
public void addToModel()
Selectable
addToModel
in interface Selectable
public long leftTickForMove()
Selectable
leftTickForMove
in interface Selectable
public long rightTickForMove()
rightTickForMove
in interface Selectable
public java.awt.Rectangle getEventBounds()
public abstract void onLoad() throws java.lang.Exception
java.lang.Exception
public abstract void drawThumbNail(java.awt.Graphics2D g, java.awt.Rectangle rect, PartView partView)
public void displayStructure(java.lang.String prefix, java.io.PrintStream out)
public boolean showRightButtonMenu(java.awt.Component invoker, int x, int y)
invoker
- x
- y
-
public static void addPluginRightButtonMenu(MenuPlugin menuPlugin)
menuPlugin
- public void showContextMenu(ProjectFrame frame, java.awt.Component invoker, int x, int y)
frame
- invoker
- x
- y
- protected void initContextMenu(ProjectFrame frame, javax.swing.JPopupMenu popup)
popup
- public java.awt.Color getTransparentColor()
public java.awt.Color getColor()
public void setColor(java.awt.Color col)
public void showPropertiesDialog(ProjectFrame frame)
protected javax.swing.JDialog createPropertiesDialog(ProjectFrame frame)
protected OptionsEditor createPropertiesPanel(ProjectFrame frame)
frame
-
public MultiPart getMultiPart()
public void setMultiPart(MultiPart multiPart)
public void setChanged()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |