public class LabelGuiImpl extends Label<GuiOutputManager>
Widget.ZOrderClass
Modifier and Type | Field and Description |
---|---|
private GuiDriver |
gd
Screen driver
|
private GuiFontResolver |
gf
Font resolver
|
config, disableEmptyMode, emptyMode, offset, rightAligned, sideWidget, underlined
location, mousePtr, nativeInsets, physicalLocation
Constructor and Description |
---|
LabelGuiImpl(WidgetId id,
Label<GuiOutputManager> labelInstance,
int frameId)
Create a copy of the label.
|
LabelGuiImpl(WidgetId id,
java.lang.String text,
int frameId)
Constructs label with given text.
|
Modifier and Type | Method and Description |
---|---|
void |
draw()
Draws text.
|
double |
height()
Compute the label's height.
|
void |
initialize(WidgetId id,
LabelConfig cfg)
Replacement API for the logic which should exist in the widget's c'tor, but the logic
can't be executed as it depends on the widget being registered into the official registry.
|
protected int |
nativeHeight()
Retrieve the widget's height in native units.
|
protected int |
nativeWidth()
Retrieve the widget's width in native units.
|
NativeDimension |
physicalDimension()
Get widget physical dimension, expressed in units native to UI type.
|
double |
width()
Compute the label's width.
|
_setVisible, afterConfigUpdate, config, drawCaret, focusTraversable, getLegacyWidget, getSideWidget, isDelimiter, isDirectManipulable, isFocusable, isForcedSize, isRightAligned, isUnderlined, linkTo, name, postprocessConfig, postprocessConfig, setDelimiter, setEmptyModeOff, setEmptyModeOn, setForcedSize, setHeight, setName, setOffset, setRightAligned, setSideWidget, setSize, setUnderlined, setWidth, updateSize
minimumSize, requestFocus
add, add, add, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, currentFocus, currentFocus, cycleFocus, defaultFocus, destroy, detach, dimension, doLayout, endSizeChange, findMouseSource, firstFocus, focus, focusWorker, get, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getWidgetsList, hasFocusable, insets, lastFocus, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, prepareWidgets, prevFocus, processKeyEvent, remove, repaint, replace, setFocus, setFocusInt, setIgnoreFocus, setInsets, setLayout, setSize, startSizeChange, unrealize, updateSizeWorker, widgets
_setHidden, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, createMouseHoverAction, deactivateDirectManipulation, debug, disable, displayPhysicalLocation, enable, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextWidth, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, ignoreAction, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isHeader, isRealized, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, location, manageSystemActions, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, moveToBottom, moveToTop, navigable, parent, parent, parentOrSelf, physicalBounds, physicalLocation, 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, defaultMousePtr, displayPhysicalLocation, enclosingFrame, enforceDefaultMousePtr, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getSelectedText, getState, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, isDisplayed, isEnabled, isHeader, isRealized, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, location, moveToBottom, moveToTop, navigable, parent, parent, parentOrSelf, physicalBounds, physicalLocation, 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 GuiFontResolver gf
private GuiDriver gd
public LabelGuiImpl(WidgetId id, Label<GuiOutputManager> labelInstance, int frameId)
id
- The widget's ID.labelInstance
- Label to copy parameters from.frameId
- The ID of the frame to which the label belongs, or -1 if unknown at the time of the
creation.public LabelGuiImpl(WidgetId id, java.lang.String text, int frameId)
id
- The widget's ID.text
- Initial text.frameId
- The ID of the frame to which the label belongs, or -1 if unknown at the time of the
creation.protected int nativeWidth()
FrameGuiImpl.getLabelWidth(java.lang.String, com.goldencode.p2j.ui.client.LabeledWidget<com.goldencode.p2j.ui.client.gui.driver.GuiOutputManager>)
, fix this.nativeWidth
in class Label<GuiOutputManager>
protected int nativeHeight()
FrameGuiImpl.getLabelHeight(java.lang.String, com.goldencode.p2j.ui.client.LabeledWidget<com.goldencode.p2j.ui.client.gui.driver.GuiOutputManager>, boolean)
, fix this.nativeHeight
in class Label<GuiOutputManager>
public void initialize(WidgetId id, LabelConfig cfg)
This API is called after the widget is created and added to the registry.
initialize
in interface WidgetWithConfig<LabelConfig>
initialize
in class Label<GuiOutputManager>
id
- The widget's ID.cfg
- The config used to initialize this widget.public double width()
width
in interface Widget<GuiOutputManager>
width
in class AbstractContainer<GuiOutputManager>
public double height()
height
in interface Widget<GuiOutputManager>
height
in class AbstractContainer<GuiOutputManager>
public void draw()
draw
in interface Widget<GuiOutputManager>
draw
in class Label<GuiOutputManager>
public NativeDimension physicalDimension()
physicalDimension
in interface Widget<GuiOutputManager>
physicalDimension
in class AbstractWidget<GuiOutputManager>