Package org.eclipse.jst.pagedesigner.actions.range

Examples of org.eclipse.jst.pagedesigner.actions.range.DesignerToolBarAction


  /**
   * @param name
   * @return the tool bar action
   */
  public DesignerToolBarAction getStyleAction(String name) {
    DesignerToolBarAction action = null;

    if (name.equals(IHTMLConstants.TAG_U)) {
      action = new ChangeStyleAction(ActionsMessages
          .getString("DesignActionBarFactory.Underline.Text"), name, //$NON-NLS-1$
          PDPlugin.getDefault().getImageDescriptor(
              TOOLBAR_UNDERLINE_IMAGE_FILE), PDPlugin.getDefault()
              .getImageDescriptor(
                  TOOLBAR_UNDERLINE_DISABLED_IMAGE_FILE),
          IAction.AS_CHECK_BOX);
      action.setToolTipText(ActionsMessages
          .getString("DesignActionBarFactory.Underline")); //$NON-NLS-1$
    } else if (name.equals(IHTMLConstants.TAG_I)) {
      action = new ChangeStyleAction(ActionsMessages
          .getString("DesignActionBarFactory.Italic.Text"), name, //$NON-NLS-1$
          PDPlugin.getDefault().getImageDescriptor(
              TOOLBAR_ITALIC_IMAGE_FILE), PDPlugin.getDefault()
              .getImageDescriptor(
                  TOOLBAR_ITALIC_DISABLED_IMAGE_FILE),
          IAction.AS_CHECK_BOX);
      action.setToolTipText(ActionsMessages
          .getString("DesignActionBarFactory.Italic")); //$NON-NLS-1$
    } else if (name.equals(IHTMLConstants.TAG_B)) {
      action = new ChangeStyleAction(ActionsMessages
          .getString("DesignActionBarFactory.Bold.Text"), name, //$NON-NLS-1$
          PDPlugin.getDefault().getImageDescriptor(
              TOOLBAR_BOLD_IMAGE_FILE),
          PDPlugin.getDefault().getImageDescriptor(
              TOOLBAR_BOLD_DISABLED_IMAGE_FILE),
          IAction.AS_CHECK_BOX);
      action.setToolTipText(ActionsMessages
          .getString("DesignActionBarFactory.Bold")); //$NON-NLS-1$
    } else if (name.equals(IHTMLConstants.TAG_SMALL)) {
      action = new ChangeStyleAction(ActionsMessages
          .getString("DesignActionBarFactory.Small.Text"), name, //$NON-NLS-1$
          PDPlugin.getDefault().getImageDescriptor(
              TOOLBAR_SMALLFONT_IMAGE_FILE), PDPlugin.getDefault()
              .getImageDescriptor(
                  TOOLBAR_SMALLFONT_DISABLED_IMAGE_FILE),
          IAction.AS_CHECK_BOX);
      action.setToolTipText(ActionsMessages
          .getString("DesignActionBarFactory.Small")); //$NON-NLS-1$
    } else if (name.equals(IHTMLConstants.TAG_BIG)) {
      action = new ChangeStyleAction(ActionsMessages
          .getString("DesignActionBarFactory.Big.Text"), name, //$NON-NLS-1$
          PDPlugin.getDefault().getImageDescriptor(
              TOOLBAR_LARGEFONT_IMAGE_FILE), PDPlugin.getDefault()
              .getImageDescriptor(
                  TOOLBAR_LARGEFONT_DISABLED_IMAGE_FILE),
          IAction.AS_CHECK_BOX);
      action.setToolTipText(ActionsMessages
          .getString("DesignActionBarFactory.Big")); //$NON-NLS-1$
    } else if (name
        .equalsIgnoreCase(DesignPageActionContributor.PARAGRAPH_ACTION_ID)) {
      action = new HTagsInsertGroupAction(PDPlugin.getDefault()
          .getImageDescriptor(TOOLBAR_PARAGRAPH_IMAGE_FILE),
          IAction.AS_DROP_DOWN_MENU);
      action.setToolTipText(ActionsMessages
          .getString("DesignActionBarFactory.Paragraph")); //$NON-NLS-1$
    }

    return action;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jst.pagedesigner.actions.range.DesignerToolBarAction

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.