Examples of VerticalPanel


Examples of com.google.gwt.user.client.ui.VerticalPanel

        RuleFlowUploadWidget uploadWidget = new RuleFlowUploadWidget(
                asset,
                viewer,
                clientFactory );

        VerticalPanel panel = new VerticalPanel();
        panel.add( uploadWidget );

        if ( ApplicationPreferences.showVisualRuleFlow() ) {
            initRuleflowViewer();

            if ( ruleFlowViewer != null && parameterPanel != null ) {
                Button viewSource = new Button();
                viewSource.setText( constants.OpenEditorInNewWindow() );
                viewSource.addClickHandler( new ClickHandler() {
                    public void onClick( ClickEvent arg0 ) {
                        doViewDiagram();

                        ruleFlowViewer.update();
                    }
                } );

                panel.add( viewSource );
            }
        }

        initWidget( panel );
View Full Code Here

Examples of com.google.gwt.user.client.ui.VerticalPanel

                }
            }
        } );

        VerticalPanel vert = new VerticalPanel();

        Image lhsOptions = new ImageButton( images.newDSLPattern() );
        final String msg = constants.AddANewCondition();
        lhsOptions.setTitle( msg );
        lhsOptions.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                showSuggestions( conditions );
            }
        } );

        Image rhsOptions = new ImageButton( images.newDSLAction() );
        final String msg2 = constants.AddAnAction();
        rhsOptions.setTitle( msg2 );
        rhsOptions.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                showSuggestions( actions );
            }
        } );

        vert.add( lhsOptions );
        vert.add( rhsOptions );

        layout.setWidget( 0,
                          1,
                          vert );
View Full Code Here

Examples of com.google.gwt.user.client.ui.VerticalPanel

        this.clientFactory = clientFactory;
        this.packageUUID = pacakgeUUID;
        this.assetName = assetName;
        this.currentVersion = currentVersion;

        VerticalPanel verticalPanel = new VerticalPanel();
        versionChooser = new ListBox();
        loadHistoryData();
        verticalPanel.add(versionChooser);

        Button open = new Button( "View selected version" );
        open.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
              if(!constants.NoHistory().equalsIgnoreCase(versionChooser.getValue(versionChooser.getSelectedIndex()))) {
                    showVersion( versionChooser.getValue( versionChooser.getSelectedIndex() ) );
              }
            }

        } );
        verticalPanel.add(open);      

        initWidget( verticalPanel );
    }
View Full Code Here

Examples of com.google.gwt.user.client.ui.VerticalPanel

        this.externalFrame = new Frame();
        this.externalFrame.setWidth( configuration.getCustomFormWidth() + "px" );
        this.externalFrame.setHeight( configuration.getCustomFormHeight() + "px" );

        VerticalPanel vp = new VerticalPanel();
        vp.setWidth( "100%" );
        vp.setHeight( "100%" );
        vp.add( this.externalFrame );

        okButton = new Button( constants.OK() );

        //cancel button with default handler
        cancelButton = new Button( constants.Cancel(),
                                   new ClickHandler() {
                                       public void onClick(ClickEvent event) {
                                           hide();
                                       }
                                   } );

        HorizontalPanel hp = new HorizontalPanel();
        hp.setWidth( "100%" );
        hp.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
        hp.add( okButton );
        hp.add( cancelButton );

        vp.add( hp );

        this.addRow( vp );

    }
View Full Code Here

Examples of com.google.gwt.user.client.ui.VerticalPanel

                constants.SnapshotItems(),
                getPanel() );
    }

    public VerticalPanel getPanel() {
        VerticalPanel verticalPanel = new VerticalPanel();
        verticalPanel.add( new HTML( "<i><small>"
                + constants.SnapshotListingFor()
                + place.getSnapshotName()
                + "</small></i>" ) );
        verticalPanel.add(
                new AssetPagedTable(
                        place.getModuleUuid(),
                        Arrays.asList( place.getAssetTypes() ),
                        null,
                        clientFactory ) );
View Full Code Here

Examples of com.google.gwt.user.client.ui.VerticalPanel

        layout.add( new Image( images.executionTrace() ) );
        layout.add( choice );
        layout.add( simulDatePanel );

        if ( showResults && isResultNotNullAndHaveRulesFired() ) {
            VerticalPanel replacingLayout = new VerticalPanel();

            replacingLayout.add( new FiredRulesPanel( executionTrace ) );
            replacingLayout.add( layout );
            initWidget( replacingLayout );
        } else {
            initWidget( layout );
        }
    }
View Full Code Here

Examples of com.google.gwt.user.client.ui.VerticalPanel

        parent.setShowResults( true );
        parent.renderEditor();

        int failures = 0;
        int total = 0;
        VerticalPanel resultsDetail = new VerticalPanel();

        for ( Iterator<Fixture> fixturesIterator = data.result.getScenario().getFixtures().iterator(); fixturesIterator.hasNext(); ) {
            Fixture fixture = fixturesIterator.next();
            if ( fixture instanceof VerifyRuleFired ) {

                VerifyRuleFired verifyRuleFired = (VerifyRuleFired) fixture;
                HorizontalPanel panel = new HorizontalPanel();
                if ( !verifyRuleFired.getSuccessResult().booleanValue() ) {
                    panel.add( new Image( images.warning() ) );
                    failures++;
                } else {
                    panel.add( new Image( images.testPassed() ) );
                }
                panel.add( new SmallLabel( verifyRuleFired.getExplanation() ) );
                resultsDetail.add( panel );
                total++;
            } else if ( fixture instanceof VerifyFact ) {
                VerifyFact verifyFact = (VerifyFact) fixture;
                for ( Iterator<VerifyField> fieldIterator = verifyFact.getFieldValues().iterator(); fieldIterator.hasNext(); ) {
                    total++;
                    VerifyField verifyField = fieldIterator.next();
                    HorizontalPanel panel = new HorizontalPanel();
                    if ( !verifyField.getSuccessResult().booleanValue() ) {
                        panel.add( new Image( images.warning() ) );
                        failures++;
                    } else {
                        panel.add( new Image( images.testPassed() ) );
                    }
                    panel.add( new SmallLabel( verifyField.getExplanation() ) );
                    resultsDetail.add( panel );
                }

            } else if ( fixture instanceof ExecutionTrace ) {
                ExecutionTrace ex = (ExecutionTrace) fixture;
                if ( ex.getNumberOfRulesFired() == data.result.getScenario().getMaxRuleFirings() ) {
View Full Code Here

Examples of com.google.gwt.user.client.ui.VerticalPanel

        } );

    }

    private Widget doAuditView(List<String[]> auditLog) {
        VerticalPanel vp = new VerticalPanel();
        vp.add( new HTML( "<hr/>" ) );
        FlexTable g = new FlexTable();
        int row = 0;
        boolean firing = false;
        for ( int i = 0; i < auditLog.size(); i++ ) {
            String[] lg = auditLog.get( i );

            int id = Integer.parseInt( lg[0] );
            if ( id <= 7 ) {
                if ( id <= 3 ) {
                    if ( !firing ) {
                        g.setWidget( row,
                                     0,
                                     new Image( "images/audit_events/" + lg[0] + ".gif" ) );
                        g.setWidget( row,
                                     1,
                                     new SmallLabel( lg[1] ) );
                    } else {
                        g.setWidget( row,
                                     1,
                                     hz( new Image( "images/audit_events/" + lg[0] + ".gif" ),
                                         new SmallLabel( lg[1] ) ) );
                    }
                    row++;
                } else if ( id == 6 ) {
                    firing = true;
                    g.setWidget( row,
                                 0,
                                 new Image( "images/audit_events/" + lg[0] + ".gif" ) );
                    g.setWidget( row,
                                 1,
                                 new SmallLabel( "<b>" + lg[1] + "</b>" ) );
                    row++;
                } else if ( id == 7 ) {
                    firing = false;
                } else {
                    g.setWidget( row,
                                 0,
                                 new Image( "images/audit_events/" + lg[0] + ".gif" ) );
                    g.setWidget( row,
                                 1,
                                 new SmallLabel( "<font color='grey'>" + lg[1] + "</font>" ) );
                    row++;
                }
            } else {
                g.setWidget( row,
                             0,
                             new Image( "images/audit_events/misc_event.gif" ) );
                g.setWidget( row,
                             1,
                             new SmallLabel( "<font color='grey'>" + lg[1] + "</font>" ) );
                row++;
            }
        }
        vp.add( g );
        vp.add( new HTML( "<hr/>" ) );
        return vp;
    }
View Full Code Here

Examples of com.google.gwt.user.client.ui.VerticalPanel

        return box;
    }

    private Widget listEditor(final ValueChanged changed) {
        Panel panel = new VerticalPanel();
        int i = 0;
        for ( final FieldData f : this.field.collectionFieldList ) {

            DirtyableHorizontalPane hpanel = new DirtyableHorizontalPane();

            FieldDataConstraintEditor fieldElement = new FieldDataConstraintEditor( f.collectionType,
                                                                                    new ValueChanged() {
                                                                                        public void valueChanged(String newValue) {
                                                                                            f.setValue( newValue );
                                                                                            calculateValueFromList();
                                                                                            makeDirty();
                                                                                        }
                                                                                    },
                                                                                    f,
                                                                                    givenFact,
                                                                                    sce,
                                                                                    scenario,
                                                                                    executionTrace );
            hpanel.add( fieldElement );
            final int index = i;
            Image del = new ImageButton( images.deleteItemSmall(),
                                         constants.AElementToDelInCollectionList(),
                                         new ClickHandler() {
                                             public void onClick(ClickEvent w) {
                                                 field.collectionFieldList.remove( index );
                                                 calculateValueFromList();
                                                 refreshEditor();
                                             }
                                         } );

            hpanel.add( del );

            Image addPattern = new ImageButton( images.newItemBelow() );
            addPattern.setTitle( constants.AddElementBelow() );

            addPattern.addClickHandler( new ClickHandler() {
                public void onClick(ClickEvent sender) {
                    FieldData newFieldData = new FieldData();
                    newFieldData.setName( field.getName() );
                    newFieldData.collectionType = field.collectionType;
                    field.collectionFieldList.add( index + 1,
                                                   newFieldData );
                    calculateValueFromList();
                    refreshEditor();
                }
            } );
            hpanel.add( addPattern );
            Image moveDown = new ImageButton( images.shuffleDown() );
            moveDown.setTitle( constants.MoveDownListMove() );
            moveDown.addClickHandler( new ClickHandler() {
                public void onClick(ClickEvent sender) {
                    if ( index < field.collectionFieldList.size() - 1 ) {
                        FieldData onMyLine = field.collectionFieldList.get( index );
                        FieldData onDown = field.collectionFieldList.get( index + 1 );
                        field.collectionFieldList.set( index + 1,
                                                       onMyLine );
                        field.collectionFieldList.set( index,
                                                       onDown );
                        calculateValueFromList();
                        refreshEditor();
                    }
                }
            } );
            hpanel.add( moveDown );

            Image moveUp = new ImageButton( images.shuffleUp() );
            moveUp.setTitle( constants.MoveUpList() );
            moveUp.addClickHandler( new ClickHandler() {
                public void onClick(ClickEvent sender) {
                    if ( index > 0 ) {
                        FieldData oneUp = field.collectionFieldList.get( index - 1 );
                        FieldData onMyLine = field.collectionFieldList.get( index );
                        field.collectionFieldList.set( index,
                                                       oneUp );
                        field.collectionFieldList.set( index - 1,
                                                       onMyLine );
                        calculateValueFromList();
                        refreshEditor();
                    }
                }
            } );
            hpanel.add( moveUp );
            panel.add( hpanel );
            i++;
        }

        if ( this.field.collectionFieldList.size() == 0 ) {
            Image add = new ImageButton( images.newItem(),
                                         constants.AElementToAddInCollectionList(),
                                         new ClickHandler() {
                                             public void onClick(ClickEvent w) {
                                                 FieldData newFieldData = new FieldData();
                                                 newFieldData.setName( field.getName() );
                                                 newFieldData.collectionType = field.collectionType;
                                                 field.collectionFieldList.add( newFieldData );
                                                 calculateValueFromList();
                                                 refreshEditor();
                                             }
                                         } );
            panel.add( add );
        }
        return panel;
    }
View Full Code Here

Examples of com.google.gwt.user.client.ui.VerticalPanel

        final HTML displayTitle = new HTML("Existing Notes");
        displayTitle.setStyleName("displayTitle");
        final HTML entryTitle = new HTML("Create A Note");
        entryTitle.setStyleName("entryTitle");

        final VerticalPanel displayPanel = new VerticalPanel();
        displayPanel.setVerticalAlignment(VerticalPanel.ALIGN_TOP);
        displayPanel.setStyleName("displayPanel");
        displayPanel.add(displayTitle);

        final VerticalPanel entryPanel = new VerticalPanel();
        entryPanel.setVerticalAlignment(VerticalPanel.ALIGN_TOP);
        entryPanel.setStyleName("entryPanel");
        entryPanel.add(entryTitle);

        displayPanel.add(notesPanel);

        final VerticalPanel form = createForm();
        entryPanel.add(form);

        mainpanel.add(displayPanel);
        mainpanel.add(entryPanel);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.