|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--kinetic.util.Segment
A segment of text bundled with timing infromation and optional attributes which composite effects can respond to.
Field Summary | |
protected javax.swing.text.AttributeSet |
attributes
set of attributes for this segment of text |
protected javax.swing.text.StyledDocument |
document
a styled document containing decorated text |
protected int |
documentLength
length of this segment of text in the styled document |
protected int |
documentStart
starting position of this segment of text in the style document |
double |
leadIn
lead in time for this segment of text |
double |
leadOut
lead out time for this segment of text |
double |
runTime
run time or sustain of this segment of text |
java.lang.String |
text
content of the segment in string format |
Constructor Summary | |
Segment()
creates a new isntance of a segment |
|
Segment(double in,
double run,
double out,
java.lang.String s)
creates new instance of a segment with the given timing and text information |
|
Segment(double in,
double run,
double out,
java.lang.String s,
javax.swing.text.StyledDocument d,
int start)
creates new instance of a segment with the given timing and text information and adopts the attributes fro the specifed position the styled document |
|
Segment(javax.swing.text.StyledDocument d,
int start,
int length)
creates new instance of a segment with the specifed text the styled document |
Method Summary | |
javax.swing.text.StyledDocument |
getDocument()
gets the styled document associated with this segment |
int |
getDocumentLength()
gets the length of the segment in the styled document |
int |
getDocumentStart()
gets the start position in the styled document associated with this segment |
double |
getDuration()
gets the full duration of the segment |
java.awt.Font |
getFont()
gets the font associated with the segment if available |
java.awt.Color |
getForground()
gets the color associated with the segment if available |
double |
getLeadIn()
gets the lead in or attack time of the segment |
double |
getLeadOut()
gets the lead out or decay time of the segment |
double |
getRunTime()
gets the run/sustain time of the segment |
java.lang.String |
getText()
get the text of the segment in string format |
boolean |
hasTag(java.lang.String tagName)
queries if this segment has a particular attribute associated with it |
void |
setDocument(javax.swing.text.StyledDocument d)
sets the styled document associated with this segment |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected javax.swing.text.StyledDocument document
protected javax.swing.text.AttributeSet attributes
protected int documentStart
protected int documentLength
public double leadIn
public double leadOut
public double runTime
public java.lang.String text
Constructor Detail |
public Segment()
public Segment(double in, double run, double out, java.lang.String s)
in
- attack/lead in time in msrun
- sustain time in msout
- decay/lead out time in mss
- text in the segmentpublic Segment(double in, double run, double out, java.lang.String s, javax.swing.text.StyledDocument d, int start)
in
- attack/lead in time in msrun
- sustain time in msout
- decay/lead out time in mss
- text in the segmentd
- styled document contained attribute informationstart
- position in the styled document for attributespublic Segment(javax.swing.text.StyledDocument d, int start, int length)
d
- styled document contained attribute informationstart
- position in the styled document for attributeslength
- of the text in the styled documentMethod Detail |
public java.lang.String getText()
public double getDuration()
public double getRunTime()
public double getLeadIn()
public double getLeadOut()
public java.awt.Font getFont()
public java.awt.Color getForground()
public void setDocument(javax.swing.text.StyledDocument d)
d
- styled documentpublic javax.swing.text.StyledDocument getDocument()
public int getDocumentStart()
public int getDocumentLength()
public boolean hasTag(java.lang.String tagName)
tagName
- name of the attribute tage to look for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |