Class Index

Classes


Namespace motigon.Diagram

Defines a diagram container.

Diagram

Class Summary
 
Instantiates a new diagram container.
Method Summary
void
Add a change hyperlink callback. This callback will be called when a hyperlink change is triggered by the user.
void
Adds a change image callback. This callback will be called when the user wished to change the image assigned to an image figure.
void
Adds a change tooltip callback. This callback will be called when the user tries to change a figure tooltip.
void
Adds a deserialize callback. This callback will be called when the user asks presses the deserialization button.
void
addDirtyCallback(callback)
Adds a dirty callback. This callback will be called when the container dirty state has been changed. Dirty state changes when changes has been made to a figure within the container. Only one event will be fired to indicate that that the container has moved from non-dirty to dirty state.
void
Adds a reset dirty callback. This callback will be called when the dirty state has been reset as if no changes has been made to the figures within the container.
void
Add a select hyperlink callback. This callback will be called when a hyperlink has been selected by the user.
void
Adds a select image callback. This callback will be called when the user needs to select an image.
void
Adds a serialize callback. This callback will be called when the user presses the serialization button.
void
addStatsCallback(callback)
Adds a stats callback. This callback will be called when the user presses the stats button.
void
addTickCallback(callback)
Adds a tick callback. This callback will be called when the draw area are redrawn.
void
Appends the diagram application to the web page container root. This will also load all configured resources.
void
deserialize(data)
Deserializes the provided definition.
Config
Gets the current configuration object.
FigureContainer
Gets the figure container object.
boolean
Checks if the container has been modified.
void
Reset the dirty state of this container. The next call to {@link #isDirty()} will be false, unless a change has been made to the container.
String
Serializes the current drawing.
void
setActiveTool(toolName)
Sets the active tool.
void
setActiveTool(toolName, parameter)
Sets the active tool.
void
setToolbarButtons(jsObject)
Sets the visible toolbar buttons.
Class Detail
motigon.Diagram()
Instantiates a new diagram container.
Method Detail
addChangeHyperlinkCallback(callback)
Add a change hyperlink callback. This callback will be called when a hyperlink change is triggered by the user.
Parameters:
{function(hyperlink)} callback
the callback
Returns:
{void}

addChangeImageCallback(callback)
Adds a change image callback. This callback will be called when the user wished to change the image assigned to an image figure.
Parameters:
{function(image)} callback
the callback
Returns:
{void}

addChangeTooltipCallback(callback)
Adds a change tooltip callback. This callback will be called when the user tries to change a figure tooltip.
Parameters:
{function(tooltip)} callback
the callback
Returns:
{void}

addDeserializeCallback(callback)
Adds a deserialize callback. This callback will be called when the user asks presses the deserialization button.
Parameters:
{function()} callback
the callback
Returns:
{void}

addDirtyCallback(callback)
Adds a dirty callback. This callback will be called when the container dirty state has been changed. Dirty state changes when changes has been made to a figure within the container. Only one event will be fired to indicate that that the container has moved from non-dirty to dirty state.
Parameters:
{function()} callback
the callback
Returns:
{void}

addResetDirtyCallback(callback)
Adds a reset dirty callback. This callback will be called when the dirty state has been reset as if no changes has been made to the figures within the container.
Parameters:
{function()} callback
the callback
Returns:
{void}

addSelectHyperlinkCallback(callback)
Add a select hyperlink callback. This callback will be called when a hyperlink has been selected by the user.
Parameters:
{function(hyperlink)} callback
the callback
Returns:
{void}

addSelectImageCallback(callback)
Adds a select image callback. This callback will be called when the user needs to select an image.
Parameters:
{function()} callback
the callback
Returns:
{void}

addSerializeCallback(callback)
Adds a serialize callback. This callback will be called when the user presses the serialization button.
Parameters:
{function(data)} callback
the callback
Returns:
{void}

addStatsCallback(callback)
Adds a stats callback. This callback will be called when the user presses the stats button.
Parameters:
{function(enabled)} callback
the callback
Returns:
{void}

addTickCallback(callback)
Adds a tick callback. This callback will be called when the draw area are redrawn.
Parameters:
{function(delta)} callback
the callback
Returns:
{void}

appendToRoot()
Appends the diagram application to the web page container root. This will also load all configured resources.
Returns:
{void}

deserialize(data)
Deserializes the provided definition.
Parameters:
{String} data
the serialized definition
Returns:
{void}

getConfig()
Gets the current configuration object.
Returns:
{Config}

getContainer()
Gets the figure container object.
Returns:
{FigureContainer}

isDirty()
Checks if the container has been modified.
Returns:
{boolean}

resetDirtyState()
Reset the dirty state of this container. The next call to {@link #isDirty()} will be false, unless a change has been made to the container.
Returns:
{void}

serialize()
Serializes the current drawing.
Returns:
{String}

setActiveTool(toolName)
Sets the active tool.
Parameters:
{String} toolName
the new active tool
Returns:
{void}

setActiveTool(toolName, parameter)
Sets the active tool.
Parameters:
{String} toolName
the tool name
{String} parameter
the tool specific parameter
Returns:
{void}

setToolbarButtons(jsObject)
Sets the visible toolbar buttons.
Parameters:
{JavaScriptObject} jsObject
the visible toolbar buttons
Returns:
{void}