use of org.eclipse.zest.layouts.constraints.EntityPriorityConstraint in project archi by archimatetool.
the class SimpleNode method populateLayoutConstraint.
/**
* Populate the specified layout constraint
*/
@Override
public void populateLayoutConstraint(LayoutConstraint constraint) {
if (constraint instanceof LabelLayoutConstraint) {
LabelLayoutConstraint labelConstraint = (LabelLayoutConstraint) constraint;
labelConstraint.label = realObject.toString();
labelConstraint.pointSize = 18;
} else if (constraint instanceof BasicEntityConstraint) {
// noop
} else if (constraint instanceof EntityPriorityConstraint) {
EntityPriorityConstraint priorityConstraint = (EntityPriorityConstraint) constraint;
priorityConstraint.priority = Math.random() * 10 + 1;
}
}
Aggregations