public class LineBorderGuiImpl extends java.lang.Object implements Border<GuiOutputManager>
This border implementation will fill the whole border area with the background color
SysColor.COLOR_WINDOW
or the background color supplied in the
config instance passed to the constructor.
Modifier and Type | Field and Description |
---|---|
private CoordinatesConversion |
c
Coordinate conversion reference.
|
private GuiColorResolver |
gc
Color resolver.
|
private GuiDriver<?,?> |
gd
Cached driver.
|
private Insets |
insets
Insets.
|
private AbstractWidget |
legacyWidget
The legacy widget of this line border.
|
private NativeInsets |
ninsets
Native insets.
|
Constructor and Description |
---|
LineBorderGuiImpl()
Default constructor.
|
LineBorderGuiImpl(Insets insets,
GuiColorResolver resolver,
AbstractWidget legacyWidget)
Creates a new instance with a specific insets and color resolver.
|
Modifier and Type | Method and Description |
---|---|
void |
drawBorder(Widget<GuiOutputManager> widget,
Dimension size)
Draw border.
|
AbstractWidget |
getLegacyWidget()
Obtain the legacy widget for this line border.
|
NativeInsets |
getNativeInsets()
Get native insets introduced by the border.
|
Insets |
insets()
Get insets introduced by the border.
|
private Insets insets
private NativeInsets ninsets
private GuiDriver<?,?> gd
private GuiColorResolver gc
private CoordinatesConversion c
private AbstractWidget legacyWidget
public LineBorderGuiImpl()
public LineBorderGuiImpl(Insets insets, GuiColorResolver resolver, AbstractWidget legacyWidget)
The resolver is used to resolve colors for the border line and for the border background,
in particular GuiColorResolver.fgColor
and GuiColorResolver.bgColor
are used. If null
is given then default foreground/background colors will be used,
SysColor.COLOR_WINDOW
and SysColor.COLOR_WINDOWTEXT
.
insets
- The parameter defines the border thickness. May be null
.resolver
- Color resolver instance, see above. May be null
.legacyWidget
- The legacy widget of this border. On this flag depends how it will be painted.public Insets insets()
insets
in interface Border<GuiOutputManager>
public NativeInsets getNativeInsets()
public void drawBorder(Widget<GuiOutputManager> widget, Dimension size)
drawBorder
in interface Border<GuiOutputManager>
widget
- Base widget.size
- Border dimensions.public AbstractWidget getLegacyWidget()