Package org.pentaho.reporting.engine.classic.core.modules.gui.commonswing.action

Examples of org.pentaho.reporting.engine.classic.core.modules.gui.commonswing.action.ActionButton


    return contentWithStatus;
  }

  protected JPanel createButtonPanel()
  {
    final JButton btnCancel = new ActionButton(getCancelAction());
    final JButton btnConfirm = new ActionButton(getConfirmAction());
    final JPanel buttonPanel = new JPanel();
    buttonPanel.setLayout(new GridLayout(1, 2, 5, 5));
    buttonPanel.add(btnConfirm);
    buttonPanel.add(btnCancel);
    btnConfirm.setDefaultCapable(true);
    getRootPane().setDefaultButton(btnConfirm);
    buttonPanel.registerKeyboardAction(getConfirmAction(),
        KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),
        JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
View Full Code Here


   * @return a button based on the supplied action.
   */
  private static JButton createButton(final Action action,
                                      final SwingGuiContext swingGuiContext)
  {
    final JButton button = new ActionButton(action);
    boolean needText = true;
    if (isLargeButtonsEnabled(swingGuiContext))
    {
      final Icon icon = (Icon) action.getValue(SwingCommonModule.LARGE_ICON_PROPERTY);
      if (icon != null && (icon.getIconHeight() > 1 && icon.getIconHeight() > 1))
      {
        button.setIcon(icon);
        needText = false;
      }
    }
    else
    {
      final Icon icon = (Icon) action.getValue(Action.SMALL_ICON);
      if (icon != null && (icon.getIconHeight() > 1 && icon.getIconHeight() > 1))
      {
        button.setIcon(icon);
        needText = false;
      }
    }

    if (needText)
    {
      final Object value = action.getValue(Action.NAME);
      if (value != null)
      {
        button.setText(String.valueOf(value));
      }
    }
    else
    {
      button.setText(null);
    }

    final Object value = button.getAction().getValue(Action.ACCELERATOR_KEY);
    if (value instanceof KeyStroke)
    {
      button.unregisterKeyboardAction((KeyStroke) value);
    }

    return button;
  }
View Full Code Here

    final JPanel buttonPane = new JPanel();
    buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 5, 5));
    buttonPane.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
    final OKAction okAction = new OKAction();

    final JButton ok = new ActionButton(okAction);
    final JButton details = new ActionButton(detailsAction);

    buttonPane.add(ok);
    buttonPane.add(details);
    return buttonPane;
  }
View Full Code Here

    contentPane.setLayout(new GridBagLayout());
    contentPane.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));

    final JLabel lblFileName = new JLabel(getResources().getString(
        "csvexportdialog.filename")); //$NON-NLS-1$
    final JButton btnSelect = new ActionButton(new ActionSelectFile(
        getResources()));


    GridBagConstraints gbc = new GridBagConstraints();
    gbc.gridx = 0;
View Full Code Here

    gbc = new GridBagConstraints();
    gbc.anchor = GridBagConstraints.WEST;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.gridx = 2;
    gbc.gridy = 1;
    contentPane.add(new ActionButton(new ActionSelectDirFile(getResources())), gbc);

    gbc = new GridBagConstraints();
    gbc.fill = GridBagConstraints.NONE;
    gbc.anchor = GridBagConstraints.WEST;
    gbc.gridx = 0;
View Full Code Here

    gbc = new GridBagConstraints();
    gbc.gridx = 1;
    gbc.gridy = 1;
    gbc.anchor = GridBagConstraints.EAST;
    add(new ActionButton(updateAction));

  }
View Full Code Here

    setContentPane(contentPane);
  }

  private JPanel createButtonPanel()
  {
    final JButton btnCancel = new ActionButton(getCancelAction());
    final JButton btnConfirm = new ActionButton(getConfirmAction());
    final JPanel buttonPanel = new JPanel();
    buttonPanel.setLayout(new GridLayout(1, 2, 5, 5));
    buttonPanel.add(btnConfirm);
    buttonPanel.add(btnCancel);
    btnConfirm.setDefaultCapable(true);
    getRootPane().setDefaultButton(btnConfirm);
    buttonPanel.registerKeyboardAction(getConfirmAction(),
        KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),
        JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
View Full Code Here

     contentPane.setLayout(new GridBagLayout());
     contentPane.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));

     final JLabel lblFileName = new JLabel(getResources().getString(
         "rtf-exportdialog.filename")); //$NON-NLS-1$
     final JButton btnSelect = new ActionButton(getActionSelectFile());

     txFilename = new JTextField();
     cbStrictLayout = new JCheckBox(getResources().getString(
         "rtf-exportdialog.strict-layout")); //$NON-NLS-1$
View Full Code Here

    gbc = new GridBagConstraints();
    gbc.anchor = GridBagConstraints.WEST;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.gridx = 2;
    gbc.gridy = 1;
    contentPane.add(new ActionButton(new HtmlDirExportDialog.ActionSelectDirFile(getResources())), gbc);

    gbc = new GridBagConstraints();
    gbc.fill = GridBagConstraints.NONE;
    gbc.anchor = GridBagConstraints.WEST;
    gbc.gridx = 0;
View Full Code Here

    contentPane.setLayout(new GridBagLayout());
    contentPane.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));

    final JLabel lblFileName = new JLabel(getResources().getString(
        "excelexportdialog.filename")); //$NON-NLS-1$
    final JButton btnSelect = new ActionButton(getActionSelectFile());

    txFilename = new JTextField();
    cbStrictLayout = new JCheckBox(getResources().getString(
        "excelexportdialog.strict-layout")); //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.modules.gui.commonswing.action.ActionButton

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.