Examples of ButtonAction


Examples of devplugin.ButtonAction

    }
    return res;
  }

  protected static ActionMenu getButtonAction() {
    ButtonAction action = new ButtonAction();
    action.setActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        getInstance().showManageFavoritesDialog();
      }
    });

    action.setBigIcon(getIconFromTheme(ICON_CATEGORY, ICON_NAME, 22));
    action.setSmallIcon(getIconFromTheme(ICON_CATEGORY, ICON_NAME, 16));
    action.setShortDescription(mLocalizer.msg("favoritesManager",
            "Manage favorite programs"));
    action.setText(getName());

    return new ActionMenu(action);
  }
View Full Code Here

Examples of devplugin.ButtonAction

    out.writeInt(mRepetitionTimeSelect);
  }

  protected static ActionMenu getButtonAction() {
    ButtonAction action = new ButtonAction();
    action.setActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        getInstance().openSearchDialog("");
      }
    });

    action.setBigIcon(TVBrowserIcons.search(TVBrowserIcons.SIZE_LARGE));
    action.setSmallIcon(TVBrowserIcons.search(TVBrowserIcons.SIZE_SMALL));
    action.setShortDescription(mLocalizer.msg("description",
        "Allows searching programs containing a certain text."));
    action.setText(mLocalizer.ellipsisMsg("searchPrograms", "Search programs"));
    action.putValue(InternalPluginProxyIf.KEYBOARD_ACCELERATOR, KeyStroke
        .getKeyStroke(KeyEvent.VK_F, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));

    return new ActionMenu(action);
  }
View Full Code Here

Examples of dwlab.controllers.ButtonAction

 

  @SuppressWarnings( "empty-statement" )
  @Override
  public void waitForKey() {
    ButtonAction action = new ButtonAction();
    while( !getPushable( action ) );
  }
View Full Code Here

Examples of org.apache.isis.viewer.dnd.ButtonAction

    public static void main(final String[] args) {
        new ButtonExample();
    }

    protected void views(final Workspace workspace) {
        ButtonAction action = new ButtonAction() {

            public Consent disabled(final View view) {
                return Allow.DEFAULT;
            }

            public void execute(final Workspace workspace, final View view, final Location at) {
                view.getFeedbackManager().setAction("Button 1 pressed");
            }

            public String getDescription(final View view) {
                return "Button that can be pressed";
            }

            public ObjectActionType getType() {
                return USER;
            }

            public String getName(final View view) {
                return "Action";
            }

            public boolean isDefault() {
                return true;
            }

            public String getHelp(final View view) {
                return null;
            }
        };

        View view = new Button(action, workspace);
        view.setLocation(new Location(100, 100));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);

        ButtonAction action2 = new ButtonAction() {

            public Consent disabled(final View view) {
                return Veto.DEFAULT;
            }
View Full Code Here

Examples of org.apache.isis.viewer.dnd.ButtonAction

    public static void main(final String[] args) {
        new ButtonBorderExample();
    }

    protected void views(final Workspace workspace) {
        ButtonAction[] actions = new ButtonAction[] { new ButtonAction() {

            public Consent disabled(final View view) {
                return Allow.DEFAULT;
            }

            public void execute(final Workspace workspace, final View view, final Location at) {
                view.getFeedbackManager().addMessage("Button 1 pressed");
            }

            public String getDescription(final View view) {
                return "Button that can be pressed";
            }

            public String getName(final View view) {
                return "Action";
            }

            public ObjectActionType getType() {
                return USER;
            }

            public boolean isDefault() {
                return true;
            }

            public String getHelp(final View view) {
                return null;
            }
        },

        new ButtonAction() {

            public Consent disabled(final View view) {
                return Veto.DEFAULT;
            }
View Full Code Here

Examples of org.apache.isis.viewer.dnd.view.ButtonAction

        return "Detailed Message";
    }

    @Override
    public View createView(final Content content, final Axes axes, final int sequence) {
        final ButtonAction actions[] = new ButtonAction[] { new AbstractButtonAction("Print...") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                DebugOutput.print("Print exception", extract(view));
            }
        }, new AbstractButtonAction("Save...") {
View Full Code Here

Examples of org.apache.isis.viewer.dnd.view.ButtonAction

    public ButtonBorder(final ButtonAction[] actions, final View view) {
        super(view);

        buttons = new View[actions.length];
        for (int i = 0; i < actions.length; i++) {
            final ButtonAction action = actions[i];
            buttons[i] = new Button(action, view);
            if (action.isDefault()) {
                defaultAction = action;
            }
        }
        // space for: line & button with whitespace
        bottom = 1 + ViewConstants.VPADDING + buttons[0].getRequiredSize(new Size()).getHeight() + ViewConstants.VPADDING;
View Full Code Here

Examples of org.apache.isis.viewer.dnd.view.ButtonAction

        return "Message Dialog";
    }

    @Override
    public View createView(final Content content, final Axes axes, final int sequence) {
        final ButtonAction actions[] = new ButtonAction[] { new CloseViewAction() };
        final MessageView messageView = new MessageView((MessageContent) content, this);
        final View dialogView = new ButtonBorder(actions, new ScrollBorder(messageView));
        dialogView.setFocusManager(new SubviewFocusManager(dialogView));
        return dialogView;
    }
View Full Code Here

Examples of org.apache.isis.viewer.dnd.view.ButtonAction

    public ButtonBorder(final ButtonAction[] actions, final View view) {
        super(view);

        buttons = new View[actions.length];
        for (int i = 0; i < actions.length; i++) {
            final ButtonAction action = actions[i];
            buttons[i] = new Button(action, view);
            if (action.isDefault()) {
                defaultAction = action;
            }
        }
        // space for: line & button with whitespace
        bottom = 1 + VPADDING + buttons[0].getRequiredSize(new Size()).getHeight() + VPADDING;
View Full Code Here

Examples of org.geomajas.widget.utility.client.action.ButtonAction

  private static ButtonAction getAction(ClientToolInfo tool, MapWidget mapWidget) {
    ToolbarBaseAction toolbarAction = ToolbarRegistry.getToolbarAction(tool.getId(), mapWidget);

    if (toolbarAction != null) {
      ButtonAction action = null;
      if (toolbarAction instanceof ToolbarAction) {
        action = new ToolbarButtonAction((ToolbarAction) toolbarAction);
      } else if (toolbarAction instanceof ToolbarModalAction) {
        action = new ToolbarRadioAction((ToolbarModalAction) toolbarAction, "map-controller-group");
      }
      if (action != null) {
        for (Parameter parameter : tool.getParameters()) {
          action.configure(parameter.getName(), parameter.getValue());
        }
        return action;
      }
    }
    return null;
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.