public class BorderedPanelGuiImpl extends BorderedPanel<GuiOutputManager>
Widget.ZOrderClass
Modifier and Type | Field and Description |
---|---|
private java.lang.Runnable |
customDraw
Custom draw runnable.
|
private GuiColorResolver |
gc
Color resolver.
|
private GuiDriver<?,?> |
gd
Screen driver
|
private WidgetId |
id
ID is needed in case panel is registered as resizable for example.
|
private boolean |
is3DBorder
Additional 3D styled border flag.
|
private java.lang.Runnable |
optionalDraw
Optional draw runnable.
|
border
location, mousePtr, nativeInsets, physicalLocation
Constructor and Description |
---|
BorderedPanelGuiImpl()
Creates new instance with no border and no layout manager.
|
BorderedPanelGuiImpl(Border<GuiOutputManager> border)
Creates new instance with the specified border.
|
BorderedPanelGuiImpl(LayoutManager<GuiOutputManager> mgr,
Border<GuiOutputManager> border)
Creates new instance with the specified layout manager and border.
|
Modifier and Type | Method and Description |
---|---|
void |
draw()
Draw widget.
|
WidgetId |
getId()
Widget ID.
|
private void |
init()
Instance initializer.
|
boolean |
is3DBorder()
Checks if this widget need to draw additional 3D style border elements.
|
boolean |
isRMBEntrySupported()
Check if this widget gains ENTRY event when right/middle mouse button is clicked.
|
void |
set3DBorder(boolean is3DBorder)
Sets the new value for 3D style flag.
|
void |
setColorResolver(GuiColorResolver resolver)
Sets a color resolver.
|
void |
setCustomDraw(java.lang.Runnable customDraw)
Sets custom draw routine.
|
void |
setId(WidgetId id)
Sets widget ID for this widget.
|
void |
setOptionalDraw(java.lang.Runnable optionalDraw)
Sets optional draw routine.
|
border, insets, isTransparent, setBorder, setTransparent
add, add, add, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, currentFocus, currentFocus, cycleFocus, defaultFocus, destroy, detach, dimension, doLayout, endSizeChange, findMouseSource, firstFocus, focus, focusTraversable, focusWorker, get, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getWidgetsList, hasFocusable, height, lastFocus, minimumSize, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, prepareWidgets, prevFocus, processKeyEvent, remove, repaint, replace, requestFocus, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setSize, setSize, setWidth, startSizeChange, unrealize, updateSizeWorker, widgets, width
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, config, createMouseHoverAction, deactivateDirectManipulation, debug, disable, displayPhysicalLocation, drawCaret, enable, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getLoadedMousePointer, getMenuMouse, getMouseActions, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextWidth, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, ignoreAction, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, isHeader, isRealized, isTabStop, isThreeD, isTotallyObscured, isVisible, location, manageSystemActions, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, parent, parent, parentOrSelf, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, refresh, registerWidgetStateListener, repaint, requestSync, resetBitmap, resizeTo, resolveFont, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, show, supportsCustomMousePointer, sync, topLevelWindow, toString, translate, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addFocusListener, addKeyListener, ancestor, ancestorId, bounds, clearWidget, config, defaultMousePtr, displayPhysicalLocation, drawCaret, enclosingFrame, enforceDefaultMousePtr, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getSelectedText, getState, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, isDirectManipulable, isDisplayed, isEnabled, isFocusable, isHeader, isRealized, isTabStop, isThreeD, isTotallyObscured, isVisible, location, moveToBottom, moveToTop, name, navigable, parent, parent, parentOrSelf, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, repaint, requestSync, resizeTo, screen, screenLocation, screenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, show, supportsCustomMousePointer, topLevelWindow, window
private GuiDriver<?,?> gd
private GuiColorResolver gc
private java.lang.Runnable customDraw
private java.lang.Runnable optionalDraw
private boolean is3DBorder
private WidgetId id
public BorderedPanelGuiImpl()
public BorderedPanelGuiImpl(Border<GuiOutputManager> border)
border
- reference to the border implementation,
may be null
public BorderedPanelGuiImpl(LayoutManager<GuiOutputManager> mgr, Border<GuiOutputManager> border)
mgr
- reference to the layout manager, may be null
border
- reference to the border implementation,
may be null
public void setColorResolver(GuiColorResolver resolver)
GuiColorResolver.bgColor
which is used as the background color for this panel. If no resolver
is given, the color SysColor.COLOR_WINDOW
will be used by default.resolver
- color revolver, may be null
public void setCustomDraw(java.lang.Runnable customDraw)
draw()
method forwards the call to the
parent's draw method. When custom draw routine is registered,
it is executed instead of the parent.customDraw
- custom draw routine, see abovepublic void setOptionalDraw(java.lang.Runnable optionalDraw)
optionalDraw
- optional draw routine, see abovepublic boolean isRMBEntrySupported()
isRMBEntrySupported
in interface Widget<GuiOutputManager>
isRMBEntrySupported
in class AbstractWidget<GuiOutputManager>
true
if this widget gains ENTRY event
when right/middle mouse button is clicked.public boolean is3DBorder()
true
if additional painting is required, false
otherwise.public void set3DBorder(boolean is3DBorder)
is3DBorder
- true
if additional painting is required, false
otherwise.public void draw()
draw
in interface Widget<GuiOutputManager>
draw
in class AbstractContainer<GuiOutputManager>
public void setId(WidgetId id)
The setter allows to selectively assign an ID to borders that do need it. For example a mouse-sensitive border around main window requires an ID to be able to handle mouse events.
id
- A widget id.public WidgetId getId()
getId
in interface Widget<GuiOutputManager>
getId
in class AbstractWidget<GuiOutputManager>
private void init()