Package com.ardor3d.extension.ui.border
Class UIBorder
java.lang.Object
com.ardor3d.extension.ui.util.Insets
com.ardor3d.extension.ui.border.UIBorder
- Direct Known Subclasses:
EmptyBorder
,ImageBorder
,SolidBorder
Defines a class responsible for drawing a "border" or "picture frame" drawn around the edges of a UI component.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionUIBorder
(int top, int left, int bottom, int right) Construct a border with the given edge thicknesses. -
Method Summary
Modifier and TypeMethodDescriptionabstract void
draw
(Renderer renderer, UIComponent component) Draw this border.static int
getBorderHeight
(UIComponent component) Calculate the total height of a border for a given component.static int
getBorderWidth
(UIComponent component) Calculate the total width of a border for a given component.
-
Constructor Details
-
UIBorder
public UIBorder(int top, int left, int bottom, int right) Construct a border with the given edge thicknesses.- Parameters:
top
- the topleft
- the leftbottom
- the bottomright
- the right
-
-
Method Details
-
draw
Draw this border. Override this method to do the actual work.- Parameters:
renderer
- the renderer to use in drawing.component
- the UIComponent we are drawing the border for.
-
getBorderHeight
Calculate the total height of a border for a given component. This is the current inner height of the component plus the top and bottom paddings and border thicknesses.- Parameters:
component
- the component to check against- Returns:
- the height
-
getBorderWidth
Calculate the total width of a border for a given component. This is the current inner width of the component plus the left and right paddings and border thicknesses.- Parameters:
component
- the component to check against- Returns:
- the width
-