com.frinika.sequencer.model
Class TextPart

java.lang.Object
  extended by com.frinika.sequencer.model.Part
      extended by com.frinika.sequencer.model.TextPart
All Implemented Interfaces:
Item, EditHistoryRecordable, MenuPlugable, Selectable, java.io.Serializable

public class TextPart
extends Part

In-place editable text part.

Author:
Jens Gulden
See Also:
Serialized Form

Nested Class Summary
protected  class TextPart.TextPartPropertiesPanel
          Instance returned via createProperitesPanel().
 
Nested classes/interfaces inherited from class com.frinika.sequencer.model.Part
Part.PropertiesPanel
 
Field Summary
static int DEFAULT_WIDTH
           
static java.lang.String EMPTY_STRING
           
protected  javax.swing.JTextArea renderLabel
           
protected  java.lang.String text
           
 
Fields inherited from class com.frinika.sequencer.model.Part
lane, selected
 
Constructor Summary
TextPart(TextLane lane)
           
 
Method Summary
 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 tick, 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 partView)
           
 void endInplaceEdit(PartView partView)
           
 java.lang.String getText()
           
protected  void initContextMenu(ProjectFrame frame, javax.swing.JPopupMenu popup)
          Fills the part's context menu with menu-items.
 void moveContentsBy(double tick, Lane dstLane)
          move the contents by tick into dstLane
protected  void moveItemsBy(long deltaTick)
           
 void onLoad()
           
 void restoreFromClone(EditHistoryRecordable object)
          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 setText(java.lang.String text)
           
 void startInplaceEdit(PartView partView)
           
 
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
 

Field Detail

DEFAULT_WIDTH

public static final int DEFAULT_WIDTH
See Also:
Constant Field Values

EMPTY_STRING

public static final java.lang.String EMPTY_STRING
See Also:
Constant Field Values

text

protected java.lang.String text

renderLabel

protected javax.swing.JTextArea renderLabel
Constructor Detail

TextPart

public TextPart(TextLane lane)
Parameters:
lane -
Method Detail

getText

public java.lang.String getText()

setText

public void setText(java.lang.String text)

startInplaceEdit

public void startInplaceEdit(PartView partView)

endInplaceEdit

public void endInplaceEdit(PartView partView)

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Description copied from interface: EditHistoryRecordable
If restoration from a clone is needed - this method should return a clone otherwise throw the CloneNotSupportedException

Specified by:
clone in interface EditHistoryRecordable
Specified by:
clone in class Part
Returns:
Throws:
java.lang.CloneNotSupportedException

commitEventsAdd

public void commitEventsAdd()
Specified by:
commitEventsAdd in class Part

commitEventsRemove

public void commitEventsRemove()
Description copied from class: Part
Called when part is removed from the model

Specified by:
commitEventsRemove in class Part

copyBy

public void copyBy(double tick,
                   Lane dst)
Specified by:
copyBy in class Part

drawThumbNail

public void drawThumbNail(java.awt.Graphics2D g,
                          java.awt.Rectangle rect,
                          PartView partView)
Specified by:
drawThumbNail in class Part

moveContentsBy

public void moveContentsBy(double tick,
                           Lane dstLane)
Description copied from class: Part
move the contents by tick into dstLane

Specified by:
moveContentsBy in class Part

moveItemsBy

protected void moveItemsBy(long deltaTick)
Specified by:
moveItemsBy in class Part

onLoad

public void onLoad()
Specified by:
onLoad in class Part

deepCopy

public Selectable deepCopy(Selectable parent)
Description copied from interface: Selectable
Complete copy of object.

Parameters:
parent - owner of the new object;
Returns:

deepMove

public void deepMove(long tick)
Description copied from interface: Selectable
Move object and all children by tick


restoreFromClone

public void restoreFromClone(EditHistoryRecordable object)
Description copied from interface: EditHistoryRecordable
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.


initContextMenu

protected void initContextMenu(ProjectFrame frame,
                               javax.swing.JPopupMenu popup)
Fills the part's context menu with menu-items.

Overrides:
initContextMenu in class Part
Parameters:
popup -

createPropertiesPanel

protected OptionsEditor createPropertiesPanel(ProjectFrame frame)
Create PropertiesPanel.

Overrides:
createPropertiesPanel in class Part
Parameters:
frame -
Returns: