|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.nite.gui.textviewer.NTextElement
public class NTextElement
An individual piece of text which can be added to an NTextArea. Each NTextElement can be associated with two XML source elements - one which caused the element to be displayed and another which will be edited when the text is clicked on. It can also have its own style.
Field Summary | |
---|---|
static int |
UNTIMED
|
Constructor Summary | |
---|---|
NTextElement()
|
|
NTextElement(java.lang.String s,
java.lang.String style)
Creates a new NTextElement with the specified content and display style |
|
NTextElement(java.lang.String s,
java.lang.String style,
double start,
double end)
|
|
NTextElement(java.lang.String t,
java.lang.String s,
double start,
double end,
ObjectModelElement element)
Creates a new NTextElement with the specified content and display style; with start and end times and with an object model element (an item in the source document with which this text element is associated). |
|
NTextElement(java.lang.String t,
java.lang.String s,
int pos,
double start,
double end)
Creates a new NTextElement with the specified content and display style, and with start and end times |
|
NTextElement(java.lang.String t,
java.lang.String s,
int pos,
double start,
double end,
ObjectModelElement element)
Creates a new NTextElement with the specified content and display style; with start and end times and with an object model element (an item in the source document with which this text element is associated). |
|
NTextElement(java.lang.String t,
java.lang.String s,
int pos,
double start,
double end,
ObjectModelElement element,
ObjectModelElement edit_element)
Creates a new NTextElement with the specified content and display style; with start and end times and with TWO object model elements - the first is the element that caused this element to be displayed, and the second is the element associated with this for editing purposes. |
|
NTextElement(java.lang.String s,
java.lang.String style,
ObjectModelElement element)
Creates a new NTextElement with the specified content and display style and with an object model element (an item in the source document with which this text element is associated). |
|
NTextElement(java.lang.String s,
java.lang.String style,
ObjectModelElement element,
ObjectModelElement edit_element)
Creates a new NTextElement with the specified content and display style and with TWO object model elements - the first is the element that caused this element to be displayed, and the second is the element associated with this for editing purposes. |
Method Summary | |
---|---|
NTextElement |
copy()
Returns a new copy of this NTextElement |
ObjectModelElement |
getDataElement()
Returns the dataElement. |
ObjectModelElement |
getEditElement()
Returns the display Element - by default this is the same as the dataElement, but it may be different if the displayed element is different to the edited one. |
double |
getEndTime()
|
int |
getPosition()
|
double |
getStartTime()
|
java.lang.String |
getStyle()
Return the style object which specifies the way the content is displayed |
java.lang.String |
getText()
Returns the content of this text element as a string |
void |
setDataElement(ObjectModelElement dataElement)
Sets the dataElement. |
void |
setEditElement(ObjectModelElement editElement)
Sets the editElement - by default this is the same as the dataElement, but it may be different for specialised displays (where one wishes particular highlighting and editing behaviour). |
void |
setEndTime(double e)
|
void |
setPosition(int p)
|
void |
setStartTime(double s)
|
void |
setStyle(java.lang.String name)
Sets the content of this text element to be displayed in the specified style |
void |
setText(java.lang.String s)
Sets the content of this text element to be the argument string |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int UNTIMED
Constructor Detail |
---|
public NTextElement(java.lang.String t, java.lang.String s, int pos, double start, double end)
public NTextElement(java.lang.String s, java.lang.String style)
public NTextElement(java.lang.String t, java.lang.String s, int pos, double start, double end, ObjectModelElement element)
public NTextElement(java.lang.String s, java.lang.String style, double start, double end)
public NTextElement(java.lang.String t, java.lang.String s, double start, double end, ObjectModelElement element)
public NTextElement(java.lang.String s, java.lang.String style, ObjectModelElement element)
public NTextElement(java.lang.String t, java.lang.String s, int pos, double start, double end, ObjectModelElement element, ObjectModelElement edit_element)
public NTextElement(java.lang.String s, java.lang.String style, ObjectModelElement element, ObjectModelElement edit_element)
public NTextElement()
Method Detail |
---|
public NTextElement copy()
public void setStartTime(double s)
public void setEndTime(double e)
public int getPosition()
public double getStartTime()
public double getEndTime()
public java.lang.String getText()
public void setText(java.lang.String s)
public void setPosition(int p)
public java.lang.String getStyle()
public void setStyle(java.lang.String name)
public java.lang.String toString()
toString
in class java.lang.Object
public ObjectModelElement getDataElement()
public void setDataElement(ObjectModelElement dataElement)
dataElement
- The dataElement to setpublic ObjectModelElement getEditElement()
public void setEditElement(ObjectModelElement editElement)
dataElement
- The dataElement to set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |