Rule

This class can be extended the create a "rule based" interface, as can be seen in listeners. The widget adds a delete and copy icon to the rule.

Example
// Create the widget in the rule
var widget = new MyWidget();
widget.startup();

// Create the rule wrapper that adds delete and copy icon
var ruleWidget = new Rule({
  content: widget
});
ruleWidget.startup();

this.own(
  on(ruleWidget, "copy", lang.hitch(this, function() {
    // execute copy logic
  })),
  on(ruleWidget, "delete", lang.hitch(this, function() {
    // execute delete logic
  }))
);

Properties

content

Widget which is wrapped by the Rule widget.

Events

onCopy()

Event thrown when the rule is copied.

onDelete()

Event thrown when the rule is deleted.