站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

BorderFactory (Visual Library API) - NetBeans API Javadoc (Current Development Version)

org.netbeans.api.visual 2.2

org.netbeans.api.visual.border
Class BorderFactory

java.lang.Object
  extended by org.netbeans.api.visual.border.BorderFactory

public final class BorderFactory
extends Object

This class is a factory of all built-in implementation of borders. Instances of built-in borders can be shared by multiple widgets.


Method Summary
static Border createBevelBorder(boolean raised)
          Creates a bevel border.
static Border createBevelBorder(boolean raised, Color color)
          Creates a bevel border.
static Border createCompositeBorder(Border... borders)
          Creates a composite border that consists of a list of specified borders - one embedded to another.
static Border createDashedBorder(Color color, int width, int height)
          Creates a resize border rendered with dashed stroke.
static Border createDashedBorder(Color color, int width, int height, boolean squares)
          Creates a resize border rendered with dashed stroke.
static Border createEmptyBorder()
          Creates an default empty border with 0px layout.
static Border createEmptyBorder(int thickness)
          Creates an empty border with specific thickness.
static Border createEmptyBorder(int horizontal, int vertical)
          Creates an empty border with specific thickness.
static Border createEmptyBorder(int top, int left, int bottom, int right)
          Creates an empty border with specific thickness.
static Border createFancyDashedBorder(Color color, int width, int height)
          Deprecated. use createDashedBorder (color, width, height, true) method instead
static Border createImageBorder(Insets insets, Image image)
          Creates an image layout.
static Border createImageBorder(Insets borderInsets, Insets imageInsets, Image image)
          Creates an image layout.
static Border createLineBorder()
          Creates a line border with default style.
static Border createLineBorder(int thickness)
          Creates a line border with specific thickness.
static Border createLineBorder(int thickness, Color color)
          Creates a line border with specific thickness and color.
static Border createLineBorder(int top, int left, int bottom, int right, Color color)
          Creates a line border with specific insets and color.
static Border createOpaqueBorder(int top, int left, int bottom, int right)
          Creates an opaque border with specific thickness.
static Border createResizeBorder(int thickness)
          Creates a resize border.
static Border createResizeBorder(int thickness, Color color, boolean outer)
          Creates a resize border.
static Border createRoundedBorder(int arcWidth, int arcHeight, Color fillColor, Color drawColor)
          Creates an rounded-rectangle border with a specified style.
static Border createRoundedBorder(int arcWidth, int arcHeight, int insetWidth, int insetHeight, Color fillColor, Color drawColor)
          Creates an rounded-rectangle border with a specified style.
static Border createSwingBorder(Scene scene, Border border)
          Creates a layout from a Swing border.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createEmptyBorder

public static Border createEmptyBorder()
Creates an default empty border with 0px layout. The instance can be shared by multiple widgets.

Returns:
the empty border

createEmptyBorder

public static Border createEmptyBorder(int thickness)
Creates an empty border with specific thickness. The instance can be shared by multiple widgets.

Parameters:
thickness - the border thickness
Returns:
the empty border

createEmptyBorder

public static Border createEmptyBorder(int horizontal,
                                       int vertical)
Creates an empty border with specific thickness. The instance can be shared by multiple widgets.

Parameters:
horizontal - the horizontal thickness
vertical - the vertical thickness
Returns:
the empty border

createEmptyBorder

public static Border createEmptyBorder(int top,
                                       int left,
                                       int bottom,
                                       int right)
Creates an empty border with specific thickness. The instance can be shared by multiple widgets.

Parameters:
top - the top inset
left - the left inset
bottom - the bottom inset
right - the right inset
Returns:
the empty border

createOpaqueBorder

public static Border createOpaqueBorder(int top,
                                        int left,
                                        int bottom,
                                        int right)
Creates an opaque border with specific thickness. The instance can be shared by multiple widgets.

Parameters:
top - the top inset
left - the left inset
bottom - the bottom inset
right - the right inset
Returns:
the empty border

createCompositeBorder

public static Border createCompositeBorder(Border... borders)
Creates a composite border that consists of a list of specified borders - one embedded to another. The instance can be shared by multiple widgets.

Parameters:
borders - the list of borders
Returns:
the composite border

createSwingBorder

public static Border createSwingBorder(Scene scene,
                                       Border border)
Creates a layout from a Swing border. The instance can be shared by multiple widgets but cannot be used in multiple scenes.

Parameters:
scene - the scene where the border is used.
border - the Swing border
Returns:
the border

createLineBorder

public static Border createLineBorder()
Creates a line border with default style. The instance can be shared by multiple widgets.

Returns:
the line border

createLineBorder

public static Border createLineBorder(int thickness)
Creates a line border with specific thickness. The line is still one pixel but the layout insets are calculated from thickness. The instance can be shared by multiple widgets.

Parameters:
thickness - the border thickness
Returns:
the line border

createLineBorder

public static Border createLineBorder(int thickness,
                                      Color color)
Creates a line border with specific thickness and color. The line is still one pixel but the layout insets are calculated from thickness. The instance can be shared by multiple widgets.

Parameters:
thickness - the border thickness
color - the line color
Returns:
the line border

createLineBorder

public static Border createLineBorder(int top,
                                      int left,
                                      int bottom,
                                      int right,
                                      Color color)
Creates a line border with specific insets and color. The line is still one pixel but the layout insets are specified. The instance can be shared by multiple widgets.

Parameters:
top - the top inset
left - the left inset
bottom - the bottom inset
right - the right inset
color - the line color
Returns:
the line border

createBevelBorder

public static Border createBevelBorder(boolean raised)
Creates a bevel border. The instance can be shared by multiple widgets.

Parameters:
raised - if true, then it is a raised-bevel border; if false, then it is a lowered-bevel layout
Returns:
the bevel border

createBevelBorder

public static Border createBevelBorder(boolean raised,
                                       Color color)
Creates a bevel border. The instance can be shared by multiple widgets.

Parameters:
raised - if true, then it is a raised-bevel layout; if false, then it is a lowered-bevel border
color - the border color
Returns:
the bevel border

createImageBorder

public static Border createImageBorder(Insets insets,
                                       Image image)
Creates an image layout. The border is painted using a supplied Image. The image is split into 3x3 regions defined by insets. The middle regions are tiled for supplying variable width and height of border. Central region is not painted. The instance can be shared by multiple widgets.

Parameters:
insets - the border insets
image - the border image
Returns:
the image border

createImageBorder

public static Border createImageBorder(Insets borderInsets,
                                       Insets imageInsets,
                                       Image image)
Creates an image layout. The border is painted using a supplied Image. The image is split into 3x3 regions defined by imageInsets. The middle regions are tiled for supplying variable width and height of border. Central region is not painted. The insets of the border is specified by borderInsets. The instance can be shared by multiple widgets.

Parameters:
borderInsets - the border insets
imageInsets - the image insets
image - the border image
Returns:
the image border

createRoundedBorder

public static Border createRoundedBorder(int arcWidth,
                                         int arcHeight,
                                         Color fillColor,
                                         Color drawColor)
Creates an rounded-rectangle border with a specified style. Insets are calculated from arcWidth and arcHeight. The instance can be shared by multiple widgets.

Parameters:
arcWidth - the arc width
arcHeight - the arc height
fillColor - the fill color
drawColor - the draw color
Returns:
the rounded border

createRoundedBorder

public static Border createRoundedBorder(int arcWidth,
                                         int arcHeight,
                                         int insetWidth,
                                         int insetHeight,
                                         Color fillColor,
                                         Color drawColor)
Creates an rounded-rectangle border with a specified style. The instance can be shared by multiple widgets.

Parameters:
arcWidth - the arc width
arcHeight - the arc height
insetWidth - the inset width
insetHeight - the inset height
fillColor - the fill color
drawColor - the draw color
Returns:
the rounded border

createResizeBorder

public static Border createResizeBorder(int thickness)
Creates a resize border. Usually used as resizing handles for ResizeAction. It renders a bounding rectangle with 8-direction squares. The instance can be shared by multiple widgets.

Parameters:
thickness - the thickness of the border
Returns:
the resize border

createResizeBorder

public static Border createResizeBorder(int thickness,
                                        Color color,
                                        boolean outer)
Creates a resize border. Usually used as resizing handles for ResizeAction. It renders a bounding rectangle with 8-direction squares. The instance can be shared by multiple widgets.

Parameters:
thickness - the thickness of the border
color - the border color
outer - if true, then the rectangle encapsulate the squares too; if false, then the rectangle encapsulates the widget client area only
Returns:
the resize border

createDashedBorder

public static Border createDashedBorder(Color color,
                                        int width,
                                        int height)
Creates a resize border rendered with dashed stroke. The instance can be shared by multiple widgets.

Parameters:
color - the border color
width - the inset width
height - the inset height
Returns:
the dashed border

createDashedBorder

public static Border createDashedBorder(Color color,
                                        int width,
                                        int height,
                                        boolean squares)
Creates a resize border rendered with dashed stroke. The instance can be shared by multiple widgets.

Parameters:
color - the border color
width - the inset width
height - the inset height
squares - the
Returns:
the dashed border

createFancyDashedBorder

public static Border createFancyDashedBorder(Color color,
                                             int width,
                                             int height)
Deprecated. use createDashedBorder (color, width, height, true) method instead

Creates a resize border rendered with fancy dashed stroke. The instance can be shared by multiple widgets.

Parameters:
color - the border color
width - the inset width
height - the inset height
Returns:
the fancy dashed border

org.netbeans.api.visual 2.2

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.