Package com.google.gwt.event.dom.client

Examples of com.google.gwt.event.dom.client.ClickHandler


    public TestRunnerWidget(final ScenarioWidget parent,
                            final String packageName) {

        final Button run = new Button( constants.RunScenario() );
        run.setTitle( constants.RunScenarioTip() );
        run.addClickHandler( new ClickHandler() {

            public void onClick(ClickEvent event) {
                LoadingPopup.showMessage( constants.BuildingAndRunningScenario() );
                RepositoryServiceFactory.getPackageService().runScenario( parent.getMetaData().getPackageName(),
                                                                   parent.getScenario(),
View Full Code Here


        final Button showExp = new Button( constants.ShowEventsButton() );
        results.setWidget( 2,
                           1,
                           showExp );
        showExp.addClickHandler( new ClickHandler() {

            public void onClick(ClickEvent event) {
                showExp.setVisible( false );
                results.setWidget( 2,
                                   1,
View Full Code Here

    class DeleteButton extends ImageButton {
        public DeleteButton(final RetractFact retractFact) {
            super( images.deleteItemSmall(),
                   constants.RemoveThisRetractStatement() );

            addClickHandler( new ClickHandler() {
                public void onClick(ClickEvent event) {
                    retractList.remove( retractFact );
                    scenario.getFixtures().remove( retractFact );
                    parent.renderEditor();
                }
View Full Code Here

                        field.setNature( FieldData.TYPE_LITERAL );
                    }
                }
                if ( field.getNature() == FieldData.TYPE_UNDEFINED && (isThereABoundVariableToSet() == true || isItAList() == true) ) {
                    Image clickme = new Image( images.edit() );
                    clickme.addClickHandler( new ClickHandler() {
                        public void onClick(ClickEvent w) {
                            showTypeChoice( w,
                                            field );
                        }
                    } );
View Full Code Here

                                                                                    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 );
View Full Code Here

                                final FieldData con) {
        final FormStylePopup form = new FormStylePopup( images.newexWiz(),
                                                        constants.FieldValue() );

        Button lit = new Button( constants.LiteralValue() );
        lit.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent w) {
                con.setNature( FieldData.TYPE_LITERAL );
                doTypeChosen( form );
            }

        } );
        form.addAttribute( constants.LiteralValue() + ":",
                           widgets( lit,
                                    new InfoPopup( constants.LiteralValue(),
                                                   constants.LiteralValTip() ) ) );

        form.addRow( new HTML( "<hr/>" ) );
        form.addRow( new SmallLabel( constants.AdvancedOptions() ) );

        // If we are here, then there must be a bound variable compatible with
        // me
        if ( isThereABoundVariableToSet() == true ) {
            Button variable = new Button( constants.BoundVariable() );
            variable.addClickHandler( new ClickHandler() {
                public void onClick(ClickEvent w) {
                    con.setNature( FieldData.TYPE_VARIABLE );
                    doTypeChosen( form );
                }
            } );
            form.addAttribute( constants.AVariable(),
                               widgets( variable,
                                        new InfoPopup( constants.ABoundVariable(),
                                                       constants.BoundVariableTip() ) ) );
        }
        if ( isItAList() == true ) {
            Button variable = new Button( constants.GuidedList() );
            variable.addClickHandler( new ClickHandler() {
                public void onClick(ClickEvent w) {
                    String factCollectionType = sce.getParametricFieldType( factType,
                                                                            field.getName() );
                    con.setNature( FieldData.TYPE_COLLECTION,
                                   factCollectionType );
View Full Code Here

        final HorizontalPanel panel = new HorizontalPanel();

        Button save = new Button("Save");
        save.setStyleName("button");
        save.addClickHandler(new ClickHandler() {

            public void onClick(ClickEvent event) {
                if (validateFormInput()) {
                    createNote(inputNoteTitle.getText(), inputNoteText.getText());
                    resetForm();
                }

            }
        });
        Button clear = new Button("Clear");
        save.setStyleName("button");
        clear.addClickHandler(new ClickHandler() {

            public void onClick(ClickEvent event) {
                resetForm();
            }
        });
View Full Code Here

                    final HTML noteText = new HTML(note.getText());
                    noteText.setStyleName("noteText");

                    final Button delButton = new Button("Delete");
                    delButton.setStyleName("noteControls");
                    delButton.addClickHandler(new ClickHandler() {

                        public void onClick(ClickEvent event) {
                            deleteNote(note.getPath());
                        }
                    });
View Full Code Here

         
          RootPanel.get("mynetwork").add(network);
         
         
          // create button
          btnAddPackage.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
              addPackage();
            }
          });
          RootPanel.get("btnAddPackage").add(btnAddPackage);
         
          // create button
          btnUpdatePackage.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
              updatePackage();
            }
          });
          RootPanel.get("btnUpdatePackage").add(btnUpdatePackage);
         
          // create button
          btnDeletePackage.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
              deletePackage();
            }
          });
          RootPanel.get("btnDeletePackage").add(btnDeletePackage);
View Full Code Here

    RootPanel.get("txtEndDate").add(txtEndDate);
    RootPanel.get("btnSetRange").add(btnSetRange);
    RootPanel.get("chkConfirmChange").add(chkConfirmChange);

    // Add a handler to the add button
    btnSetRange.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        setRange();
      }
    });
View Full Code Here

TOP

Related Classes of com.google.gwt.event.dom.client.ClickHandler

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.