Class Border
- Direct Known Subclasses:
CSSBorder, RoundBorder, RoundRectBorder
Base class that allows us to render a border for a component, a border is drawn before the component and is drawn within the padding region of the component. It is the responsibility of the component not to draw outside of the border line.
This class can be extended to provide additional border types and custom made border types.
A border can optionally paint the background of the component, this depends on the border type and is generally required for rounded borders that "know" the area that should be filled.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBorder()Prevents usage of new operator, use the factory methods in the class or subclass to create new border types. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOuterBorder(Border outer) Ads a border that wraps this bordervoidCleans the tile tracking state allowing the garbage collector to pick up the component and the image datastatic BorderCreates a lowered bevel border with default colors, highlight is derived from the component and shadow is a plain dark colorstatic BordercreateBevelLowered(int highlightOuter, int highlightInner, int shadowOuter, int shadowInner) Creates a raised bevel border with the given colorsstatic BorderCreates a lowered bevel border with default colors, highlight is derived from the component and shadow is a plain dark colorstatic BordercreateBevelRaised(int highlightOuter, int highlightInner, int shadowOuter, int shadowInner) Creates a raised bevel border with the given colorsstatic BordercreateCompoundBorder(Border top, Border bottom, Border left, Border right) Creates a border that is comprised of multiple border types so one border type can be used on top while another one can be used at the bottom.static BordercreateDashedBorder(int thickness) Creates a dashed border with the specified thickness and the theme colorsstatic BordercreateDashedBorder(int thickness, int color) Creates a dashed border with the specified thickness and colorstatic BordercreateDottedBorder(int thickness) Creates a dotted border with the specified thickness and the theme colorsstatic BordercreateDottedBorder(int thickness, int color) Creates a dotted border with the specified thickness and colorstatic BordercreateDoubleBorder(int thickness) Creates a double border with the specified thickness and colorstatic BordercreateDoubleBorder(int thickness, int color) Creates a double border with the specified thickness and colorstatic BorderCreates an empty border, this is useful where we don't want a border for a component but want a focus border etc...static BorderCreates a lowered etched border with default colors, highlight is derived from the component and shadow is a plain dark colorstatic BordercreateEtchedLowered(int highlight, int shadow) Creates a raised etched border with the given colorsstatic BorderCreates a lowered etched border with default colors, highlight is derived from the component and shadow is a plain dark colorstatic BordercreateEtchedRaised(int highlight, int shadow) Creates a raised etched border with the given colorsstatic BordercreateGrooveBorder(int thickness) Creates a groove border with the specified thickness and theme colorsstatic BordercreateGrooveBorder(int thickness, int color) Creates a groove border with the specified thickness and colorstatic BordercreateHorizonalImageBorder(Image left, Image right, Image center) This is an image border that can only grow horizontallystatic BordercreateImageBorder(Image top, Image topLeft, Image background) The given images are tiled appropriately across the matching side of the border, rotated and placed as expected in the four corners.static BordercreateImageBorder(Image top, Image bottom, Image left, Image right, Image topLeft, Image topRight, Image bottomLeft, Image bottomRight, Image background) The given top/bottom/left/right images are tiled appropriately across the matching sides of the border and the corners are placed as expected in the four corners.static BordercreateImageScaledBorder(Image top, Image bottom, Image left, Image right, Image topLeft, Image topRight, Image bottomLeft, Image bottomRight, Image background) The given top/bottom/left/right images are scaled appropriately across the matching sides of the border and the corners are placed as expected in the four corners.static BordercreateImageSplicedBorder(Image img, double topInset, double rightInset, double bottomInset, double leftInset) The given image is spliced into 9 pieces based on the provided top, right, bottom, and left insets, and the resulting sub-images are used to form a 9-piece image border viacom.codename1.ui.Image, com.codename1.ui.Image, com.codename1.ui.Image, com.codename1.ui.Image, com.codename1.ui.Image, com.codename1.ui.Image, com.codename1.ui.Image, com.codename1.ui.Image)static BordercreateInsetBorder(int thickness) Creates an inset border with the specified thickness and theme colorsstatic BordercreateInsetBorder(int thickness, int color) Creates an inset border with the specified thickness and colorstatic BordercreateLineBorder(float thickness) Creates a line border that uses the color of the component foreground for drawingstatic BordercreateLineBorder(float thickness, int color) Creates a line border that uses the given color for the componentstatic BordercreateLineBorder(int thickness) Creates a line border that uses the color of the component foreground for drawingstatic BordercreateLineBorder(int thickness, int color) Creates a line border that uses the given color for the componentstatic BordercreateLineBorder(int thickness, int color, String title) Creates a line border that uses the given color for the componentstatic BordercreateLineBorder(int thickness, String title) Creates a line border with the specified titlestatic BordercreateOutsetBorder(int thickness) Creates an outset border with the specified thickness and theme colorsstatic BordercreateOutsetBorder(int thickness, int color) Creates an outset border with the specified thickness and colorWhen applied to buttons borders produce a version that reverses the effects of the border providing a pressed feelstatic BordercreateRidgeBorder(int thickness) Creates a ridge border with the specified thickness and theme colorsstatic BordercreateRidgeBorder(int thickness, int color) Creates a ridge border with the specified thickness and colorstatic BordercreateRoundBorder(int arcWidth, int arcHeight) Creates a rounded corner border that uses the color of the component foreground for drawing.static BordercreateRoundBorder(int arcWidth, int arcHeight, boolean outline) Creates a rounded corner border that uses the color of the component foreground for drawing.static BordercreateRoundBorder(int arcWidth, int arcHeight, int color) Creates a rounded border that uses the given color for the component.static BordercreateRoundBorder(int arcWidth, int arcHeight, int color, boolean outline) Creates a rounded border that uses the given color for the component.static BordercreateUndelineBorder(float thickness) Creates an underline border that uses the color of the component foreground for drawingstatic BordercreateUndelineBorder(int thickness) Creates an underline border that uses the color of the component foreground for drawingstatic BordercreateUnderlineBorder(float thickness) Creates an underline border that uses the color of the component foreground for drawingstatic BordercreateUnderlineBorder(float thickness, int color) Creates an underline border that uses the given colorstatic BordercreateUnderlineBorder(int thickness) Creates an underline border that uses the color of the component foreground for drawingstatic BordercreateUnderlineBorder(int thickness, int color) Creates an underline border that uses the given colorstatic BordercreateVerticalImageBorder(Image top, Image bottom, Image center) This is an image border that can only grow verticallyboolean{}Border[]This method returns the Compound Borders array.static BorderGets the default border to the given valuestatic BordergetEmpty()Returns an empty border, this is mostly useful for overriding components that have a border by defaultReturns the focused version of the border if one is installedintReturns the minimum size required to properly display this border, normally this is 0 but a border might deem itself undisplayable with too small a size e.g.intReturns the minimum size required to properly display this border, normally this is 0 but a border might deem itself undisplayable with too small a size e.g.Returns the pressed version of the border if one is set by the userThis method is for internal usage only!intThis method returns how thick is the border in pixels, notice this doesn't apply to most border typesprotected RectangleThe track component is an area to which an arrow based border should point at.inthashCode()booleanReturns true if installing this border will override the painting of the component backgroundbooleanIndicates whether this is an empty borderbooleanAllows toggling the order in which the outer and inner borders are painted for the Outer border typebooleanReturns true if this border type is a rectangle border.voidlock()This callback indicates that a component pointing at this border is initialized, this method is useful for image borders whose lock methods are implicitly invoked.If a border is a horizontal image border it can be mirrored which is useful for an RTL scenariovoidDraws the border for the given component, this method is called before a call to background painting is made.voidHas effect when the border demands responsibility for background painting normally the painter will perform this work but in this case the border might do it instead.static voidsetDefaultBorder(Border border) Sets the default border to the given valuevoidsetFocusedInstance(Border focused) Allows us to define a border that will act as the focused version of this bordervoidsetImageBorderSpecialTile(Image tileTop, Image tileBottom, Image tileLeft, Image tileRight, Component trackComponent) This method is designed mainly for the purpose of creating an arrow that will track a specific component using the image border the tile given would be an arrow like image just like the ones used for the top/bottom/left/right images.voidsetImageBorderSpecialTile(Image tileTop, Image tileBottom, Image tileLeft, Image tileRight, Rectangle trackComponent) This method is designed mainly for the purpose of creating an arrow that will track a specific component using the image border the tile given would be an arrow like image just like the ones used for the top/bottom/left/right images.voidsetPaintOuterBorderFirst(boolean paintOuterBorderFirst) Allows toggling the order in which the outer and inner borders are painted for the Outer border typevoidsetPressedInstance(Border pressed) Allows us to define a border that will act as the pressed version of this bordervoidsetThickness(int thickness) This method returns sets the border thickness in pixels, notice this doesn't apply to most border typesvoidsetTrackComponent(Component trackComponent) In the case of an arrow border the track component lets us track the position to which the border is pointingvoidsetTrackComponent(Rectangle trackComponent) In the case of an arrow border the track component lets us track the position to which the border is pointingvoidunlock()This callback indicates that a component pointing at this border is now deinitilized This method may be invoked multiple times.
-
Constructor Details
-
Border
protected Border()Prevents usage of new operator, use the factory methods in the class or subclass to create new border types.
-
-
Method Details
-
getEmpty
Returns an empty border, this is mostly useful for overriding components that have a border by default
Returns
a border than draws nothing
Deprecated
use createEmpty instead
-
createEmpty
Creates an empty border, this is useful where we don't want a border for a component but want a focus border etc...
Returns
a border than draws nothing
-
createImageBorder
public static Border createImageBorder(Image top, Image bottom, Image left, Image right, Image topLeft, Image topRight, Image bottomLeft, Image bottomRight, Image background) The given top/bottom/left/right images are tiled appropriately across the matching sides of the border and the corners are placed as expected in the four corners. The background image is optional and it will be tiled in the background if necessary.
By default this border does not override background unless a background image is specified
Parameters
-
top: the image of the top line -
bottom: the image of the bottom line -
left: the image of the left line -
right: the image of the right line -
topLeft: the image of the top left corner -
topRight: the image of the top right corner -
bottomLeft: the image of the bottom left corner -
bottomRight: the image of the bottom right corner -
background: the image of the background (optional)
Returns
new border instance
-
-
createImageSplicedBorder
public static Border createImageSplicedBorder(Image img, double topInset, double rightInset, double bottomInset, double leftInset) The given image is spliced into 9 pieces based on the provided top, right, bottom, and left insets, and the resulting sub-images are used to form a 9-piece image border via
com.codename1.ui.Image, com.codename1.ui.Image, com.codename1.ui.Image, com.codename1.ui.Image, com.codename1.ui.Image, com.codename1.ui.Image, com.codename1.ui.Image, com.codename1.ui.Image)Insets are all given in a (u,v) coordinate space where (0,0) is the top-left corner of the image, and (1.0, 1.0) is the bottom-right corner of the image.
Parameters
-
img: The image to be used as a background image and spliced. -
topInset -
rightInset -
bottomInset -
leftInset
Returns
A 9-piece image border.
-
-
createImageScaledBorder
public static Border createImageScaledBorder(Image top, Image bottom, Image left, Image right, Image topLeft, Image topRight, Image bottomLeft, Image bottomRight, Image background) The given top/bottom/left/right images are scaled appropriately across the matching sides of the border and the corners are placed as expected in the four corners. The background image is optional and it will be tiled in the background if necessary.
By default this border does not override background unless a background image is specified
Parameters
-
top: the image of the top line -
bottom: the image of the bottom line -
left: the image of the left line -
right: the image of the right line -
topLeft: the image of the top left corner -
topRight: the image of the top right corner -
bottomLeft: the image of the bottom left corner -
bottomRight: the image of the bottom right corner -
background: the image of the background (optional)
Returns
new border instance
-
-
createHorizonalImageBorder
-
createVerticalImageBorder
-
createImageBorder
The given images are tiled appropriately across the matching side of the border, rotated and placed as expected in the four corners. The background image is optional and it will be tiled in the background if necessary.
By default this border does not override background unless a background image is specified.
Notice that this version of the method is potentially much more efficient since images are rotated internally and this might save quite a bit of memory!
The top and topLeft images must be square! The width and height of these images must be equal otherwise rotation won't work as you expect.
Parameters
-
top: the image of the top line -
topLeft: the image of the top left corner -
background: the image of the background (optional)
Returns
new border instance
-
-
createLineBorder
Creates a line border that uses the color of the component foreground for drawing
Parameters
thickness: thickness of the border in pixels
Returns
new border instance
-
createLineBorder
Creates a line border that uses the color of the component foreground for drawing
Parameters
thickness: thickness of the border in millimeters
Returns
new border instance
-
createUndelineBorder
Creates an underline border that uses the color of the component foreground for drawing
Parameters
thickness: thickness of the border in pixels
Returns
new border instance
Deprecated
due to a spelling mistake. Use
thickness) -
createUnderlineBorder
Creates an underline border that uses the color of the component foreground for drawing
Parameters
thickness: thickness of the border in pixels
Returns
new border instance
-
createUndelineBorder
Creates an underline border that uses the color of the component foreground for drawing
Parameters
thickness: thickness of the border in millimeters
Returns
new border instance
Deprecated
due to a spelling mistake. Use
thickness) -
createUnderlineBorder
Creates an underline border that uses the color of the component foreground for drawing
Parameters
thickness: thickness of the border in millimeters
Returns
new border instance
-
createUnderlineBorder
Creates an underline border that uses the given color
Parameters
-
thickness: thickness of the border in pixels -
color: the color
Returns
new border instance
-
-
createUnderlineBorder
Creates an underline border that uses the given color
Parameters
-
thickness: thickness of the border in millimeters -
color: the color
Returns
new border instance
-
-
createDottedBorder
Creates a dotted border with the specified thickness and color
Parameters
-
thickness: The border thickness in pixels -
color: The border color
Returns
The border
-
-
createDashedBorder
Creates a dashed border with the specified thickness and color
Parameters
-
thickness: The border thickness in pixels -
color: The border color
Returns
The border
-
-
createDoubleBorder
Creates a double border with the specified thickness and color
Parameters
-
thickness: The border thickness in pixels -
color: The border color
Returns
The border
-
-
createDottedBorder
Creates a dotted border with the specified thickness and the theme colors
Parameters
thickness: The border thickness in pixels
Returns
The border
-
createDashedBorder
Creates a dashed border with the specified thickness and the theme colors
Parameters
thickness: The border thickness in pixels
Returns
The border
-
createDoubleBorder
Creates a double border with the specified thickness and color
Parameters
thickness: The border thickness in pixels
Returns
The border
-
createOutsetBorder
Creates an outset border with the specified thickness and theme colors
Parameters
thickness: The border thickness in pixels
Returns
The border
-
createOutsetBorder
Creates an outset border with the specified thickness and color
Parameters
-
thickness: The border thickness in pixels -
color: The border color
Returns
The border
-
-
createInsetBorder
Creates an inset border with the specified thickness and theme colors
Parameters
thickness: The border thickness in pixels
Returns
The border
-
createInsetBorder
Creates an inset border with the specified thickness and color
Parameters
-
thickness: The border thickness in pixels -
color: The border color
Returns
The border
-
-
createGrooveBorder
Creates a groove border with the specified thickness and theme colors
Parameters
thickness: The border thickness in pixels
Returns
The border
-
createGrooveBorder
Creates a groove border with the specified thickness and color
Parameters
-
thickness: The border thickness in pixels -
color: The border color
Returns
The border
-
-
createRidgeBorder
Creates a ridge border with the specified thickness and theme colors
Parameters
thickness: The border thickness in pixels
Returns
The border
-
createRidgeBorder
Creates a ridge border with the specified thickness and color
Parameters
-
thickness: The border thickness in pixels -
color: The border color
Returns
The border
-
-
createLineBorder
-
createLineBorder
-
createLineBorder
Creates a line border that uses the given color for the component
Parameters
-
thickness: thickness of the border in pixels -
color: the color for the border
Returns
new border instance
-
-
createLineBorder
Creates a line border that uses the given color for the component
Parameters
-
thickness: thickness of the border in millimeters -
color: the color for the border
Returns
new border instance
-
-
createRoundBorder
Creates a rounded corner border that uses the color of the component foreground for drawing. Due to technical issues (lack of shaped clipping) performance and memory overhead of round borders can be low if used with either a bgImage or translucency!
This border overrides any painter used on the component and would ignor such a painter.
Parameters
-
arcWidth: the horizontal diameter of the arc at the four corners. -
arcHeight: the vertical diameter of the arc at the four corners.
Returns
new border instance
Deprecated
-
-
createRoundBorder
Creates a rounded corner border that uses the color of the component foreground for drawing. Due to technical issues (lack of shaped clipping) performance and memory overhead of round borders can be low if used with either a bgImage or translucency!
This border overrides any painter used on the component and would ignor such a painter.
Parameters
-
arcWidth: the horizontal diameter of the arc at the four corners. -
arcHeight: the vertical diameter of the arc at the four corners. -
outline: whether the round rect border outline should be drawn
Returns
new border instance
Deprecated
-
-
createRoundBorder
Creates a rounded border that uses the given color for the component. Due to technical issues (lack of shaped clipping) performance and memory overhead of round borders can be low if used with either a bgImage or translucency!
This border overrides any painter used on the component and would ignor such a painter.
Parameters
-
arcWidth: the horizontal diameter of the arc at the four corners. -
arcHeight: the vertical diameter of the arc at the four corners. -
color: the color for the border
Returns
new border instance
Deprecated
-
-
createRoundBorder
Creates a rounded border that uses the given color for the component. Due to technical issues (lack of shaped clipping) performance and memory overhead of round borders can be low if used with either a bgImage or translucency!
This border overrides any painter used on the component and would ignor such a painter.
Parameters
-
arcWidth: the horizontal diameter of the arc at the four corners. -
arcHeight: the vertical diameter of the arc at the four corners. -
color: the color for the border -
outline: whether the round rect border outline should be drawn
Returns
new border instance
Deprecated
-
-
createEtchedLowered
Creates a lowered etched border with default colors, highlight is derived from the component and shadow is a plain dark color
Returns
new border instance
-
createEtchedLowered
Creates a raised etched border with the given colors
Parameters
-
highlight: color RGB value -
shadow: color RGB value
Returns
new border instance
-
-
createEtchedRaised
Creates a lowered etched border with default colors, highlight is derived from the component and shadow is a plain dark color
Returns
new border instance
-
createEtchedRaised
Creates a raised etched border with the given colors
Parameters
-
highlight: color RGB value -
shadow: color RGB value
Returns
new border instance
-
-
createCompoundBorder
Creates a border that is comprised of multiple border types so one border type can be used on top while another one can be used at the bottom. Notice that this doesn't work well with all border types (e.g. image borders)
Parameters
-
top: the top border -
bottom: the bottom border -
left: the left border -
right: the right border
Returns
a compound border
-
-
createBevelLowered
Creates a lowered bevel border with default colors, highlight is derived from the component and shadow is a plain dark color
Returns
new border instance
-
createBevelLowered
public static Border createBevelLowered(int highlightOuter, int highlightInner, int shadowOuter, int shadowInner) Creates a raised bevel border with the given colors
Parameters
-
highlightOuter: RGB of the outer edge of the highlight area -
highlightInner: RGB of the inner edge of the highlight area -
shadowOuter: RGB of the outer edge of the shadow area -
shadowInner: RGB of the inner edge of the shadow area
Returns
new border instance
-
-
createBevelRaised
Creates a lowered bevel border with default colors, highlight is derived from the component and shadow is a plain dark color
Returns
new border instance
-
createBevelRaised
public static Border createBevelRaised(int highlightOuter, int highlightInner, int shadowOuter, int shadowInner) Creates a raised bevel border with the given colors
Parameters
-
highlightOuter: RGB of the outer edge of the highlight area -
highlightInner: RGB of the inner edge of the highlight area -
shadowOuter: RGB of the outer edge of the shadow area -
shadowInner: RGB of the inner edge of the shadow area
Returns
new border instance
-
-
getDefaultBorder
Gets the default border to the given value
Returns
the default border
-
setDefaultBorder
Sets the default border to the given value
Parameters
border: new border value
-
mirrorBorder
If a border is a horizontal image border it can be mirrored which is useful for an RTL scenario
Returns
the current border or a mirrored instance
-
setImageBorderSpecialTile
public void setImageBorderSpecialTile(Image tileTop, Image tileBottom, Image tileLeft, Image tileRight, Component trackComponent) This method is designed mainly for the purpose of creating an arrow that will track a specific component using the image border the tile given would be an arrow like image just like the ones used for the top/bottom/left/right images. This image would be positioned so it points at the center of the track component
Parameters
-
tileTop: an image that will replace one of the tiles on the top if the track component is there -
tileBottom: an image that will replace one of the tiles on the bottom if the track component is there -
tileLeft: an image that will replace one of the tiles on the left if the track component is there -
tileRight: an image that will replace one of the tiles on the right if the track component is there -
trackComponent: the component that will be tracked for the positioning of the tile
-
-
getTrackComponent
The track component is an area to which an arrow based border should point at. It's assumed to be outside of the border region in absolute screen coordinates.
Returns
the rectangle to point at or null if this isn't an arrow border
-
setTrackComponent
In the case of an arrow border the track component lets us track the position to which the border is pointing
Parameters
trackComponent: the track component
-
setTrackComponent
In the case of an arrow border the track component lets us track the position to which the border is pointing
Parameters
trackComponent: the track component
-
setImageBorderSpecialTile
public void setImageBorderSpecialTile(Image tileTop, Image tileBottom, Image tileLeft, Image tileRight, Rectangle trackComponent) This method is designed mainly for the purpose of creating an arrow that will track a specific component using the image border the tile given would be an arrow like image just like the ones used for the top/bottom/left/right images. This image would be positioned so it points at the center of the track component
Parameters
-
tileTop: an image that will replace one of the tiles on the top if the track component is there -
tileBottom: an image that will replace one of the tiles on the bottom if the track component is there -
tileLeft: an image that will replace one of the tiles on the left if the track component is there -
tileRight: an image that will replace one of the tiles on the right if the track component is there -
trackComponent: the component that will be tracked for the positioning of the tile
-
-
clearImageBorderSpecialTile
public void clearImageBorderSpecialTile()Cleans the tile tracking state allowing the garbage collector to pick up the component and the image data -
addOuterBorder
Ads a border that wraps this border
Parameters
outer: The outer border
-
getMinimumHeight
public int getMinimumHeight()Returns the minimum size required to properly display this border, normally this is 0 but a border might deem itself undisplayable with too small a size e.g. for the case of an image border the minimum height would be top + bottom and the minimum width would be left+right
Returns
0 if not applicable or a dimension if it is.
-
getMinimumWidth
public int getMinimumWidth()Returns the minimum size required to properly display this border, normally this is 0 but a border might deem itself undisplayable with too small a size e.g. for the case of an image border the minimum height would be top + bottom and the minimum width would be left+right
Returns
0 if not applicable or a dimension if it is.
-
isEmptyBorder
public boolean isEmptyBorder()Indicates whether this is an empty border
Returns
true if this is an empty border
-
equals
-
hashCode
-
isBackgroundPainter
public boolean isBackgroundPainter()Returns true if installing this border will override the painting of the component background
Returns
true if this border replaces the painter
-
isRectangleType
public boolean isRectangleType()Returns true if this border type is a rectangle border.
Returns
true if this border is rectangle
-
getFocusedInstance
Returns the focused version of the border if one is installed
Returns
a focused version of this border if one exists
Deprecated
use the getSelectedStyle() method in the component class
-
setFocusedInstance
Allows us to define a border that will act as the focused version of this border
Parameters
focused: a border that will be returned by the focused version method
Deprecated
use the getSelectedStyle() method in the component class
-
getPressedInstance
Returns the pressed version of the border if one is set by the user
Returns
the pressed instance of this border
-
setPressedInstance
Allows us to define a border that will act as the pressed version of this border
Parameters
pressed: a border that will be returned by the pressed version method
-
createPressedVersion
When applied to buttons borders produce a version that reverses the effects of the border providing a pressed feel
Returns
a border that will make the button feel pressed
-
paintBorderBackground
Has effect when the border demands responsibility for background painting normally the painter will perform this work but in this case the border might do it instead.
Parameters
-
g: graphics context to draw onto -
c: component whose border should be drawn
-
-
paint
-
getThickness
public int getThickness()This method returns how thick is the border in pixels, notice this doesn't apply to most border types
Returns
the Border thickness
-
setThickness
public void setThickness(int thickness) This method returns sets the border thickness in pixels, notice this doesn't apply to most border types
Parameters
thickness: the Border thickness
-
isPaintOuterBorderFirst
public boolean isPaintOuterBorderFirst()Allows toggling the order in which the outer and inner borders are painted for the Outer border type
Returns
whether the outside border should be painter first
-
setPaintOuterBorderFirst
public void setPaintOuterBorderFirst(boolean paintOuterBorderFirst) Allows toggling the order in which the outer and inner borders are painted for the Outer border type
Parameters
paintOuterBorderFirst: whether the outside border should be painter first
-
getCompoundBorders
This method returns the Compound Borders array. The array size is 4 and the borders arranged as follows : Border[] borders = getCompoundBorders(); Border top = borders
;invalid reference
Component.TOPBorder bottom = borders
;invalid reference
Component.BOTTOMBorder left = borders
;invalid reference
Component.LEFTBorder right = borders
;invalid reference
Component.RIGHTReturns
the borders array or null if this is not a Compound Border
-
lock
public void lock()This callback indicates that a component pointing at this border is initialized, this method is useful for image borders whose lock methods are implicitly invoked. This method may be invoked multiple times. -
unlock
public void unlock()This callback indicates that a component pointing at this border is now deinitilized This method may be invoked multiple times. -
getProperty
-