public class ElementUtil
extends java.lang.Object
| Constructor and Description |
|---|
ElementUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
convert(org.gjt.sp.jedit.Buffer buffer,
javax.swing.tree.DefaultMutableTreeNode node)
Assumes the user objects in the given node, and child nodes, are
objects that implement SideKickElement.
|
static javax.swing.text.Position |
createEndPosition(org.gjt.sp.jedit.Buffer buffer,
SideKickElement element)
Convert the end of a Location to a Position.
|
static javax.swing.text.Position |
createPosition(int line_offset,
int column_offset) |
static javax.swing.text.Position |
createStartPosition(org.gjt.sp.jedit.Buffer buffer,
SideKickElement element)
Convert the start of a Location to a Position.
|
public static javax.swing.text.Position createStartPosition(org.gjt.sp.jedit.Buffer buffer,
SideKickElement element)
buffer - the buffer containing the child element/text in questionelement - the SideKickElement representing some text in the bufferpublic static javax.swing.text.Position createEndPosition(org.gjt.sp.jedit.Buffer buffer,
SideKickElement element)
buffer - the buffer containing the child element/text in questionelement - the SideKickElement representing some text in the bufferpublic static javax.swing.text.Position createPosition(int line_offset,
int column_offset)
public static void convert(org.gjt.sp.jedit.Buffer buffer,
javax.swing.tree.DefaultMutableTreeNode node)
buffer - the Buffer representing the text that is to be displayed
in SideKick. This is used to calculate positions for the individual
tree nodes.node - the root node of the tree to convert.