Package org.drools.guvnor.client.messages

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


     * 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


    public ExplorerViewCenterPanel() {
        tabLayoutPanel = new ScrollTabLayoutPanel(2,
                Unit.EM);

        Constants constants = GWT.create(Constants.class);

        DockLayoutPanel layoutPanel = new DockLayoutPanel(Unit.EM);
        Button button = new Button(constants.CloseAllItems());
        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                closeAll();
            }
        });
View Full Code Here

                                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

    /**
     * Popup the view source dialog, showing the given content.
     */
    public static void showSource(final String content,
                                  String name) {
        Constants constants = GWT.create( Constants.class );
        final FormStylePopup pop = new FormStylePopup( images.viewSource(),
                                                        constants.ViewingSourceFor0( name ),
                                                       new Integer( 600 ) );

        String[] rows = content.split( "\n" );

        FlexTable table = new FlexTable();
View Full Code Here

    /**
     * Popup the view source dialog, showing the given content.
     */
    public static void showSource(final String content,
                                  String name) {
        Constants constants = GWT.create( Constants.class );
        final FormStylePopup pop = new FormStylePopup( images.viewSource(),
                                                       Format.format( constants.ViewingSourceFor0(),
                                                                      name ),
                                                       new Integer( 600 ) );

        String[] rows = content.split( "\n" );

View Full Code Here

    @Test
    public void testCache() throws Exception {

        //need to proxy out the constants.
        Constants cs = (Constants) Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[] {Constants.class}, new ConstantsProxy());

        final SuggestionCompletionCache cache = new SuggestionCompletionCache(cs) {

            public void loadPackage(String packageName,
                             Command command) {
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

    /**
     * Popup the view source dialog, showing the given content.
     */
    public static void showSource(final String content,
                                  String name) {
        Constants constants = GWT.create(Constants.class);
        final FormStylePopup pop = new FormStylePopup(images.viewSource(),
                constants.ViewingSourceFor0(name),
                new Integer(600));

        String[] rows = content.split("\n");

        FlexTable table = new FlexTable();
View Full Code Here

     * This will do a drop down for enumerated values..
     */
    public static Widget enumDropDown(final String currentValue, final ValueChanged valueChanged,
                                final DropDownData dropData) {
        final ListBox box = new ListBox();
        final Constants cs =  GWT.create(Constants.class);

        //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;
              doDropDown(currentValue, list, box);
            }

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

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" );
        list.addItem( "enabled" );
        list.addItem( "date-effective" );
        list.addItem( "date-expires" );
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.