Example #1
0
 @Override
 protected JButton createArrowButton() {
   JButton button = super.createArrowButton();
   if (button instanceof BasicArrowButton) {
     ((BasicArrowButton) button).setDirection(SwingConstants.EAST);
   }
   return button;
 }
Example #2
0
 /**
  * Creates a {@code BasicArrowButton} whose arrow is drawn in the specified direction and with the
  * specified colors.
  *
  * @param direction the direction of the arrow; one of {@code SwingConstants.NORTH}, {@code
  *     SwingConstants.SOUTH}, {@code SwingConstants.EAST} or {@code SwingConstants.WEST}
  * @param background the background color of the button
  * @param shadow the color of the shadow
  * @param darkShadow the color of the dark shadow
  * @param highlight the color of the highlight
  * @since 1.4
  */
 public BasicArrowButton(
     int direction, Color background, Color shadow, Color darkShadow, Color highlight) {
   super();
   setRequestFocusEnabled(false);
   setDirection(direction);
   setBackground(background);
   this.shadow = shadow;
   this.darkShadow = darkShadow;
   this.highlight = highlight;
 }