/** Returns a popup action icon for the specific command button. */
 public static ResizableIcon getCommandButtonPopupActionIcon(JCommandButton commandButton) {
   JCommandButton.CommandButtonPopupOrientationKind popupOrientationKind =
       ((JCommandButton) commandButton).getPopupOrientationKind();
   switch (popupOrientationKind) {
     case DOWNWARD:
       return new ArrowResizableIcon.CommandButtonPopupIcon(9, SwingConstants.SOUTH);
     case SIDEWARD:
       return new ArrowResizableIcon.CommandButtonPopupIcon(
           9,
           commandButton.getComponentOrientation().isLeftToRight()
               ? SwingConstants.EAST
               : SwingConstants.WEST);
   }
   return null;
 }