ewe.ui
Class mLabel

java.lang.Object
  extended byewe.ui.ControlBase
      extended byewe.ui.Control
          extended byewe.ui.mLabel
All Implemented Interfaces:
CellConstants, ControlConstants, EventListener, ImageRefresher, TimerProc, UIConstants
Direct Known Subclasses:
DumbLabel, HyperlinkLabel, MessageArea

public class mLabel
extends Control


Field Summary
protected static String[] _lines
           
 int alignment
           
 int anchor
           
 Control control
          This is used to associate another Control with this label.
 FormattedTextSpecs format
           
 boolean isActive
           
protected  boolean isData
           
protected  int lineHeight
           
 int spacing
           
protected  int startLine
           
protected  int xPos
           
 
Fields inherited from class ewe.ui.Control
_debug, backGround, beforeRemoved, borderColor, borderStyle, borderWidth, children, columns, constraints, DoPaintMethod, dragging, dragResolution, dragTime, exitKeys, fieldTransfer, font, foreGround, haveNativePaint, height, holdDownPause, holdTick, hotKey, image, lastSelected, listeners, maxHeight, maxWidth, menuState, minHeight, minWidth, modifiers, MyClass, name, next, np, parent, penStatus, popupSound, popupSoundClip, preferredHeight, preferredWidth, prev, prompt, promptControl, rows, ss, standardBorder, standardEdge, startDragResolution, tags, tail, text, toolTip, width, x, y
 
Fields inherited from class ewe.ui.ControlBase
clipItems, clipObject, clipOwner, curPoint, currentPenEvent, debugControl, debugFlag, DidHoldDown, doubleBuffer, doubleClickTime, firstPress, globalDrawFlat, globalEditable, globalEnabled, globalPalmStyle, globalSmallControls, GotPenDown, PenIsOn, pressPoint, TAG_LAST_USER_DATA, TAG_USER_DATA, TAKE_FIRST_PRESS, unnamed, useNativeTextInput
 
Fields inherited from interface ewe.ui.UIConstants
BDR_DOTTED, BDR_INNER, BDR_NOBORDER, BDR_OUTER, BDR_OUTLINE, BDR_RAISEDINNER, BDR_RAISEDOUTER, BDR_SUNKENINNER, BDR_SUNKENOUTER, BF_BOTTOM, BF_BOTTOMLEFT, BF_BOTTOMRIGHT, BF_BUTTON, BF_DIAGONAL, BF_DIAGONAL_ENDBOTTOMLEFT, BF_DIAGONAL_ENDBOTTOMRIGHT, BF_DIAGONAL_ENDTOPLEFT, BF_DIAGONAL_ENDTOPRIGHT, BF_EXACT, BF_FLAT, BF_LEFT, BF_MIDDLE, BF_MONO, BF_PALM, BF_RECT, BF_RIGHT, BF_SOFT, BF_SQUARE, BF_TOP, BF_TOPLEFT, BF_TOPRIGHT, EDGE_BUMP, EDGE_ETCHED, EDGE_RAISED, EDGE_SUNKEN
 
Fields inherited from interface ewe.ui.CellConstants
BORDER, BOTTOM, CELLFLAG, CELLMASK, CENTER, CONTROLMASK, DONTCHANGE, DONTFILL, DONTSTRETCH, EAST, FILL, FIXEDSIZE, GROW, HCENTER, HCONTRACT, HEXPAND, HFILL, HGROW, HSHRINK, HSTRETCH, INITIALLY_CLOSED, INITIALLY_MINIMIZED, INITIALLY_PREFERRED_SIZE, INSETS, LEFT, MAXIMUMSIZE, MINIMUMSIZE, NORTH, NORTHEAST, NORTHWEST, PREFERREDSIZE, RECT, RIGHT, SHRINK, SOUTH, SOUTHEAST, SOUTHWEST, SPAN, STRETCH, TEXTSIZE, TOP, VCENTER, VCONTRACT, VEXPAND, VFILL, VGROW, VSHRINK, VSTRETCH, WEST
 
Fields inherited from interface ewe.ui.ControlConstants
All, AlwaysEnabled, AlwaysRecalculateSizes, ByDeferredMouse, ByDeferredPen, ByFrameChange, ByKeyboard, ByMouse, ByPen, ByRequest, CalculatedSizes, Disabled, DisablePopupMenu, DisplayOnly, Down, DrawFlat, Flag, ForceResize, HasData, Invisible, KeepImage, KeepSIP, Left, MakeMenuAtLeastAsWide, Maximize, Minimize, MouseSensitive, NoFocus, NotAnEditor, NotEditable, PaintDataOnly, PaintOutsideOnly, PenTransparent, PreferredSizeOnly, Right, SendUpKeyEvents, SendUpPenEvents, ShowSIP, ShrinkToNothing, SmallControl, SpecialBackground, TakeControlEvents, TakesKeyFocus, Transparent, Up, WantDrag, WantHoldDown
 
Fields inherited from interface ewe.fx.ImageRefresher
KEEP_VISIBLE
 
Constructor Summary
mLabel(int rows, int columns)
           
mLabel(String what)
           
mLabel(String what, boolean containsHotKey)
           
 
Method Summary
protected  void calculateSizes()
          Override this to calculate the preferred, minimum and maximum size of your control.
 void doAction(int how)
           
 void doPaint(Graphics g, Rect area)
           
protected  void doPaintData(Graphics g)
          Repaint the "data" part of the Control.
 String[] getLines()
           
protected  int getScreenRows()
           
 void onEvent(Event ev)
           
 void onPenEvent(PenEvent ev)
          Called to handle an incoming PenEvent.
 void penClicked(Point where)
          Called if the Pen or Mouse button is quickly pressed and released.
 void setText(String text)
           
 
Methods inherited from class ewe.ui.Control
acceptsData, activate, addListener, addTimer, amOnTopFrame, calculateTextSize, cancelCut, cancelHoldDown, canEdit, chainDataChange, change, checkClipboardOperations, checkExitKey, checkMenu, checkMenuKey, checkModifiers, checkPenTransparent, clearTag, clipboardToString, clipboardTransfer, closeMenu, contains, contains, createGraphics, dataAccepted, dataBeingRemoved, dataDraggedOff, dataDraggedOver, dataDraggedOver, dataDroppedOn, dataTransferCancelled, deactivate, defaultTo, doActionKey, doBackground, doBorder, doHotKey, doMenu, dontAcceptDrop, doPaintChildren, doPaintChildren, doPaintChildren, doPaintData, doShowMenu, dragged, exitEntry, fillBackground, formClosing, fromClipboard, fromField, fromField, getAllDescendants, getAllSubControls, getBackground, getChildren, getChildrenBackwards, getClipboardMenu, getClipObject, getControlBuffer, getControlBuffer, getDataRect, getDataToCopy, getDataToDragAndDrop, getDim, getDisplayText, getDragAndDropContext, getFont, getFontMetrics, getFontMetrics, getForeground, getFrame, getFrameOrContainer, getGraphics, getImage, getLastSelected, getLocation, getMaximumSize, getMenu, getMinimumSize, getModifiers, getNext, getNextKeyFocus, getParent, getPasswordCharacter, getPosInFrame, getPosInParent, getPreferredSize, getPrompt, getPromptText, getRect, getRect, getServer, getSize, getSizes, getSubControls, getTag, getText, getToolTip, getWindow, gotFocus, hasModifier, hasPopupFormAttached, hasTag, inheritModifiers, isChildOf, isModal, isOnMe, isSomeonesHotKey, lostFocus, make, makeFrameTopMost, makeHot, menuIsActive, modify, modifyAll, modifyAll, notifyAction, notifyDataChange, notifyDataChange, notNative_doPaintChildren, oldButWorksDoPaintChildren, oldPaintChildren, oldPostEvent, onControlEvent, onKeyEvent, onLabelPenEvent, onPaint, paintBackground, paintChildren, penDoubleClicked, penHeld, penPressed, penReleased, penRightReleased, popupBeep, popupMenuClosed, popupMenuEvent, popupMenuEvent, postEvent, recalculatePreferredSize, redisplay, refresh, removeListener, removeTimer, repaint, repaintDataNow, repaintNow, repaintNow, repaintNow, requestPaint, requestResizeTo, resetRect, resizeTo, restore, scrollAndRepaint, sendToListeners, set, setBorder, setCell, setClipObject, setControl, setCursor, setFixedSize, setFont, setHotKey, setHotKey, setLocation, setMaximumSize, setMenu, setMinimumSize, setPreferredSize, setPromptControl, setRect, setRect, setServer, setTag, setTags, setTextSize, setToolTip, show, shown, standardOnKeyEvent, startDragAndDrop, startDragAndDrop, startDragging, stopDragging, takeData, takeFocus, takeFromClipboard, takePromptControl, testDim, ticked, toClipboard, toField, toField, toString, toTextData, transferPenPress, transferPenPress, tryDragAndDrop, tryNext, tryStartMenu, updateData, willAcceptDrop, willShowFrame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode
 

Field Detail

format

public FormattedTextSpecs format

isActive

public boolean isActive

alignment

public int alignment

anchor

public int anchor

spacing

public int spacing

control

public Control control
This is used to associate another Control with this label. This is usually used when a label is acting as a prompt for another control (e.g. an mInput). If this label has a hot key associated with it, then pressing that hot key will give focus to the associated control and, if that control is a button, will cause it to fire.


isData

protected boolean isData

lineHeight

protected int lineHeight

_lines

protected static String[] _lines

startLine

protected int startLine

xPos

protected int xPos
Constructor Detail

mLabel

public mLabel(int rows,
              int columns)

mLabel

public mLabel(String what)

mLabel

public mLabel(String what,
              boolean containsHotKey)
Method Detail

getScreenRows

protected int getScreenRows()

calculateSizes

protected void calculateSizes()
Description copied from class: Control
Override this to calculate the preferred, minimum and maximum size of your control. This is only called once unless the modifier flag AlwaysRecalculateSizes is true. During the calculation you will set the variables preferredWidth, preferredHeight, etc. directly.

Overrides:
calculateSizes in class Control

getLines

public String[] getLines()

setText

public void setText(String text)
Overrides:
setText in class Control

doPaintData

protected void doPaintData(Graphics g)
Description copied from class: Control
Repaint the "data" part of the Control. This is only used for Controls with the HasData modifier. These are controls that distinguish between their data (e.g. contained text) and non-data (e.g. border) on-screen display.

Overrides:
doPaintData in class Control
Parameters:
g - The Graphics object to paint to.

doPaint

public void doPaint(Graphics g,
                    Rect area)
Overrides:
doPaint in class Control

onEvent

public void onEvent(Event ev)
Specified by:
onEvent in interface EventListener
Overrides:
onEvent in class Control

onPenEvent

public void onPenEvent(PenEvent ev)
Description copied from class: Control
Called to handle an incoming PenEvent. By default this dispatches the event to the various pen handling methods like penPressed()

Overrides:
onPenEvent in class Control
Parameters:
ev - The incoming PenEvent.

penClicked

public void penClicked(Point where)
Description copied from class: Control
Called if the Pen or Mouse button is quickly pressed and released. This is called by the onPenEvent(PenEvent ev) method.

Within this method you can use the Control.currentPenEvent value to find out more about the PenEvent that caused this - including any modifiers (e.g. SHIFT keys) or determine if the left or right mouse button was pressed.

By default this method simply calls the penReleased() method.

Overrides:
penClicked in class Control
Parameters:
where - The point on the Control where the pen was clicked.

doAction

public void doAction(int how)
Overrides:
doAction in class Control