APIdia Launch Partner
Top Description Fields Constructors Methods
javax.swing.plaf.metal

public Class MetalScrollButton

extends BasicArrowButton
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
java.awt.Dimension, .Graphics, .Color, .Polygon, javax.swing.*, javax.swing.plaf.basic.BasicArrowButton

JButton object for Metal scrollbar arrows.

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 java.beans.XMLEncoder.

Authors
Tom Santos, Steve Wilson

Field Summary

Modifier and TypeField and Description
private int
private static Color
private boolean
private static Color
Inherited from javax.swing.plaf.basic.BasicArrowButton:
direction

Constructor Summary

AccessConstructor and Description
public
MetalScrollButton(int
the direction
direction
,
int
the width
width
,
boolean
the free standing value
freeStanding
)

Constructs an instance of MetalScrollButton.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the width of the button
getButtonWidth
()

Returns the width of the button.

public Dimension
getMaximumSize()

Overrides javax.swing.plaf.basic.BasicArrowButton.getMaximumSize.

Returns the maximum size of the BasicArrowButton.

public Dimension
getMinimumSize()

Overrides javax.swing.plaf.basic.BasicArrowButton.getMinimumSize.

Returns the minimum size of the BasicArrowButton.

public Dimension
getPreferredSize()

Overrides javax.swing.plaf.basic.BasicArrowButton.getPreferredSize.

Returns the preferred size of the BasicArrowButton.

public void
paint(Graphics g)

Overrides javax.swing.plaf.basic.BasicArrowButton.paint.

Invoked by Swing to draw components.

public void
setFreeStanding(boolean
the free standing value
freeStanding
)

Sets the free standing value.

Inherited from javax.swing.plaf.basic.BasicArrowButton:
getDirectionisFocusTraversablepaintTrianglesetDirection

Field Detail

buttonWidthback to summary
private int buttonWidth
highlightColorback to summary
private static Color highlightColor
isFreeStandingback to summary
private boolean isFreeStanding
shadowColorback to summary
private static Color shadowColor

Constructor Detail

MetalScrollButtonback to summary
public MetalScrollButton(int direction, int width, boolean freeStanding)

Constructs an instance of MetalScrollButton.

Parameters
direction:int

the direction

width:int

the width

freeStanding:boolean

the free standing value

Method Detail

getButtonWidthback to summary
public int getButtonWidth()

Returns the width of the button.

Returns:int

the width of the button

getMaximumSizeback to summary
public Dimension getMaximumSize()

Overrides javax.swing.plaf.basic.BasicArrowButton.getMaximumSize.

Doc from javax.swing.plaf.basic.BasicArrowButton.getMaximumSize.

Returns the maximum size of the BasicArrowButton.

getMinimumSizeback to summary
public Dimension getMinimumSize()

Overrides javax.swing.plaf.basic.BasicArrowButton.getMinimumSize.

Doc from javax.swing.plaf.basic.BasicArrowButton.getMinimumSize.

Returns the minimum size of the BasicArrowButton.

getPreferredSizeback to summary
public Dimension getPreferredSize()

Overrides javax.swing.plaf.basic.BasicArrowButton.getPreferredSize.

Doc from javax.swing.plaf.basic.BasicArrowButton.getPreferredSize.

Returns the preferred size of the BasicArrowButton.

paintback to summary
public void paint(Graphics g)

Overrides javax.swing.plaf.basic.BasicArrowButton.paint.

Doc from javax.swing.JComponent.paint.

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.

setFreeStandingback to summary
public void setFreeStanding(boolean freeStanding)

Sets the free standing value.

Parameters
freeStanding:boolean

the free standing value