public AlignmentAction(String nm, int alignment) {
      super(nm);
      m_alignment = alignment;
      String icon;
      switch (alignment) {
      case StyleConstants.ALIGN_RIGHT:
        icon = "align_right16.gif";
        break;
      case StyleConstants.ALIGN_LEFT:
        icon = "align_left16.gif";
        break;
      case StyleConstants.ALIGN_CENTER:
        icon = "align_center16.gif";
        break;
      case StyleConstants.ALIGN_JUSTIFIED:
        icon = "align_justify16.gif";
        break;
      default:
        return;
      }
      putValue(Action.SMALL_ICON, new ImageIcon(Loader.load(icon)));
    }