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..
| Modifier and Type | Field and Description |
|---|---|
| private Color | |
| protected int | direction
The direction of the arrow. |
| private Color | |
| private Color |
| Access | Constructor and Description |
|---|---|
| public | BasicArrowButton(int
the direction of the arrow; one of
direction, Color SwingConstants.NORTH, SwingConstants.SOUTH,
SwingConstants.EAST or SwingConstants.WESTthe background color of the button background, Color the color of the shadow shadow, Color the color of the dark shadow darkShadow, Color the color of the highlight highlight)Creates a |
| public | BasicArrowButton(int
the direction of the arrow; one of
direction)SwingConstants.NORTH, SwingConstants.SOUTH,
SwingConstants.EAST or SwingConstants.WESTCreates a |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public Dimension | Returns: the maximum sizeOverrides javax. Returns the maximum size of the |
| public Dimension | Returns: the minimum sizeOverrides javax. Returns the minimum size of the |
| public Dimension | Returns: the preferred sizeOverrides javax. Returns the preferred size of the |
| public boolean | Returns: falseOverrides java. Returns whether the arrow button should get the focus. |
| public void | |
| private void | |
| public void | paintTriangle(Graphics
the g, int Graphics to draw tothe x coordinate x, int the y coordinate y, int the size of the triangle to draw size, int the direction in which to draw the arrow;
one of direction, boolean SwingConstants.NORTH,
SwingConstants.SOUTH, SwingConstants.EAST or
SwingConstants.WESTwhether or not the arrow is drawn enabled isEnabled)Paints a triangle. |
| private void | |
| public void | setDirection(int
the direction of the arrow; one of
of direction)SwingConstants.NORTH,
SwingConstants.SOUTH,
SwingConstants.EAST or SwingConstants.WESTSets the direction of the arrow. |
| darkShadow | back to summary |
|---|---|
| private Color darkShadow | |
| direction | back to summary |
|---|---|
| protected int direction The direction of the arrow. One of
| |
| highlight | back to summary |
|---|---|
| private Color highlight | |
| shadow | back to summary |
|---|---|
| private Color shadow | |
| BasicArrowButton | back to summary |
|---|---|
| public BasicArrowButton(int direction, Color background, Color shadow, Color darkShadow, Color highlight) Creates a
| |
| BasicArrowButton | back to summary |
|---|---|
| public BasicArrowButton(int direction) Creates a
| |
| getDirection | back to summary |
|---|---|
| public int getDirection() Returns the direction of the arrow.
| |
| getMaximumSize | back to summary |
|---|---|
| public Dimension getMaximumSize() Overrides javax. Returns the maximum size of the
| |
| getMinimumSize | back to summary |
|---|---|
| public Dimension getMinimumSize() Overrides javax. Returns the minimum size of the
| |
| getPreferredSize | back to summary |
|---|---|
| public Dimension getPreferredSize() Overrides javax. Returns the preferred size of the
| |
| isFocusTraversable | back to summary |
|---|---|
| public boolean isFocusTraversable() Overrides java. Returns whether the arrow button should get the focus.
| |
| paint | back to summary |
|---|---|
| public void paint(Graphics g) Overrides javax. Doc from javax. Invoked by Swing to draw components.
Applications should not invoke
This method actually delegates the work of painting to three
protected methods: | |
| paintScaledTriangle | back to summary |
|---|---|
| private void paintScaledTriangle(Graphics g, double x, double y, double size, int direction, boolean isEnabled) | |
| paintTriangle | back to summary |
|---|---|
| public void paintTriangle(Graphics g, int x, int y, int size, int direction, boolean isEnabled) Paints a triangle.
| |
| paintUnscaledTriangle | back to summary |
|---|---|
| private void paintUnscaledTriangle(Graphics g, int x, int y, int size, int direction, boolean isEnabled) | |
| setDirection | back to summary |
|---|---|
| public void setDirection(int direction) Sets the direction of the arrow.
| |