< prev index next >

src/java.desktop/share/classes/javax/swing/plaf/basic/BasicArrowButton.java

Print this page




 199         }
 200 
 201         /**
 202          * Returns the maximum size of the {@code BasicArrowButton}.
 203          *
 204          * @return the maximum size
 205          */
 206         public Dimension getMaximumSize() {
 207             return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE);
 208         }
 209 
 210         /**
 211          * Returns whether the arrow button should get the focus.
 212          * {@code BasicArrowButton}s are used as a child component of
 213          * composite components such as {@code JScrollBar} and
 214          * {@code JComboBox}. Since the composite component typically gets the
 215          * focus, this method is overriden to return {@code false}.
 216          *
 217          * @return {@code false}
 218          */

 219         public boolean isFocusTraversable() {
 220           return false;
 221         }
 222 
 223         /**
 224          * Paints a triangle.
 225          *
 226          * @param g the {@code Graphics} to draw to
 227          * @param x the x coordinate
 228          * @param y the y coordinate
 229          * @param size the size of the triangle to draw
 230          * @param direction the direction in which to draw the arrow;
 231          *        one of {@code SwingConstants.NORTH},
 232          *        {@code SwingConstants.SOUTH}, {@code SwingConstants.EAST} or
 233          *        {@code SwingConstants.WEST}
 234          * @param isEnabled whether or not the arrow is drawn enabled
 235          */
 236         public void paintTriangle(Graphics g, int x, int y, int size,
 237                                         int direction, boolean isEnabled) {
 238             Color oldColor = g.getColor();




 199         }
 200 
 201         /**
 202          * Returns the maximum size of the {@code BasicArrowButton}.
 203          *
 204          * @return the maximum size
 205          */
 206         public Dimension getMaximumSize() {
 207             return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE);
 208         }
 209 
 210         /**
 211          * Returns whether the arrow button should get the focus.
 212          * {@code BasicArrowButton}s are used as a child component of
 213          * composite components such as {@code JScrollBar} and
 214          * {@code JComboBox}. Since the composite component typically gets the
 215          * focus, this method is overriden to return {@code false}.
 216          *
 217          * @return {@code false}
 218          */
 219         @SuppressWarnings("deprecation")
 220         public boolean isFocusTraversable() {
 221           return false;
 222         }
 223 
 224         /**
 225          * Paints a triangle.
 226          *
 227          * @param g the {@code Graphics} to draw to
 228          * @param x the x coordinate
 229          * @param y the y coordinate
 230          * @param size the size of the triangle to draw
 231          * @param direction the direction in which to draw the arrow;
 232          *        one of {@code SwingConstants.NORTH},
 233          *        {@code SwingConstants.SOUTH}, {@code SwingConstants.EAST} or
 234          *        {@code SwingConstants.WEST}
 235          * @param isEnabled whether or not the arrow is drawn enabled
 236          */
 237         public void paintTriangle(Graphics g, int x, int y, int size,
 238                                         int direction, boolean isEnabled) {
 239             Color oldColor = g.getColor();


< prev index next >