Class: GlobalController

GlobalController

Controller for global controls of all matchings and views.

Constructor

new GlobalController(globalView, leftMatchingController, rightMatchingController)

Construct a controller for the global view and link to two controllers of matching.
Parameters:
Name Type Description
globalView GlobalView
leftMatchingController MatchingController
rightMatchingController MatchingController
Source:

Members

globalView

Returns the global view.
Source:

leftController

Returns the left controller.
Source:

rightController

Returns the right controller.
Source:

Methods

_buildPerfectMatchings(disjointMatching, compatibleMatching)

Fill the list of matchings with all possible perfect matchings with the set of points of the left matching. If disjointMatching then keep only perfect matching disjoint with this matching. If compatibleMatching then keep only perfect matching disjoint with this matching.
Parameters:
Name Type Description
disjointMatching Boolean
compatibleMatching Boolean
Source:

_buildTransformation(disjointTransformation)

Fill the list of matchings with a shortest transformation between left and right matchings.
Parameters:
Name Type Description
disjointTransformation Boolean
Source:

_changeAction()

Set action property for two controllers of matching.
Source:

_changeDrawSegments()

Set drawSegment property for two controllers of matching.
Source:

_changeVerticalHorizontal()

Set vertical-horizontal property for two controllers of matching.
Source:

_clear()

Reset the two controllers.
Source:

_clearTransformation()

Reset the list of matchings.
Source:

_load(text)

Load matchings from a text format (in the format such that returns by Matching.matchingsToString()) and update the global view.
Parameters:
Name Type Description
text String
Source:

_loadFile(event)

Load matchings from a local text file (in the format such that returns by Matching.matchingsToString()) and update the global view.
Parameters:
Name Type Description
event Event
Source:

_loadUrl(url)

Load matchings from a text file (in the format such that returns by Matching.matchingsToString()) and update the global view.
Parameters:
Name Type Description
url String
Source:

_runWithWaitMessage(func)

Display a waiting message, run the function and then remove the waiting message.
Parameters:
Name Type Description
func function
Source:

_saveToFile()

Save all matchings in a text file named "matchings.txt" (in the format returns by Matching.matchingsToString()). Warning! Only integers are valid.
Source:

_setEventListeners()

Set listeners on the view.
Source:

_setEventListenersLoadExample()

Set listeners on the view to load examples.
Source:

_swap()

Swap segments between the left and right matchings.
Source:

_waitHide()

Hide the waiting message.
Source:

_waitShow()

Show the waiting message.
Source:

_warningMessage()

Show temporary the warning message.
Source: