Class: AssociationState

Defined in: web-src/coffee/gui/associationstate.coffee
Inherits: gui.State

Overview

Association state, the user can select another class for create an association between them.

Instance Method Summary

Constructor Details

# (void) constructor()

Instance Method Details

# (void) reset()

Reset the state restoring its default values.

# (void) set_cellStarter(cell_starter)

# (void) set_mult(mult)

Set the association's multiplicity that the user gave.

Parameters:

  • mult ( Array ) An array with two strings.

# (void) set_roles(roles)

Set the association's roles that the user gave.

Parameters:

  • roles ( Array ) An array with two strings.

# (void) set_cardinality(mult)

# (void) set_name(name)

# (void) set_type(type)

# (void) set_with_class(with_class)

Create an association with class?

By default is false. Set to true if you have setted the name before.

Parameters:

  • with_class ( boolean ) True if an association with class is needed.

See also:

# (void) enable_with_class()

Ensure to create an association with class.

associationstate.enable_with_class("a name") is the same as:

Examples:

Same as

associationstate.set_name("a name")
associationstate.set_with_class(true)

Parameters:

  • name ( String ) The name for the association class.

See also:

# (void) on_cell_clicked(cell_view, event, x, y, gui_instance)

What to do when the user clicks on another cell.

Parameters:

  • cell_view ( joint.dia.CellView ) The cell view that recieves the click event.
  • event ( Event ) The event object representation. https://developer.mozilla.org/en-US/docs/Web/API/Event/Event
  • x ( int ) Where's the X coordinate position where the mouse has clicked.
  • y ( int ) Where's the Y coordinate position where the mouse has clicked.
  • gui ( GUI ) A the current GUI instance.

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: