Package org.drools.guvnor.client.messages

Examples of org.drools.guvnor.client.messages.Constants


                                EventBus eventBus) {
        super(asset,
                viewer,
                clientFactory,
                eventBus);
        Constants constants = GWT.create(Constants.class);
        super.addDescription(new HTML("<small><i>" + constants.RuleFlowUploadTip() + "</i></small>")); //NON-NLS
    }
View Full Code Here


        setGlassEnabled(true);
        this.sentences = sen;
        filter = new TextBox();
        filter.setWidth("100%");
        Constants constants = ((Constants) GWT.create(Constants.class));
        final String defaultMessage = constants.enterTextToFilterList();
        filter.setText(defaultMessage);
        filter.addFocusHandler(new FocusHandler() {
            public void onFocus(FocusEvent event) {
                filter.setText("");
            }
        });

        filter.addBlurHandler(new BlurHandler() {
            public void onBlur(BlurEvent event) {
                filter.setText(defaultMessage);
            }
        });

        filter.addKeyUpHandler(new KeyUpHandler() {
            public void onKeyUp(KeyUpEvent event) {
                if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
                    applyChoice(self);
                } else {
                    populateList(ListUtil.filter(sentences,
                            filter.getText()));
                }
            }

        });
        filter.setFocus(true);

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

        list = new ListBox();
        list.setVisibleItemCount(5);

        populateList(ListUtil.filter(this.sentences,
                ""));

        panel.add(list);

        Button ok = new Button(constants.OK());
        ok.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                applyChoice(self);
            }
        });

        Button cancel = new Button(constants.Cancel());
        cancel.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                hide();
            }
        });
View Full Code Here

        bottomPanel.add( createCloseAllButton() );
        return bottomPanel;
    }

    private Button createCloseAllButton() {
        Constants constants = GWT.create( Constants.class );
        Button button = new Button( constants.CloseAllItems() );
        button.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                eventBus.fireEvent( new CloseAllPlacesEvent() );
            }
        } );
View Full Code Here

    public CheckinPopup(String message) {
        setTitle(message);
        comment = new TextArea();
        comment.setWidth("100%");
        Constants constants = ((Constants) GWT.create(Constants.class));
        comment.setTitle(constants.AddAnOptionalCheckInComment());

        save = new Button(constants.CheckIn());
        addRow(comment);
        addRow(save);

    }
View Full Code Here

     * Return a listbox of choices for rule attributes.
     *
     * @return
     */
    public static ListBox getAttributeList() {
        Constants cons = ((Constants) GWT.create( Constants.class ));
        ListBox list = new ListBox();
        list.addItem( cons.Choose() );

        list.addItem( SALIENCE_ATTR );
        list.addItem( ENABLED_ATTR );
        list.addItem( DATE_EFFECTIVE_ATTR );
        list.addItem( DATE_EXPIRES_ATTR );
View Full Code Here

        add(new NewDataButton(previousEx,
                scenario,
                executionTrace,
                scenarioWidget));
        Constants constants = ((Constants) GWT.create(Constants.class));
        add(new SmallLabel(constants.GIVEN()));

    }
View Full Code Here

    public CallMethodLabelButton(ExecutionTrace previousEx, Scenario scenario,
                                 ExecutionTrace executionTrace, ScenarioWidget scenarioWidget) {

        add(new CallMethodOnNewDataButton(previousEx, scenario, executionTrace,
                scenarioWidget));
        Constants constants = ((Constants) GWT.create(Constants.class));
        add(new SmallLabel(constants.CALL()));

    }
View Full Code Here

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

        Constants constants = ((Constants) GWT.create(Constants.class));
        okButton = new Button(constants.OK());

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

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

        Button viewSource = new Button();
        Constants constants = GWT.create(Constants.class);
        viewSource.setText(constants.OpenEditorInNewWindow());

        final String url = "bpeleditor/BPELEditor.html?uuid=" + uuid + "&fileName=" + fileName + "&dirName=" + dirName
                + "&servletName=" + servletName + "&isNew=" + isNew;
        viewSource.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent arg0) {
View Full Code Here

    private DropDownValueChanged valueChanged;

    public EnumDropDown(final String currentValue,
                        final DropDownValueChanged valueChanged,
                        final DropDownData dropData) {
        final Constants cs = GWT.create( Constants.class );

        this.valueChanged = valueChanged;
    addChangeHandler(new ChangeHandler() {
      public void onChange(ChangeEvent event) {
        valueChanged.valueChanged(getItemText(getSelectedIndex()),
            getValue(getSelectedIndex()));
      }
    });

        //if we have to do it lazy, we will hit up the server when the widget gets focus
        if ( dropData.fixedList == null && dropData.queryExpression != null ) {
            DeferredCommand.addCommand( new Command() {
                public void execute() {
                    LoadingPopup.showMessage( cs.RefreshingList() );
                    RepositoryServiceFactory.getService().loadDropDownExpression( dropData.valuePairs,
                                                                                  dropData.queryExpression,
                                                                                  new GenericCallback() {
                                                                                      public void onSuccess(Object data) {
                                                                                          LoadingPopup.close();
                                                                                          String[] list = (String[]) data;

                                                                                          if ( list.length == 0 ) {
                                                                                              list = new String[]{cs.UnableToLoadList()};
                                                                                          }

                                                                                          fillDropDown( currentValue,
                                                                                                        list );
                                                                                      }

                                                                                      public void onFailure(Throwable t) {
                                                                                          LoadingPopup.close();
                                                                                          //just do an empty drop down...
                                                                                          fillDropDown( currentValue,
                                                                                                        new String[]{cs.UnableToLoadList()} );
                                                                                      }
                                                                                  } );
                }
            } );
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.messages.Constants

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.