|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.jeuclid.layout.JEuclidView
public class JEuclidView
| Nested Class Summary | |
|---|---|
static class |
JEuclidView.NodeRect
Data structure for storing a Node along with its rendering
boundary (Rectangle2D). |
| Constructor Summary | |
|---|---|
JEuclidView(Node node,
LayoutContext layoutContext,
Graphics2D layoutGraphics)
Default Constructor. |
|
| Method Summary | |
|---|---|
void |
draw(Graphics2D g,
float x,
float y)
Draw this view onto a Graphics context. |
float |
getAscentHeight()
|
float |
getDescentHeight()
|
org.w3c.dom.views.DocumentView |
getDocument()
|
Graphics2D |
getGraphics()
|
LayoutInfo |
getInfo(LayoutableNode node)
Retrieve the Info object for a given child. |
List<JEuclidView.NodeRect> |
getNodesAt(float x,
float y,
float offsetX,
float offsetY)
Get the node and rendering information from a mouse position. |
Rectangle2D |
getRect(float offsetX,
float offsetY,
LayoutableNode node)
Gets the absolute Bounds for a given node and offset. |
float |
getWidth()
|
void |
handleEvent(Event evt)
|
static DocumentElement |
replaceNodes(DocumentElement jDocOld,
Node oldNode,
Node newNode)
replace old node with new node in JEuclid document. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JEuclidView(Node node,
LayoutContext layoutContext,
Graphics2D layoutGraphics)
node - document to layout.layoutGraphics - Graphics context to use for layout calculations. This should
be compatible to the context used for painting, but does not
have to be the same. If it is null, a default Graphics context
is created.layoutContext - layoutContext to use.| Method Detail |
|---|
public static DocumentElement replaceNodes(DocumentElement jDocOld,
Node oldNode,
Node newNode)
jDocOld - old JEuclid documentoldNode - Node to removenewNode - Node to insert
public org.w3c.dom.views.DocumentView getDocument()
getDocument in interface org.w3c.dom.views.AbstractView
public void draw(Graphics2D g,
float x,
float y)
x - x-offset for left edgey - y-offset for baselineg - Graphics context for painting. Should be compatible to the
context used during construction, but does not have to be
the same.public LayoutInfo getInfo(LayoutableNode node)
getInfo in interface LayoutViewnode - the node
public float getWidth()
public float getAscentHeight()
public float getDescentHeight()
public Graphics2D getGraphics()
getGraphics in interface LayoutViewpublic void handleEvent(Event evt)
handleEvent in interface EventListener
public List<JEuclidView.NodeRect> getNodesAt(float x,
float y,
float offsetX,
float offsetY)
x - x-coordy - y-coordoffsetX - starting x position offsetoffsetY - starting y position offset
public Rectangle2D getRect(float offsetX,
float offsetY,
LayoutableNode node)
offsetX - x position offset to nodeoffsetY - y position offset to nodenode - A layoutable node which was layouted in the current view.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||