Class: Role

Defined in: web-src/coffee/model/uml/role.coffee
Inherits: model.MyModel

Overview

TODO: use this class to implement a graphical hierarchy of roles

A Role from our model UML diagram. This class is to represent a UML role as a first citizen object and associate it namespaces.

Instance Method Summary

Constructor Details

# (void) constructor(name = null, attrs = [], methods = [])

Parameters:

  • name ( String )

Instance Method Details

# (void) get_name()

# (void) get_class()

# (void) get_mult()

# (void) set_role_URI(name)

# (void) set_class(name)

# (void) set_mult(mult)

# (void) set_name(name)

# (void) set_g_name()

Set name for graphical classes. crowd also shows names (without prefixes nor urls)

# (void) set_unsatisfiable(bool, csstheme = null)

Set if this class is unsatisfiable. Changing its appearance if csstheme is given.

Parameters:

  • bool ( Boolean ) If it is unsatisfiable or not.
  • csstheme ( CSSTheme ) optional. A csstheme object that if given, will set the appearance of this class depending if it is unsatisfiable. It must have two elements: css_class and css_class_unsatisfiable. Both are CSS templates.

See also:

# (void) set_theme(csstheme)

Set the csstheme to the joint class.

Parameters:

  • csstheme ( Hash ) The theme with two keys: css_class and css_class_unsatisfiale. Both are CSS templates to apply on the SVG elements of the final JointJS attributes.

# (void) create_joint(factory, csstheme = null)

If the joint model wasn't created, make it.

# (void) to_json()

# (void) attach_my_event_handlers()

I attach myself and my event handlers into the joint model for answering myself whenever some important changes happens.

If I have already attached, I don't attach again.

This will attach for:

# (void) attach_on_change_position(object)

Attach an object for notifying whenever the class changes position.

Parameters:

See also:

# (void) notify_change_position(model)

Event handler for notifying all objects attached that the position has been changed.

It will call update_position() to all objects attached.

Parameters:

  • model ( joint.dia.Element ) The Joint element that has recieved the event.

See also:

# (void) same_elts(other)

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: