Search in sources :

Example 1 with ConstraintShape

use of org.drools.workbench.screens.guided.dtree.client.widget.shapes.ConstraintShape in project drools-wb by kiegroup.

the class ConstraintNodeFactory method getShape.

/**
 * This returns a new Shape following a drag operation from the palette
 * @param helper
 * @return
 */
@Override
public WiresBaseShape getShape(final FactoryHelper helper) {
    final ConstraintFactoryHelper cnHelper = (ConstraintFactoryHelper) helper;
    final ConstraintNode node = cnHelper.getContext();
    // drag proxy. We need to create a new instance of the ConstraintNode for use in the Decision Tree Widget
    return new ConstraintShape(makeShape(), new ConstraintNodeImpl(node.getClassName(), node.getFieldName()), cnHelper.isReadOnly());
}
Also used : ConstraintNodeImpl(org.drools.workbench.models.guided.dtree.shared.model.nodes.impl.ConstraintNodeImpl) ConstraintNode(org.drools.workbench.models.guided.dtree.shared.model.nodes.ConstraintNode) ConstraintShape(org.drools.workbench.screens.guided.dtree.client.widget.shapes.ConstraintShape)

Aggregations

ConstraintNode (org.drools.workbench.models.guided.dtree.shared.model.nodes.ConstraintNode)1 ConstraintNodeImpl (org.drools.workbench.models.guided.dtree.shared.model.nodes.impl.ConstraintNodeImpl)1 ConstraintShape (org.drools.workbench.screens.guided.dtree.client.widget.shapes.ConstraintShape)1