@Component(tag="mxgraph",
widgetModule="fujion-mxgraph",
widgetClass="MXGraph",
parentTag="*",
content=AS_ATTRIBUTE,
description="Fujion wrapper for mxGraph component.")
public class MXGraph
extends org.fujion.component.BaseUIComponent
| Constructor and Description |
|---|
MXGraph() |
| Modifier and Type | Method and Description |
|---|---|
void |
beginUpdate() |
void |
clear()
Clears the graph.
|
MXEdge |
createEdge(String value,
MXVertex source,
MXVertex target,
String style)
Creates a new edge using the given source and target as the terminals of the new edge.
|
MXVertex |
createVertex(String value,
int x,
int y,
int width,
int height,
String style,
boolean relative)
Creates a new vertex using the given coordinates.
|
void |
endUpdate() |
boolean |
getAllowDanglingEdges()
Returns true if dangling edges are allowed.
|
String |
getContent()
Returns the graph as an XML-formatted string.
|
boolean |
getDisconnectOnMove()
Returns true if disconnect on move is allowed.
|
MXEdge |
getEdge(String id) |
Map<String,MXEdge> |
getEdges() |
boolean |
getGridEnabled()
Returns true if the grid is enabled.
|
int |
getGridSize()
Returns the grid size in pixels.
|
boolean |
getPanning()
Returns true if panning is enabled.
|
boolean |
getTooltips()
Returns true if tooltips are enabled.
|
MXVertex |
getVertex(String id) |
Map<String,MXVertex> |
getVertices() |
MXEdge |
insertEdge(String value,
MXVertex source,
MXVertex target,
String style)
Inserts a new edge using the given source and target as the terminals of the new edge.
|
MXVertex |
insertVertex(String value,
int x,
int y,
int width,
int height,
String style,
boolean relative)
Inserts a new vertex using the given coordinates.
|
boolean |
isPortsEnabled()
Returns true if ports are enabled.
|
boolean |
isPrettyXML()
Returns true if XML to be returned in pretty format.
|
boolean |
isReadonly()
Returns true if the graph is read-only.
|
void |
mxInvoke(org.fujion.ancillary.IResponseCallback<?> cb,
String functionName,
Object... args)
Directly invoke a method on the graph object, returning the result.
|
void |
mxInvoke(String functionName,
Object... args)
Directly invoke a method on the graph object.
|
protected String |
nextId() |
void |
refresh()
Synchronizes the XML content and cell caches with the client.
|
void |
refresh(Runnable cb)
Synchronizes the XML content and cell caches with the client.
|
void |
setAllowDanglingEdges(boolean allowDanglingEdges)
Set to true to enable dangling edges.
|
protected void |
setContent(String content)
Creates a new graph from an XML string.
|
void |
setDisconnectOnMove(boolean disconnectOnMove)
Set to true to enable disconnect on move.
|
void |
setGridEnabled(boolean gridEnabled)
Set to true to enable the grid.
|
void |
setGridSize(int gridSize)
Sets the grid size in pixels.
|
void |
setPanning(boolean panning)
Set to true to enable panning.
|
void |
setPortsEnabled(boolean portsEnabled)
Set to true to enable ports.
|
void |
setPrettyXML(boolean prettyXML)
Set to true if XML to be returned in pretty format.
|
void |
setReadonly(boolean readonly)
Sets the read-only state of the graph.
|
void |
setTooltips(boolean tooltips)
Set to true to enable tooltips.
|
_syncClasses, _syncStyles, addClass, addMask, addMask, addMask, addStyle, addStyles, afterRemoveChild, focus, getBalloon, getClasses, getContext, getCss, getDragid, getDropid, getFirstVisibleChild, getFirstVisibleChild, getFlex, getHeight, getHint, getKeycapture, getPopup, getStyle, getStyles, getTabindex, getWidth, hide, isDisabled, isVisible, print, print, removeClass, removeMask, removeStyle, reportSize, scrollIntoView, setBalloon, setClasses, setContext, setCss, setDisabled, setDragid, setDropid, setFlex, setFocus, setHeight, setHint, setKeycapture, setPopup, setStyles, setTabindex, setVisible, setWidth, show, toggleClass_attach, _initProps, addChild, addChild, addChild, addChildren, addComposite, addEventForward, addEventForward, addEventForward, addEventForward, addEventListener, addEventListener, addEventListener, addEventListener, afterAddChild, afterSetParent, areEqual, beforeAddChild, beforeRemoveChild, beforeSetParent, bind, bringToFront, defaultify, destroy, destroyChildren, detach, detachChildren, disableChildren, disableChildren, finalize, findAllNamed, findAttribute, findByName, findByName, findChild, findChildByData, findChildByLabel, findChildByLabel, fireEvent, fireEvent, fireEventToClient, fireEventToClient, getAncestor, getAncestor, getAttribute, getAttribute, getAttributes, getChildAt, getChildCount, getChildCount, getChildren, getChildren, getControllers, getData, getData, getDefinition, getFirstChild, getFirstChild, getId, getIndex, getLastChild, getLastController, getLastController, getName, getNamespace, getNextSibling, getNextSibling, getPage, getParent, getPreviousSibling, getPreviousSibling, getRoot, hasChildren, hasEventListener, hasEventListener, initialize, invoke, invoke, invoke, invoke, invoke, invokeIfAttached, isAncestor, isContainer, isContentSynced, isDead, isInitializing, isNamespace, isRendered, loadModule, loadModule, notifyAncestors, notifyDescendants, nullify, onAttach, onDestroy, propertyChange, propertyChange, removeChild, removeEventForward, removeEventForward, removeEventForward, removeEventForward, removeEventListener, removeEventListener, removeEventListener, removeEventListener, setContentSynced, setData, setIndex, setName, setNamespace, setParent, sub, swapChildren, sync, toString, trimify, validate, validate, validateChild, validateIsChild, validateName, validatePage, validateParent, wireController, wireControllerprotected String nextId()
public void beginUpdate()
public void endUpdate()
public MXVertex createVertex(String value, int x, int y, int width, int height, String style, boolean relative)
value - The user object.x - The x coordinate of the vertex.y - The y coordinate of the vertex.width - The width of the vertex.height - The height of the vertex.style - The vertex's style(s).relative - Specifies if the geometry is relative.public MXVertex insertVertex(String value, int x, int y, int width, int height, String style, boolean relative)
value - The user object.x - The x coordinate of the vertex.y - The y coordinate of the vertex.width - The width of the vertex.height - The height of the vertex.style - The vertex's style(s).relative - Specifies if the geometry is relative.public MXEdge createEdge(String value, MXVertex source, MXVertex target, String style)
value - The user object.source - The source of the edge.target - The target of the edge.style - The edge's style(s).public MXEdge insertEdge(String value, MXVertex source, MXVertex target, String style)
value - The user object.source - The source of the edge.target - The target of the edge.style - The edge's style(s).public void mxInvoke(String functionName, Object... args)
functionName - Name of function to invoke.args - Arguments to pass.public void mxInvoke(org.fujion.ancillary.IResponseCallback<?> cb,
String functionName,
Object... args)
cb - Callback to receive result.functionName - Name of function to invoke.args - Arguments to pass.public void clear()
public void refresh()
public void refresh(Runnable cb)
cb - Optional callback to invoke after refresh completes.public String getContent()
getContent in class org.fujion.component.BaseComponentprotected void setContent(String content)
setContent in class org.fujion.component.BaseComponentcontent - The XML string.@Component.PropertyGetter(value="readonly",
bindable=false,
description="True if the graph is read-only.")
public boolean isReadonly()
@Component.PropertySetter(value="readonly",
bindable=false,
defaultValue="false",
description="True if the graph is read-only.")
public void setReadonly(boolean readonly)
readonly - If true, the graph may not be changed by the user.@Component.PropertyGetter(value="tooltips",
bindable=false,
description="True if tooltips are enabled.")
public boolean getTooltips()
@Component.PropertySetter(value="tooltips",
bindable=false,
defaultValue="true",
description="True if tooltips are enabled.")
public void setTooltips(boolean tooltips)
tooltips - If true, tooltips are enabled.@Component.PropertyGetter(value="panning",
bindable=false,
description="True if panning is enabled.")
public boolean getPanning()
@Component.PropertySetter(value="panning",
bindable=false,
defaultValue="true",
description="True if panning is enabled.")
public void setPanning(boolean panning)
panning - If true, panning is enabled.@Component.PropertyGetter(value="allowDanglingEdges",
bindable=false,
description="True if dangling edges are allowed.")
public boolean getAllowDanglingEdges()
@Component.PropertySetter(value="allowDanglingEdges",
bindable=false,
defaultValue="false",
description="True if dangling edges are allowed.")
public void setAllowDanglingEdges(boolean allowDanglingEdges)
allowDanglingEdges - If true, dangling edges are enabled.@Component.PropertyGetter(value="disconnectOnMove",
bindable=false,
description="True if disconnect on move is allowed.")
public boolean getDisconnectOnMove()
@Component.PropertySetter(value="disconnectOnMove",
bindable=false,
defaultValue="false",
description="True if disconnect on move is allowed.")
public void setDisconnectOnMove(boolean disconnectOnMove)
disconnectOnMove - If true, disconnect on move is enabled.@Component.PropertyGetter(value="prettyXML",
bindable=false,
description="True if XML to be returned in pretty format.")
public boolean isPrettyXML()
@Component.PropertySetter(value="prettyXML",
bindable=false,
defaultValue="false",
description="True if XML to be returned in pretty format.")
public void setPrettyXML(boolean prettyXML)
prettyXML - If true, XML to be returned in pretty format.@Component.PropertyGetter(value="gridSize",
bindable=false,
description="The grid size in pixels.")
public int getGridSize()
@Component.PropertySetter(value="gridSize",
bindable=false,
defaultValue="10",
description="The grid size in pixels.")
public void setGridSize(int gridSize)
gridSize - The grid size in pixels.@Component.PropertyGetter(value="gridEnabled",
bindable=false,
description="If true, the grid is enabled.")
public boolean getGridEnabled()
@Component.PropertySetter(value="gridEnabled",
bindable=false,
defaultValue="true",
description="If true, the grid is enabled.")
public void setGridEnabled(boolean gridEnabled)
gridEnabled - True to enable the grid.@Component.PropertyGetter(value="portsEnabled",
bindable=false,
description="If true, ports are enabled.")
public boolean isPortsEnabled()
@Component.PropertySetter(value="portsEnabled",
bindable=false,
defaultValue="true",
description="If true, ports are enabled.")
public void setPortsEnabled(boolean portsEnabled)
portsEnabled - True to enable ports.Copyright © 2023 Fujion Framework. All rights reserved.