Package org.drools.workbench.screens.guided.dtree.client.widget.model

Examples of org.drools.workbench.screens.guided.dtree.client.widget.model.Coordinate


        initWidget( canvas );
    }

    public void setModel( final GuidedDecisionTree model ) {
        final Coordinate c = new Coordinate( width / 2,
                                             50 );

        //Walk model creating UIModel
        final TypeNode root = model.getRoot();
        uiModel.add( new TypeNodeElement( c,
View Full Code Here


    private void processChildren( final Coordinate c,
                                  final Node node ) {
        final int childCount = node.getChildren().size();
        for ( int childIndex = 0; childIndex < childCount; childIndex++ ) {
            final Node child = node.getChildren().get( childIndex );
            final Coordinate cc = new Coordinate( c.getX() - ( ( ( childCount - 1 ) * 100 ) / 2 ) + childIndex * 100,
                                                  c.getY() + 100 );
            if ( child instanceof TypeNode ) {
                uiModel.add( new TypeNodeElement( cc,
                                                  (TypeNode) child ) );
            } else if ( child instanceof ConstraintNode ) {
View Full Code Here

TOP

Related Classes of org.drools.workbench.screens.guided.dtree.client.widget.model.Coordinate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.