Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.smardec.asc.sliderpanel
Class SliderPanelBorder

    java.lang.Object
      |
      +--com.smardec.asc.sliderpanel.SliderPanelBorder

All Implemented Interfaces:
  javax.swing.border.Border

public class SliderPanelBorder
extends java.lang.Object
implements javax.swing.border.Border

`SliderPanelBorder` is border for `JSliderPanel`. Needed to support draging.

Field Summary
`static int` | `DRAG_BORDER_BOTTOM` The bottom drag border constraint.
`static int` | `DRAG_BORDER_LEFT` The left drag border constraint.
`static int` | `DRAG_BORDER_RIGHT` The right drag border constraint.
`static int` | `DRAG_BORDER_TOP` The top drag border constraint.

Constructor Summary
`SliderPanelBorder(int sliderOrientation)` Constructs a `SliderPanelBorder` with the specified `JSliderPanel`'s orientation.
`SliderPanelBorder(int sliderOrientation, boolean drawOtherBorders)` Constructs a `SliderPanelBorder` with the specified `JSliderPanel`'s orientation and borders look.
`SliderPanelBorder(int sliderOrientation, boolean drawOtherBorders, int otherBorderWidth)` Constructs a `SliderPanelBorder` with the specified `JSliderPanel`'s orientation and borders look.
`SliderPanelBorder(int sliderOrientation, int dragBorderWidth)` Constructs a `SliderPanelBorder` with the specified `JSliderPanel`'s orientation and borders look.
`SliderPanelBorder(int sliderOrientation, int dragBorderWidth, boolean drawOtherBorders)` Constructs a `SliderPanelBorder` with the specified `JSliderPanel`'s orientation and borders look.
`SliderPanelBorder(int sliderOrientation, int dragBorderWidth, boolean drawOtherBorders, int otherBorderWidth)` Constructs a `SliderPanelBorder` with the specified `JSliderPanel`'s orientation and borders look.

Method Summary
`java.awt.Color` | `getBgColor()` Returns background color for drag border fill.
`java.awt.Insets` | `getBorderInsets(java.awt.Component component)` Returns the insets of the border.
`int` | `getBottomBorderWidth()` Returns the bottom border width.
`int` | `getLeftBorderWidth()` Returns the left border width.
`java.awt.Color` | `getNonDragBorderColor()` Returns color for non-drag borders.
`int` | `getOffset()` Returns above and below offset percentage to dot filled area.
`java.awt.Color` | `getPrimaryColor()` Returns primary color for drag border fill.
`int` | `getRightBorderWidth()` Returns the right border width.
`java.awt.Color` | `getShadowColor()` Returns shadow color for drag border fill.
`int` | `getTopBorderWidth()` Returns the top border width.
`void` | `paintBorder(java.awt.Component component, java.awt.Graphics graphics, int x, int y, int width, int height)` Paints the border for the specified component with the specified position and size.
`void` | `setBgColor(java.awt.Color bgColor)` Specifies background color for drag border fill.
`void` | `setBorderInsets(java.awt.Insets borderInsets)` Specifies the insets of the border.
`void` | `setBottomBorderWidth(int bottom)` Specifies the bottom border width.
`void` | `setLeftBorderWidth(int left)` Specifies the left border width.
`void` | `setNonDragBorderColor(java.awt.Color nonDragBorderColor)` Specifies color for non-drag borders.
`void` | `setOffset(int offset)` Specifies above and below offset percentage to dot filled area.
`void` | `setPrimaryColor(java.awt.Color primaryColor)` Specifies primary color for drag border fill.
`void` | `setRightBorderWidth(int right)` Specifies the right border width.
`void` | `setShadowColor(java.awt.Color shadowColor)` Specifies shadow color for drag border fill.
`void` | `setTopBorderWidth(int top)` Specifies the top border width.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface javax.swing.border.Border
`isBorderOpaque`

Field Detail

### DRAG_BORDER_LEFT

    public static final int DRAG_BORDER_LEFT

  The left drag border constraint.

  See Also:
    Constant Field Values

### DRAG_BORDER_RIGHT

    public static final int DRAG_BORDER_RIGHT

  The right drag border constraint.

  See Also:
    Constant Field Values

### DRAG_BORDER_TOP

    public static final int DRAG_BORDER_TOP

  The top drag border constraint.

  See Also:
    Constant Field Values

### DRAG_BORDER_BOTTOM

    public static final int DRAG_BORDER_BOTTOM

  The bottom drag border constraint.

  See Also:
    Constant Field Values

Constructor Detail

### SliderPanelBorder

    public SliderPanelBorder(int sliderOrientation)

  Constructs a `SliderPanelBorder` with the specified `JSliderPanel`'s orientation.

Parameters:
  `sliderOrientation` - the orientation of the `JSliderPanel`, one of the following constants defined in `JSliderPanel`: `JSliderPanel.LEFT_PANEL`, `JSliderPanel.RIGHT_PANEL`, `JSliderPanel.TOP_PANEL` or `JSliderPanel.BOTTOM_PANEL`.

### SliderPanelBorder

    public SliderPanelBorder(int sliderOrientation,
                             int dragBorderWidth)

  Constructs a `SliderPanelBorder` with the specified `JSliderPanel`'s orientation and borders look.

Parameters:
  `sliderOrientation` - the orientation of the `JSliderPanel`, one of the following constants defined in `JSliderPanel`: `JSliderPanel.LEFT_PANEL`, `JSliderPanel.RIGHT_PANEL`, `JSliderPanel.TOP_PANEL` or `JSliderPanel.BOTTOM_PANEL`.
  `dragBorderWidth` - the new width of drag border in pixels

### SliderPanelBorder

    public SliderPanelBorder(int sliderOrientation,
                             boolean drawOtherBorders)

  Constructs a `SliderPanelBorder` with the specified `JSliderPanel`'s orientation and borders look.

Parameters:
  `sliderOrientation` - the orientation of the `JSliderPanel`, one of the following constants defined in `JSliderPanel`: `JSliderPanel.LEFT_PANEL`, `JSliderPanel.RIGHT_PANEL`, `JSliderPanel.TOP_PANEL` or `JSliderPanel.BOTTOM_PANEL`.
  `drawOtherBorders` - `true` if all borders except drag border should be painted, otherwise `false`

### SliderPanelBorder

    public SliderPanelBorder(int sliderOrientation,
                             int dragBorderWidth,
                             boolean drawOtherBorders)

  Constructs a `SliderPanelBorder` with the specified `JSliderPanel`'s orientation and borders look.

Parameters:
  `sliderOrientation` - the orientation of the `JSliderPanel`, one of the following constants defined in `JSliderPanel`: `JSliderPanel.LEFT_PANEL`, `JSliderPanel.RIGHT_PANEL`, `JSliderPanel.TOP_PANEL` or `JSliderPanel.BOTTOM_PANEL`.
  `dragBorderWidth` - the new width of drag border in pixels
  `drawOtherBorders` - `true` if all borders except drag border should be painted, otherwise `false`

### SliderPanelBorder

    public SliderPanelBorder(int sliderOrientation,
                             boolean drawOtherBorders,
                             int otherBorderWidth)

  Constructs a `SliderPanelBorder` with the specified `JSliderPanel`'s orientation and borders look.

Parameters:
  `sliderOrientation` - the orientation of the `JSliderPanel`, one of the following constants defined in `JSliderPanel`: `JSliderPanel.LEFT_PANEL`, `JSliderPanel.RIGHT_PANEL`, `JSliderPanel.TOP_PANEL` or `JSliderPanel.BOTTOM_PANEL`.
  `drawOtherBorders` - `true` if all borders except drag border should be painted, otherwise `false`
  `otherBorderWidth` - the new width of all borders except drag border in pixels

### SliderPanelBorder

    public SliderPanelBorder(int sliderOrientation,
                             int dragBorderWidth,
                             boolean drawOtherBorders,
                             int otherBorderWidth)

  Constructs a `SliderPanelBorder` with the specified `JSliderPanel`'s orientation and borders look.

Parameters:
  `sliderOrientation` - the orientation of the `JSliderPanel`, one of the following constants defined in `JSliderPanel`: `JSliderPanel.LEFT_PANEL`, `JSliderPanel.RIGHT_PANEL`, `JSliderPanel.TOP_PANEL` or `JSliderPanel.BOTTOM_PANEL`.
  `dragBorderWidth` - the new width of drag border in pixels
  `drawOtherBorders` - `true` if all borders except drag border should be painted, otherwise `false`
  `otherBorderWidth` - the new width of all borders except drag border in pixels

Method Detail

### getPrimaryColor

    public java.awt.Color getPrimaryColor()

  Returns primary color for drag border fill.

  Returns:
    primary color for drag border fill.

### setPrimaryColor

    public void setPrimaryColor(java.awt.Color primaryColor)

  Specifies primary color for drag border fill.

  Parameters:
    `primaryColor` - primary color for drag border fill

### getShadowColor

    public java.awt.Color getShadowColor()

  Returns shadow color for drag border fill.

  Returns:
    shadow color for drag border fill.

### setShadowColor

    public void setShadowColor(java.awt.Color shadowColor)

  Specifies shadow color for drag border fill.

  Parameters:
    `shadowColor` - shadow color for drag border fill

### getBgColor

    public java.awt.Color getBgColor()

  Returns background color for drag border fill.

  Returns:
    background color for drag border fill.

### setBgColor

    public void setBgColor(java.awt.Color bgColor)

  Specifies background color for drag border fill.

  Parameters:
    `bgColor` - background color for drag border fill

### getNonDragBorderColor

    public java.awt.Color getNonDragBorderColor()

  Returns color for non-drag borders.

  Returns:
    shadow color for non-drag borders.

### setNonDragBorderColor

    public void setNonDragBorderColor(java.awt.Color nonDragBorderColor)

  Specifies color for non-drag borders.

  Parameters:
    `nonDragBorderColor` - color for non-drag borders

### getOffset

    public int getOffset()

  Returns above and below offset percentage to dot filled area.

  Returns:
    above and below offset percentage to dot filled area.

### setOffset

    public void setOffset(int offset)

  Specifies above and below offset percentage to dot filled area.

  Parameters:
    `offset` - above and below offset percentage to dot filled area

### paintBorder

    public void paintBorder(java.awt.Component component,
                            java.awt.Graphics graphics,
                            int x,
                            int y,
                            int width,
                            int height)

  Paints the border for the specified component with the specified position and size.

  Specified by:
    `paintBorder` in interface `javax.swing.border.Border`
  Parameters:
    `component` - the component for which this border is being painted
    `graphics` - the paint graphics
    `x` - the x position of the painted border
    `y` - the y position of the painted border
    `width` - the width of the painted border
    `height` - the height of the painted border

### getBorderInsets

    public java.awt.Insets getBorderInsets(java.awt.Component component)

  Returns the insets of the border.

  Specified by:
    `getBorderInsets` in interface `javax.swing.border.Border`
  Parameters:
    `component` - the component for which this border insets value applies

### setBorderInsets

    public void setBorderInsets(java.awt.Insets borderInsets)

  Specifies the insets of the border.

  Parameters:
    `borderInsets` - border insets

### setLeftBorderWidth

    public void setLeftBorderWidth(int left)

  Specifies the left border width.

  Parameters:
    `left` - the new width of left border in pixels

### setRightBorderWidth

    public void setRightBorderWidth(int right)

  Specifies the right border width.

  Parameters:
    `right` - the new width of right border in pixels

### setTopBorderWidth

    public void setTopBorderWidth(int top)

  Specifies the top border width.

  Parameters:
    `top` - the new width of top border in pixels

### setBottomBorderWidth

    public void setBottomBorderWidth(int bottom)

  Specifies the bottom border width.

  Parameters:
    `bottom` - the new width of bottom border in pixels

### getLeftBorderWidth

    public int getLeftBorderWidth()

  Returns the left border width.

  Returns:
    the left border width

### getRightBorderWidth

    public int getRightBorderWidth()

  Returns the right border width.

  Returns:
    the right border width

### getTopBorderWidth

    public int getTopBorderWidth()

  Returns the top border width.

  Returns:
    the top border width

### getBottomBorderWidth

    public int getBottomBorderWidth()

  Returns the bottom border width.

  Returns:
    the bottom border width

Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2006 Smardec. All Rights Reserved.