Search in sources :

Example 56 with ConstraintNodeImpl

use of org.drools.workbench.models.guided.dtree.shared.model.nodes.impl.ConstraintNodeImpl 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)56 ConstraintNodeImpl (org.drools.workbench.models.guided.dtree.shared.model.nodes.impl.ConstraintNodeImpl)56 TypeNode (org.drools.workbench.models.guided.dtree.shared.model.nodes.TypeNode)54 TypeNodeImpl (org.drools.workbench.models.guided.dtree.shared.model.nodes.impl.TypeNodeImpl)53 GuidedDecisionTree (org.drools.workbench.models.guided.dtree.shared.model.GuidedDecisionTree)52 Test (org.junit.Test)52 StringValue (org.drools.workbench.models.guided.dtree.shared.model.values.impl.StringValue)20 BigIntegerValue (org.drools.workbench.models.guided.dtree.shared.model.values.impl.BigIntegerValue)17 IntegerValue (org.drools.workbench.models.guided.dtree.shared.model.values.impl.IntegerValue)15 BigInteger (java.math.BigInteger)9 ActionUpdateNode (org.drools.workbench.models.guided.dtree.shared.model.nodes.ActionUpdateNode)5 ActionFieldValueImpl (org.drools.workbench.models.guided.dtree.shared.model.nodes.impl.ActionFieldValueImpl)4 ActionUpdateNodeImpl (org.drools.workbench.models.guided.dtree.shared.model.nodes.impl.ActionUpdateNodeImpl)4 ActionRetractNode (org.drools.workbench.models.guided.dtree.shared.model.nodes.ActionRetractNode)3 BigDecimalValue (org.drools.workbench.models.guided.dtree.shared.model.values.impl.BigDecimalValue)3 BooleanValue (org.drools.workbench.models.guided.dtree.shared.model.values.impl.BooleanValue)3 ByteValue (org.drools.workbench.models.guided.dtree.shared.model.values.impl.ByteValue)3 DateValue (org.drools.workbench.models.guided.dtree.shared.model.values.impl.DateValue)3 DoubleValue (org.drools.workbench.models.guided.dtree.shared.model.values.impl.DoubleValue)3 EnumValue (org.drools.workbench.models.guided.dtree.shared.model.values.impl.EnumValue)3