|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.editor.textEditor.TextPieceInfoImpl
public class TextPieceInfoImpl
Info about text piece from textual node identified by nodeID.
Constructor Summary | |
---|---|
TextPieceInfoImpl(String nodeID,
int offset,
int originalOffset,
String text)
Constructor. |
Method Summary | |
---|---|
static String |
buildID(String nodeID,
int offset,
int length)
Static method to build text piece id from nodeID, offset and length. |
int |
contains(String nodeID,
int offset,
int length)
Deprecated. ak sa ti to hodi pouzit informuj STUDVU |
String |
getID()
Returns id for text piece in this TextPieceInfo. |
int |
getLastIndex()
Index of last character of this text piece in whole displayed text |
int |
getLength()
Length of the text piece. |
static int |
getLength(String id)
Parses length of text piece from text piece's id. |
String |
getNodeID()
Identification of node holding the text (text node, cdata node, attribute). |
static String |
getNodeID(String id)
Parses node id with multiplicity from id. |
int |
getOffset()
Index of the first character of this text piece in whole displayed text of textual node. |
static int |
getOffset(String id)
Parses offset of text piece from text piece id. |
int |
getOriginalOffset()
Index of the first character of this text piece in whole original text of textual node. |
static String |
getParsedNodeId(String nodeId)
Parses node id without multiplicity - anything include and after ":" is omitted. |
String |
getText()
Returns text of this text piece. |
static boolean |
isTextPieceId(String id)
True if parameter id is text piece/selection id, it means of form int |
static void |
tidyUpIds(List<String> ids)
Any text piece ids which are neighbour are joined together. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextPieceInfoImpl(String nodeID, int offset, int originalOffset, String text)
nodeID
- id of text node of text pieceoffset
- of first character in displayed text of text nodeoriginalOffset
- offset of first character in original text of text nodetext
- text from textual node with id nodeID and starting at position
offsetMethod Detail |
---|
public String getID()
getID
in interface ITextPieceInfo
public String getNodeID()
ITextPieceInfo
getNodeID
in interface ITextPieceInfo
public int getOffset()
ITextPieceInfo
getOffset
in interface ITextPieceInfo
public int getLastIndex()
ITextPieceInfo
getLastIndex
in interface ITextPieceInfo
public int getLength()
ITextPieceInfo
getLength
in interface ITextPieceInfo
public String getText()
ITextPieceInfo
getText
in interface ITextPieceInfo
public static String getNodeID(String id)
id
- some id
public static final String getParsedNodeId(String nodeId)
nodeId
- id of node
public static int getOffset(String id)
id
- id of text piece
public static int getLength(String id)
id
- id of text piece
@Deprecated public int contains(String nodeID, int offset, int length)
contains
in interface ITextPieceInfo
nodeID
- id of text nodeoffset
- offset in text piece
public static boolean isTextPieceId(String id)
id
- to examine
public static final String buildID(String nodeID, int offset, int length)
nodeID
- id of node of text pieceoffset
- of first character in text of text nodelength
- of text to identify
public static void tidyUpIds(List<String> ids)
ids
- text piece ids to tidy uppublic int getOriginalOffset()
ITextPieceInfo
getOriginalOffset
in interface ITextPieceInfo
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |