public abstract class StatusLine<O extends OutputManager<?>> extends AbstractWidget<O> implements WidgetWithConfig<BaseConfig>
Widget.ZOrderClass
Modifier and Type | Field and Description |
---|---|
protected Color |
color
Label color
|
protected BaseConfig |
config
The widget config.
|
protected boolean |
isNull
Track virtual null text.
|
protected java.lang.String |
labelText
Label text.
|
protected int |
maxLen
Maximal length of the text
|
private double |
width
Label width.
|
insets, location, LOG, mousePtr, nativeInsets, physicalLocation
Constructor and Description |
---|
StatusLine(WidgetId id)
Construct an empty message line.
|
Modifier and Type | Method and Description |
---|---|
void |
afterConfigUpdate(BaseConfig beforeUpdate)
The method is called after the configuration associated with
the implementor changes.
|
abstract void |
attach(Window<O> window)
Attach this widget to the specified window.
|
BaseConfig |
config()
Get the widget config.
|
Dimension |
dimension()
Get widget dimension.
|
abstract void |
draw()
Widget drawing method.
|
boolean |
focusTraversable()
This component will not receive focus when Tab or Shift-Tab is pressed.
|
Color |
getColor()
Get current color used for displaying.
|
java.lang.String |
getLabelText()
Get label text.
|
int |
getMaxLen()
Return maximal length of the text.
|
java.lang.String |
getText()
Get label text.
|
double |
height()
Get widget height.
|
void |
initialize(WidgetId id,
BaseConfig 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.
|
Dimension |
minimumSize()
Get widget minimum size.
|
void |
processKeyEvent(KeyInput ke)
This component ignores key events.
|
void |
requestFocus()
This component never gets the keyboard input focus.
|
void |
setColor(Color color)
Set color specification.
|
void |
setLength(double width)
Set component occupied length.
|
void |
setMaxLen(int maxLen)
Set maximal label length.
|
void |
setText(java.lang.String text)
Set label text.
|
double |
width()
Get widget width.
|
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, createMouseHoverAction, deactivateDirectManipulation, debug, destroy, disable, displayPhysicalLocation, drawCaret, enable, enclosingFrame, findMouseSource, 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, insets, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, isHeader, isRealized, isRMBEntrySupported, 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, 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, unrealize, updateSizeWorker, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
defaultMousePtr, enforceDefaultMousePtr, getLegacyWidget, isDirectManipulable
protected Color color
protected int maxLen
protected boolean isNull
protected java.lang.String labelText
private double width
protected BaseConfig config
public StatusLine(WidgetId id)
id
- The widget's ID.public void initialize(WidgetId id, BaseConfig cfg)
This API is called after the widget is created and added to the registry.
initialize
in interface WidgetWithConfig<BaseConfig>
id
- The widget's ID.cfg
- The config used to initialize this widget.public BaseConfig config()
config
in interface Widget<O extends OutputManager<?>>
config
in interface ConfigOwner<BaseConfig>
config
in class AbstractWidget<O extends OutputManager<?>>
public void afterConfigUpdate(BaseConfig beforeUpdate)
afterConfigUpdate
in interface ConfigOwner<BaseConfig>
beforeUpdate
- public abstract void attach(Window<O> window)
window
- The parent window.public abstract void draw()
draw
in interface Widget<O extends OutputManager<?>>
draw
in class AbstractWidget<O extends OutputManager<?>>
public void setColor(Color color)
color
- Color specification.public int getMaxLen()
public void setMaxLen(int maxLen)
maxLen
- The new maximal length.public Color getColor()
public void setText(java.lang.String text)
text
- Label text.public java.lang.String getText()
public Dimension minimumSize()
AbstractWidget
minimumSize
in interface Widget<O extends OutputManager<?>>
minimumSize
in class AbstractWidget<O extends OutputManager<?>>
Widget.minimumSize()
public Dimension dimension()
AbstractWidget
dimension
in interface Widget<O extends OutputManager<?>>
dimension
in class AbstractWidget<O extends OutputManager<?>>
Widget.dimension()
public double width()
AbstractWidget
width
in interface Widget<O extends OutputManager<?>>
width
in class AbstractWidget<O extends OutputManager<?>>
Widget.width()
public double height()
AbstractWidget
height
in interface Widget<O extends OutputManager<?>>
height
in class AbstractWidget<O extends OutputManager<?>>
Widget.height()
public boolean focusTraversable()
focusTraversable
in interface Widget<O extends OutputManager<?>>
focusTraversable
in class AbstractWidget<O extends OutputManager<?>>
false
public void processKeyEvent(KeyInput ke)
processKeyEvent
in interface Widget<O extends OutputManager<?>>
processKeyEvent
in class AbstractWidget<O extends OutputManager<?>>
ke
- public void requestFocus()
requestFocus
in interface Widget<O extends OutputManager<?>>
requestFocus
in class AbstractWidget<O extends OutputManager<?>>
public void setLength(double width)
width
- public java.lang.String getLabelText()