|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.AbstractButton
javax.swing.JButton
javax.swing.plaf.basic.BasicArrowButton
javax.swing.plaf.metal.MetalScrollButton
public class MetalScrollButton
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 JavaBeansTM
has been added to the java.beans package.
Please see XMLEncoder.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JButton |
|---|
JButton.AccessibleJButton |
| Nested classes/interfaces inherited from class javax.swing.AbstractButton |
|---|
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.plaf.basic.BasicArrowButton |
|---|
direction |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
MetalScrollButton(int direction,
int width,
boolean freeStanding)
|
|
| Method Summary | |
|---|---|
int |
getButtonWidth()
|
Dimension |
getMaximumSize()
If the maximum size has been set to a non- null value
just returns it. |
Dimension |
getMinimumSize()
If the minimum size has been set to a non- null value
just returns it. |
Dimension |
getPreferredSize()
If the preferredSize has been set to a
non-null value just returns it. |
void |
paint(Graphics g)
Invoked by Swing to draw components. |
void |
setFreeStanding(boolean freeStanding)
|
| Methods inherited from class javax.swing.plaf.basic.BasicArrowButton |
|---|
getDirection, isFocusTraversable, paintTriangle, setDirection |
| Methods inherited from class javax.swing.JButton |
|---|
configurePropertiesFromAction, getAccessibleContext, getUIClassID, isDefaultButton, isDefaultCapable, paramString, removeNotify, setDefaultCapable, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MetalScrollButton(int direction,
int width,
boolean freeStanding)
| Method Detail |
|---|
public void setFreeStanding(boolean freeStanding)
public void paint(Graphics g)
JComponentpaint 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.
paint in class BasicArrowButtong - the Graphics context in which to paintJComponent.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)public Dimension getPreferredSize()
JComponentpreferredSize has been set to a
non-null value just returns it.
If the UI delegate's getPreferredSize
method returns a non null value then return that;
otherwise defer to the component's layout manager.
getPreferredSize in class BasicArrowButtonpreferredSize propertyJComponent.setPreferredSize(java.awt.Dimension),
ComponentUIpublic Dimension getMinimumSize()
JComponentnull value
just returns it. If the UI delegate's getMinimumSize
method returns a non-null value then return that; otherwise
defer to the component's layout manager.
getMinimumSize in class BasicArrowButtonminimumSize propertyJComponent.setMinimumSize(java.awt.Dimension),
ComponentUIpublic Dimension getMaximumSize()
JComponentnull value
just returns it. If the UI delegate's getMaximumSize
method returns a non-null value then return that;
otherwise defer to the component's layout manager.
getMaximumSize in class BasicArrowButtonmaximumSize propertyJComponent.setMaximumSize(java.awt.Dimension),
ComponentUIpublic int getButtonWidth()
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.