Home about services products contact login
   com.smardec.asc

Advanced Swing Components

  animatepanel
  autocomplete
  dropdown
  filechooser
  fontchooser
  gradient
  hyperlink
  outlookpanel
  outlookpanel.renderers
  quick
  rotate
  sliderpanel
  spantable
  splashscreen
  statusbar
  table
  table.renderers
  table.wrappers
  tree
  treetable
  util
  xmlbars
  xmlbars.menubar
  xmlbars.toolbar
  xmlbars.toolbar.layouts
com.smardec.asc.sliderpanel
Class SliderPanelGradientBorder

java.lang.Object
|
+--com.smardec.asc.sliderpanel.SliderPanelGradientBorder
All Implemented Interfaces:
javax.swing.border.Border

public class SliderPanelGradientBorder
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
SliderPanelGradientBorder(int sliderOrientation)
Constructs a SliderPanelBorder with the specified JSliderPanel's orientation.
SliderPanelGradientBorder(int sliderOrientation, boolean drawOtherBorders)
Constructs a SliderPanelBorder with the specified JSliderPanel's orientation and borders look.
SliderPanelGradientBorder(int sliderOrientation, boolean drawOtherBorders, int otherBorderWidth)
Constructs a SliderPanelBorder with the specified JSliderPanel's orientation and borders look.
SliderPanelGradientBorder(int sliderOrientation, int dragBorderWidth)
Constructs a SliderPanelBorder with the specified JSliderPanel's orientation and borders look.
SliderPanelGradientBorder(int sliderOrientation, int dragBorderWidth, boolean drawOtherBorders)
Constructs a SliderPanelBorder with the specified JSliderPanel's orientation and borders look.
SliderPanelGradientBorder(int sliderOrientation, int dragBorderWidth, boolean drawOtherBorders, int otherBorderWidth)
Constructs a SliderPanelBorder with the specified JSliderPanel's orientation and borders look.
Method Summary
java.awt.Insets getBorderInsets(java.awt.Component component)
Returns the insets of the border.
int getBottomBorderWidth()
Returns the bottom border width.
java.awt.Color getColor1()
Returns start color for drag border gradient fill.
java.awt.Color getColor2()
Returns end color for drag border gradient fill.
int getLeftBorderWidth()
Returns the left border width.
int getRightBorderWidth()
Returns the right border width.
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 setBorderInsets(java.awt.Insets borderInsets)
Specifies the insets of the border.
void setBottomBorderWidth(int bottom)
Specifies the bottom border width.
void setColor1(java.awt.Color color1)
Specifies start color for drag border gradient fill.
void setColor2(java.awt.Color color2)
Specifies end color for drag border gradient fill.
void setLeftBorderWidth(int left)
Specifies the left border width.
void setRightBorderWidth(int right)
Specifies the right border width.
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
SliderPanelGradientBorder
public SliderPanelGradientBorder(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.

SliderPanelGradientBorder
public SliderPanelGradientBorder(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

SliderPanelGradientBorder
public SliderPanelGradientBorder(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

SliderPanelGradientBorder
public SliderPanelGradientBorder(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

SliderPanelGradientBorder
public SliderPanelGradientBorder(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

SliderPanelGradientBorder
public SliderPanelGradientBorder(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
getColor1
public java.awt.Color getColor1()
Returns start color for drag border gradient fill.

Returns:
start color for drag border gradient fill

setColor1
public void setColor1(java.awt.Color color1)
Specifies start color for drag border gradient fill.

Parameters:
color1 - start color for drag border gradient fill

getColor2
public java.awt.Color getColor2()
Returns end color for drag border gradient fill.

Returns:
end color for drag border gradient fill

setColor2
public void setColor2(java.awt.Color color2)
Specifies end color for drag border gradient fill.

Parameters:
color2 - end color for drag border gradient fill

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
Home about services products contact login