public class SGMXBeanImpl extends Object implements SGMXBean, MXNodeAlgorithm
SGMXBean
interface.Constructor and Description |
---|
SGMXBeanImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addHighlightedNode(int nodeId)
Adds the node with the nodeId to the list of nodes that are to be
highlighted in the scene.
|
void |
addHighlightedRegion(int windowId,
double x,
double y,
double w,
double h)
Adds the specified region to the list of regions to be highlighted
in the scene.
|
String |
getBounds(int nodeId)
Retrieves the bounds information about the particular node.
|
String |
getCSSInfo(int nodeId)
Retrieves the CSS information about the particular node.
|
String |
getSGTree(int windowId)
Returns the Scene-graph hierarchy in a simple tree-like model for
given window.
|
String |
getWindows()
Returns the list of JavaFX windows.
|
String |
makeScreenShot(int nodeId)
Makes a screen-shot of the selected node in the scene's coordinates
and stores it into a temporary file in the PNG format.
|
String |
makeScreenShot(int windowId,
double x,
double y,
double w,
double h)
Makes a screen-shot of the specified region in the scene's coordinates
and stores it into a temporary file in the PNG format.
|
void |
pause()
Pauses the Scene-graph which means it pause all animations, media players, etc.
|
Object |
processContainerNode(Parent parent,
MXNodeAlgorithmContext ctx)
|
Object |
processLeafNode(Node node,
MXNodeAlgorithmContext ctx)
Method for processing leaf nodes.
|
void |
removeHighlightedNode(int nodeId)
Removes the nodeId node from the list of nodes that are to be
highlighted in the scene.
|
void |
removeHighlightedRegion(int windowId,
double x,
double y,
double w,
double h)
Removes the specified region from the list of regions to be highlighted
in the scene.
|
void |
resume()
Resumes the previously paused Scene-graph into the normal operation.
|
void |
step()
Produces single JavaFX pulse and pauses the Scene-graph again.
|
public void pause()
SGMXBean.resume()
.
If the Scene-graph is already "PAUSED" then this method has no effect.public void resume()
public void step() throws IllegalStateException
SGMXBean.pause()
method)
prior to calling this function otherwise the IllegalStateException
is thrown.step
in interface SGMXBean
IllegalStateException
- when Scene-graph is not "PAUSED"public String getWindows() throws IllegalStateException
SGMXBean.getSGTree(int)
method.
The SGMXBean.pause()
method should be called prior to calling this method.
Otherwise the IllegalStateException
is thrown.
The result is in the format of JSON string.getWindows
in interface SGMXBean
IllegalStateException
- when Scene-graph is not "PAUSED"public String getSGTree(int windowId) throws IllegalStateException
SGMXBean.getCSSInfo(int)
.
The SGMXBean.pause()
method should be called prior to calling this method.
Otherwise the IllegalStateException
is thrown.
The result is in the format of JSON string.getSGTree
in interface SGMXBean
windowId
- unique window identifier obtained by SGMXBean.getWindows()
IllegalStateException
- when Scene-graph is not "PAUSED"public void addHighlightedNode(int nodeId) throws IllegalStateException
SGMXBean.getSGTree(int)
method.addHighlightedNode
in interface SGMXBean
nodeId
- the id of the node to be highlightedIllegalStateException
- when Scene-graph is not "PAUSED"public void removeHighlightedNode(int nodeId) throws IllegalStateException
SGMXBean.getSGTree(int)
method.removeHighlightedNode
in interface SGMXBean
nodeId
- the id of the node to be removedIllegalStateException
- when Scene-graph is not "PAUSED"public void addHighlightedRegion(int windowId, double x, double y, double w, double h) throws IllegalStateException
SGMXBean.getWindows()
method.addHighlightedRegion
in interface SGMXBean
windowId
- unique window identifier obtained by SGMXBean.getWindows()
x
- x coordinate of the regiony
- y coordinate of the regionw
- width of the regionh
- height of the regionIllegalStateException
- when Scene-graph is not "PAUSED"public void removeHighlightedRegion(int windowId, double x, double y, double w, double h) throws IllegalStateException
SGMXBean.getWindows()
method.removeHighlightedRegion
in interface SGMXBean
windowId
- unique window identifier obtained by SGMXBean.getWindows()
x
- x coordinate of the regiony
- y coordinate of the regionw
- width of the regionh
- height of the regionIllegalStateException
- when Scene-graph is not "PAUSED"public String makeScreenShot(int nodeId) throws IllegalStateException
SGMXBean.pause()
method should be called prior to calling this method.
Otherwise the IllegalStateException
is thrown.makeScreenShot
in interface SGMXBean
nodeId
- node identifier obtained by SGMXBean.getSGTree(int)
IllegalStateException
- when Scene-graph is not "PAUSED"public String makeScreenShot(int windowId, double x, double y, double w, double h) throws IllegalStateException
SGMXBean.pause()
method should be called prior to calling this method.
Otherwise the IllegalStateException
is thrown.makeScreenShot
in interface SGMXBean
windowId
- unique window identifier obtained by SGMXBean.getWindows()
x
- x coordinate of the regiony
- y coordinate of the regionw
- width of the regionh
- height of the regionIllegalStateException
- when Scene-graph is not "PAUSED"public String getCSSInfo(int nodeId) throws IllegalStateException
SGMXBean.pause()
method should be called prior to calling this method.
Otherwise the IllegalStateException
is thrown.getCSSInfo
in interface SGMXBean
nodeId
- node identifier obtained by SGMXBean.getSGTree(int)
IllegalStateException
- when Scene-graph is not "PAUSED"public String getBounds(int nodeId) throws IllegalStateException
getBounds
in interface SGMXBean
nodeId
- node identifier obtained by SGMXBean.getSGTree(int)
IllegalStateException
- when Scene-graph is not "PAUSED"public Object processLeafNode(Node node, MXNodeAlgorithmContext ctx)
processLeafNode
in interface MXNodeAlgorithm
node
- node to be processedctx
- current contextpublic Object processContainerNode(Parent parent, MXNodeAlgorithmContext ctx)
processContainerNode
in interface MXNodeAlgorithm
parent
- container node to be processedctx
- current contextCopyright © 2020. All rights reserved.