public abstract class AbstractXholonGui extends java.lang.Object implements IXholonGui
Constructor and Description |
---|
AbstractXholonGui()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
execModel(java.lang.String mName,
IApplication app)
Execute a model.
|
java.lang.String |
getModelName()
Get name of the model.
|
IXholon |
getXholonNode(java.lang.String nodeName)
Try to get a IXholon node, knowing only the nodeName (the name used by a guiItem).
|
void |
handleDrop(java.lang.String nodeName,
java.lang.Object data)
Handle data dragged-and-dropped onto an HTML Element (typically a TreeItem).
|
void |
handleNodeSelection(java.lang.String nodeName,
java.lang.Object guiItem,
boolean isCtrlPressed)
Handle selection of a node,
typically caused by clicking or ctrl-clicking on a node with the left mouse button.
|
void |
makeContextMenu(java.lang.Object guiItem,
int posX,
int posY)
Make a context menu for a specified GUI item.
|
void |
refresh()
Refresh the entire hierarchical structure (tree, contour, etc.) being displayed in the viewer.
|
void |
refresh(java.lang.Object guiItem,
IXholon xhNode)
Refresh the current node in the hierarchical structure, including its entire sub-tree.
|
IMessage |
sendXholonHelperService(int signal,
java.lang.Object data,
IXholon sender)
Send a synchronous message to the XholonHelperService.
|
abstract void |
showTree(IXholon node)
Show the entire IXholon tree in a GUI.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getGuiRoot
public java.lang.String getModelName()
public abstract void showTree(IXholon node)
showTree
in interface IXholonGui
node
- Node from which to start showing the tree.public void handleNodeSelection(java.lang.String nodeName, java.lang.Object guiItem, boolean isCtrlPressed)
handleNodeSelection
in interface IXholonGui
node
- nodeName
- guiItem
- public IMessage sendXholonHelperService(int signal, java.lang.Object data, IXholon sender)
signal
- data
- sender
- public void refresh()
public void refresh(java.lang.Object guiItem, IXholon xhNode)
guiItem
- The current item in the GUI.node
- The current IXholon node, corresponding to the guiItem.public void execModel(java.lang.String mName, IApplication app)
execModel
in interface IXholonGui
mName
- The model name.app
- Instance of the model's IApplication class.public void makeContextMenu(java.lang.Object guiItem, int posX, int posY)
makeContextMenu
in interface IXholonGui
guiItem
- posX
- posY
- public IXholon getXholonNode(java.lang.String nodeName)
nodeName
- (ex: "hello_2" "Hello")public void handleDrop(java.lang.String nodeName, java.lang.Object data)
handleDrop
in interface IXholonGui
nodeName
- The text (Label) name of the Element; an IXholon node name.data
- The content dropped onto the Element (ex: a XhgolonWorkbook).