Package Summary  Overview Summary

class:BasicArrowButton [CHANGED]

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, SwingConstants
Direct Known Subclasses:
MetalScrollButton

public class BasicArrowButton
extends JButton
implements SwingConstants
JButton object that draws a scaled Arrow in one of the cardinal directions.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™JavaBeans has been added to the java.beans package. Please see XMLEncoder.

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, SwingConstants
Direct Known Subclasses:
MetalScrollButton

public class BasicArrowButton
extends JButton
implements SwingConstants
JButton object that draws a scaled Arrow in one of the cardinal directions.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, SwingConstants
Direct Known Subclasses:
MetalScrollButton

public class BasicArrowButton
extends JButton
implements SwingConstants
JButton object that draws a scaled Arrow in one of the cardinal directions.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans has been added to the java.beans package. Please see XMLEncoder.

field:direction [NONE]

  • direction

    protected int direction
    The direction of the arrow. One of SwingConstants.NORTH, SwingConstants.SOUTH, SwingConstants.EAST or SwingConstants.WEST.

constructor:BasicArrowButton(int,java.awt.Color,java.awt.Color,java.awt.Color,java.awt.Color) [NONE]

  • BasicArrowButton

    public BasicArrowButton?(int direction, Color background, Color shadow, Color darkShadow, Color highlight)
    Creates a BasicArrowButton whose arrow is drawn in the specified direction and with the specified colors.
    Parameters:
    direction - the direction of the arrow; one of SwingConstants.NORTH, SwingConstants.SOUTH, SwingConstants.EAST or SwingConstants.WEST
    background - the background color of the button
    shadow - the color of the shadow
    darkShadow - the color of the dark shadow
    highlight - the color of the highlight
    Since:
    1.4
  • constructor:BasicArrowButton(int) [NONE]

    BasicArrowButton

    public BasicArrowButton?(int direction)
    Creates a BasicArrowButton whose arrow is drawn in the specified direction.
    Parameters:
    direction - the direction of the arrow; one of SwingConstants.NORTH, SwingConstants.SOUTH, SwingConstants.EAST or SwingConstants.WEST

    method:getDirection() [NONE]

  • getDirection

    public int getDirection()
    Returns the direction of the arrow.
    Returns:
    the direction of the arrow
  • method:setDirection(int) [NONE]

    setDirection

    public void setDirection?(int direction)
    Sets the direction of the arrow.
    Parameters:
    direction - the direction of the arrow; one of of SwingConstants.NORTH, SwingConstants.SOUTH, SwingConstants.EAST or SwingConstants.WEST

    method:paint(java.awt.Graphics) [NONE]

    paint

    public void paint?(Graphics g)
    Description copied from class: JComponent
    Invoked by Swing to draw components. Applications should not invoke paint directly, but should instead use the repaint method to schedule the component for redrawing.

    This method actually delegates the work of painting to three protected methods: paintComponent, paintBorder, and paintChildren. They're called in the order listed to ensure that children appear on top of component itself. Generally speaking, the component and its children should not paint in the insets area allocated to the border. Subclasses can just override this method, as always. A subclass that just wants to specialize the UI (look and feel) delegate's paint method should just override paintComponent.

    Overrides:
    paint in class JComponent
    Parameters:
    g - the Graphics context in which to paint
    See Also:
    JComponent.paintComponent(java.awt.Graphics), JComponent.paintBorder(java.awt.Graphics), JComponent.paintChildren(java.awt.Graphics), JComponent.getComponentGraphics(java.awt.Graphics), JComponent.repaint(long, int, int, int, int)

    method:getPreferredSize() [NONE]

    getPreferredSize

    public Dimension getPreferredSize()
    Returns the preferred size of the BasicArrowButton.
    Overrides:
    getPreferredSize in class JComponent
    Returns:
    the preferred size
    See Also:
    JComponent.setPreferredSize(java.awt.Dimension), ComponentUI

    method:getMinimumSize() [NONE]

    getMinimumSize

    public Dimension getMinimumSize()
    Returns the minimum size of the BasicArrowButton.
    Overrides:
    getMinimumSize in class JComponent
    Returns:
    the minimum size
    See Also:
    JComponent.setMinimumSize(java.awt.Dimension), ComponentUI

    method:getMaximumSize() [NONE]

    getMaximumSize

    public Dimension getMaximumSize()
    Returns the maximum size of the BasicArrowButton.
    Overrides:
    getMaximumSize in class JComponent
    Returns:
    the maximum size
    See Also:
    JComponent.setMaximumSize(java.awt.Dimension), ComponentUI

    method:isFocusTraversable() [NONE]

    isFocusTraversable

    public boolean isFocusTraversable()
    Returns whether the arrow button should get the focus. BasicArrowButtons are used as a child component of composite components such as JScrollBar and JComboBox. Since the composite component typically gets the focus, this method is overriden to return false.
    Overrides:
    isFocusTraversable in class Component
    Returns:
    false
    See Also:
    Component.setFocusable(boolean)

    method:paintTriangle(java.awt.Graphics,int,int,int,int,boolean) [NONE]

    paintTriangle

    public void paintTriangle?(Graphics g, int x, int y, int size, int direction, boolean isEnabled)
    Paints a triangle.
    Parameters:
    g - the Graphics to draw to
    x - the x coordinate
    y - the y coordinate
    size - the size of the triangle to draw
    direction - the direction in which to draw the arrow; one of SwingConstants.NORTH, SwingConstants.SOUTH, SwingConstants.EAST or SwingConstants.WEST
    isEnabled - whether or not the arrow is drawn enabled

    © 2020 Oracle Corporation and/or its affiliates