Examples of PCommand


Examples of com.google.clearsilver.jsilver.syntax.node.PCommand

   * the command was already a multiple command, it is returned, otherwise a new multiple command is
   * created to wrap the original escaped command. This helper facilitates merging multiple
   * sequences of escapers.
   */
  private static AMultipleCommand contentsOf(AEscapeCommand escapeCommand) {
    PCommand escapedCommand = escapeCommand.getCommand();
    if (escapedCommand instanceof AMultipleCommand) {
      return (AMultipleCommand) escapedCommand;
    }
    AMultipleCommand multiCommand = new AMultipleCommand();
    multiCommand.getCommand().add(escapedCommand);
View Full Code Here

Examples of com.google.clearsilver.jsilver.syntax.node.PCommand

  private void handleExplicitEscapeMode(Start start) {
    AStringExpression escapeExpr =
        new AStringExpression(new TString("\"" + escapeMode.getEscapeCommand() + "\""));

    PCommand node = start.getPCommand();
    AEscapeCommand escape =
        new AEscapeCommand(new ACsOpenPosition(new TCsOpen("<?cs ", 0, 0)), escapeExpr,
            (PCommand) node.clone());

    node.replaceBy(escape);
  }
View Full Code Here

Examples of com.ponysdk.ui.server.basic.PCommand

        }
        pagingView.setSelectedPage(activePageIndex);
    }

    public PCommand newCommand(final int pageIndex) {
        return new PCommand() {

            @Override
            public void execute() {
                activePageIndex = pageIndex;
                eventBus.fireEvent(new PagingSelectionChangeEvent(PagingActivity.this, activePageIndex));
View Full Code Here

Examples of com.ponysdk.ui.server.basic.PCommand

        final PMenuBar fileBar = new PMenuBar(vertical);

        menuBar.addItem("File", fileBar);

        final PMenuItem newItem = new PMenuItem("New");
        newItem.setCommand(new PCommand() {

            @Override
            public void execute() {
                PNotificationManager.notify("Menu Selection, " + newItem.getText(), Notification.HUMANIZED);
            }
        });
        final PMenuItem openItem = new PMenuItem("Open");
        openItem.setCommand(new PCommand() {

            @Override
            public void execute() {
                PNotificationManager.notify("Menu Selection, " + openItem.getText(), Notification.HUMANIZED);
            }
        });

        final PMenuItem closeItem = new PMenuItem("Close");
        openItem.setCommand(new PCommand() {

            @Override
            public void execute() {
                PNotificationManager.notify("Menu Selection, " + closeItem.getText(), Notification.HUMANIZED);
            }
        });

        fileBar.addItem(newItem);
        fileBar.addItem(openItem);
        fileBar.addItem(closeItem);
        fileBar.addSeparator();

        final PMenuBar recentItem = new PMenuBar(vertical);

        fileBar.addItem("Recent", recentItem);

        final PMenuItem recent1 = new PMenuItem("recent1");
        recent1.setCommand(new PCommand() {

            @Override
            public void execute() {
                PNotificationManager.notify("Menu Selection, " + recent1.getText(), Notification.HUMANIZED);
            }
        });
        final PMenuItem recent2 = new PMenuItem("recent2");
        recent2.setCommand(new PCommand() {

            @Override
            public void execute() {
                PNotificationManager.notify("Menu Selection, " + recent2.getText(), Notification.HUMANIZED);
            }
View Full Code Here

Examples of com.ponysdk.ui.server.basic.PCommand

        menuBar.insertItem(item, 4 + items.values().size());
        items.put(pageIndex, item);
    }

    private PCommand getClickCommand(final int pageIndex) {
        return new PCommand() {

            @Override
            public void execute() {
                for (final PagerListener pagerListener : pagerListeners) {
                    pagerListener.onPageChange(pageIndex);
View Full Code Here

Examples of com.ponysdk.ui.server.basic.PCommand

    protected void buildActions() {
        final PMenuBar actionBar = new PMenuBar();
        actionBar.setStyleName("pony-ActionToolbar");

        refreshButton = new PMenuItem("Refresh", new PCommand() {

            @Override
            public void execute() {
                refresh();
            }
        });
        actionBar.addItem(refreshButton);
        actionBar.addSeparator();

        resetButton = new PMenuItem("Reset", new PCommand() {

            @Override
            public void execute() {
                reset();
            }
        });

        actionBar.addItem(resetButton);

        if (complexListConfiguration.getExportConfiguration() != null) {
            actionBar.addSeparator();
            final PMenuBar exportListMenuBar = new PMenuBar(true);

            for (final Exporter<D> exporter : complexListConfiguration.getExportConfiguration().getExporters()) {
                final PMenuItem item = new PMenuItem(exporter.name(), new PCommand() {

                    @Override
                    public void execute() {

                        final SelectionResult<D> selectionResult = getSelectedData();
View Full Code Here

Examples of com.ponysdk.ui.server.basic.PCommand

        final PMenuBar menuBarAction = new PMenuBar(true);
        menuBar.addItem("Preferences", menuBarAction);
        menuBar.setStyleName("pony-ActionToolbar");
        boolean hasPreferenceAction = false;
        if (complexListConfiguration.isCustomColumnEnabled()) {
            menuBarAction.addItem("Add Custom Column", new PCommand() {

                @Override
                public void execute() {
                    localEventBus.fireEvent(new ShowCustomColumnDescriptorFormEvent(this));

                }
            });
            hasPreferenceAction = true;
        }

        if (complexListConfiguration.isShowPreferences()) {
            menuBarAction.addItem(new PMenuItem("Order columns", new PCommand() {

                @Override
                public void execute() {

                    PConfirmDialog.show("Column Ordering", new PreferenceForm(descriptorsByCaption.values(), localEventBus, complexListConfiguration.getTableName()), new PConfirmDialogHandler() {
View Full Code Here

Examples of com.ponysdk.ui.server.basic.PCommand

    public PWidget asWidget() {
        return this;
    }

    private PCommand getSelectAllCommand() {
        return new PCommand() {

            @Override
            public void execute() {
                for (final SelectorViewListener selectorListener : selectorViewListeners) {
                    selectorListener.onSelectionChange(SelectionMode.PAGE);
View Full Code Here

Examples of com.ponysdk.ui.server.basic.PCommand

            }
        };
    }

    private PCommand getSelectNoneCommand() {
        return new PCommand() {

            @Override
            public void execute() {
                for (final SelectorViewListener selectorListener : selectorViewListeners) {
                    selectorListener.onSelectionChange(SelectionMode.NONE);
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.