ewe.ui
Class mTextArea

java.lang.Object
  extended byewe.ui.ControlBase
      extended byewe.ui.Control
          extended byewe.ui.EditControl
              extended byewe.ui.mTextArea
All Implemented Interfaces:
CellConstants, ControlConstants, EventListener, ImageRefresher, IScroll, ScrollClient, Selectable, TimerProc, UIConstants

public class mTextArea
extends EditControl
implements ScrollClient, Selectable

This is a Deprecated control - it allows simple multi-line text editing. However it does not allow word wrapping to the display width. Use mTextPad instead - this is more useful and complete.


Field Summary
protected  boolean amScrolling
          Deprecated.  
protected static ImageBuffer blockBuffer
          Deprecated.  
 int charWidth
          Deprecated.  
protected  ewe.ui.textAreaState curState
          Deprecated.  
protected static ImageBuffer itemBuffer
          Deprecated.  
protected  String[] lines
          Deprecated.  
 int minXScroll
          Deprecated. A percent figure.
 int minYScroll
          Deprecated. A percent figure.
 boolean selectAllOnFocus
          Deprecated. If this is true the entire text is selected when it gains focus.
 int spacing
          Deprecated.  
 boolean wrapToScreenSize
          Deprecated. This is not implemented yet.
 
Fields inherited from class ewe.ui.EditControl
CASE_LOWER, CASE_NORMAL, CASE_NUMBERS, CASE_SENTENCE, CASE_UPPER, colors, conditionalChar, conditionalCharIndex, doingLocalInput, doingNativeInput, FLAG_INPUT_ON_FOCUS, FLAG_KEEP_FOCUS_AFTER_INPUT, FLAG_PASSIVE, FLAG_USE_NATIVE, inFocus, inputFlags, inputMethod, justGotFocus, oldText, pageColor, startNativeOnPaint, textCase, validator
 
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, TAG_LAST_USER_DATA, TAG_USER_DATA, TAKE_FIRST_PRESS, unnamed, useNativeTextInput
 
Fields inherited from interface ewe.ui.IScroll
Higher, Horizontal, Lower, OPTION_INDICATOR_ONLY, PageHigher, PageLower, ScrollHigher, ScrollLower, TrackTo, Vertical
 
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
mTextArea(int rows, int columns)
          Deprecated.  
 
Method Summary
protected  void calculateSizes()
          Deprecated. Override this to calculate the preferred, minimum and maximum size of your control.
 boolean canGo(int orientation, int direction, int position)
          Deprecated.  
 void checkScrolls()
          Deprecated.  
 boolean checkSipCoverage()
          Deprecated.  
protected  void clearCursor()
          Deprecated.  
 void clearSelection()
          Deprecated.  
 boolean deleteSelection()
          Deprecated.  
 void doPaint(Graphics g, Rect area)
          Deprecated.  
protected  void doPaintData(Graphics g)
          Deprecated. Repaint the "data" part of the Control.
protected  void doPaintData(Graphics g, Rect area)
          Deprecated.  
 void doScroll(int which, int action, int value)
          Deprecated.  
 void dragged(DragContext dc)
          Deprecated. This is called during the drag operation.
protected  boolean fix()
          Deprecated.  
protected  void fixText()
          Deprecated.  
 int getActual(int which)
          Deprecated.  
protected  int getAvailableWidth()
          Deprecated.  
protected  boolean getCharRect(int ch, int ln, Rect dest)
          Deprecated.  
 int getCurrent(int which)
          Deprecated.  
protected  int getItemHeight()
          Deprecated.  
protected  String getLine()
          Deprecated.  
protected  String getLine(int index)
          Deprecated.  
 String[] getLines()
          Deprecated.  
 int getNumLines()
          Deprecated.  
protected  Point getPenChar(Point onControl)
          Deprecated.  
 int getScreenRows()
          Deprecated.  
 ScrollablePanel getScrollablePanel()
          Deprecated.  
 Object getSelection()
          Deprecated.  
 String getText()
          Deprecated.  
protected  int getTextWidth()
          Deprecated.  
 int getVisible(int which, int forSize)
          Deprecated.  
 void gotFocus(int how)
          Deprecated.  
 boolean hasSelection()
          Deprecated.  
protected  void insertLine(int index)
          Deprecated.  
 void lostFocus(int how)
          Deprecated.  
 boolean needScrollBar(int which, int forSize)
          Deprecated.  
protected  boolean newCursorPos(int ch, int ln, boolean takeSel)
          Deprecated.  
protected  void newText(String txt, int newCp, boolean redoData)
          Deprecated.  
 boolean noSelection()
          Deprecated.  
 void onKeyEvent(KeyEvent ev)
          Deprecated.  
protected  boolean paintConditionalChar(Graphics g, boolean highlight)
          Deprecated.  
 void paintCursor(Graphics gr)
          Deprecated.  
 void paintLastChar(Graphics g)
          Deprecated.  
 void paintLastChar(Graphics g, boolean eraseIt)
          Deprecated.  
 void paintLine(Graphics g, int index)
          Deprecated.  
 void penDoubleClicked(Point where)
          Deprecated. Called if the Pen or Mouse button is double clicked on the Control.
 void penHeld(Point p)
          Deprecated. Called when the Pen or Mouse button is held down on the control.
 void penPressed(Point where)
          Deprecated. Called when the Pen or Mouse button is pressed on the control.
 void penReleased(Point wher)
          Deprecated. Called when the Pen or Mouse button is released on the control.
 boolean replaceSelection(Object with)
          Deprecated.  
 void selectAll()
          Deprecated.  
 void setText(String what)
          Deprecated.  
protected  void splitLines(int width)
          Deprecated.  
 void ticked(int id, int elapsed)
          Deprecated.  
protected  void updateScrolls()
          Deprecated.  
 
Methods inherited from class ewe.ui.EditControl
acceptsData, checkInputMethod, dataBeingRemoved, dataTransferCancelled, fixCase, getBestPassiveFlags, getColors, hasChanged, keepConditionalChar, onControlEvent, setConditionalChar, setNativeInputFlags, startActiveInput, startLocalInput, startNativeInput, takeData, update, updateData
 
Methods inherited from class ewe.ui.Control
activate, addListener, addTimer, amOnTopFrame, calculateTextSize, cancelCut, cancelHoldDown, canEdit, chainDataChange, change, checkClipboardOperations, checkExitKey, checkMenu, checkMenuKey, checkModifiers, checkPenTransparent, clearTag, clipboardToString, clipboardTransfer, closeMenu, contains, contains, createGraphics, dataAccepted, dataDraggedOff, dataDraggedOver, dataDraggedOver, dataDroppedOn, deactivate, defaultTo, doAction, doActionKey, doBackground, doBorder, doHotKey, doMenu, dontAcceptDrop, doPaintChildren, doPaintChildren, doPaintChildren, doPaintData, doShowMenu, 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, getToolTip, getWindow, hasModifier, hasPopupFormAttached, hasTag, inheritModifiers, isChildOf, isModal, isOnMe, isSomeonesHotKey, make, makeFrameTopMost, makeHot, menuIsActive, modify, modifyAll, modifyAll, notifyAction, notifyDataChange, notifyDataChange, notNative_doPaintChildren, oldButWorksDoPaintChildren, oldPaintChildren, oldPostEvent, onEvent, onLabelPenEvent, onPaint, onPenEvent, paintBackground, paintChildren, penClicked, 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, takeFocus, takeFromClipboard, takePromptControl, testDim, toClipboard, toField, toField, toString, toTextData, transferPenPress, transferPenPress, tryDragAndDrop, tryNext, tryStartMenu, willAcceptDrop, willShowFrame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode
 
Methods inherited from interface ewe.ui.ScrollClient
getServer, setServer
 

Field Detail

lines

protected String[] lines
Deprecated. 

wrapToScreenSize

public boolean wrapToScreenSize
Deprecated. 
This is not implemented yet.


spacing

public int spacing
Deprecated. 

minXScroll

public int minXScroll
Deprecated. 
A percent figure. Defaults to 30%


minYScroll

public int minYScroll
Deprecated. 
A percent figure. Defaults to 80%


selectAllOnFocus

public boolean selectAllOnFocus
Deprecated. 
If this is true the entire text is selected when it gains focus.


charWidth

public int charWidth
Deprecated. 

itemBuffer

protected static ImageBuffer itemBuffer
Deprecated. 

blockBuffer

protected static ImageBuffer blockBuffer
Deprecated. 

amScrolling

protected boolean amScrolling
Deprecated. 

curState

protected ewe.ui.textAreaState curState
Deprecated. 
Constructor Detail

mTextArea

public mTextArea(int rows,
                 int columns)
Deprecated. 
Method Detail

getItemHeight

protected int getItemHeight()
Deprecated. 

getTextWidth

protected int getTextWidth()
Deprecated. 

calculateSizes

protected void calculateSizes()
Deprecated. 
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

getAvailableWidth

protected int getAvailableWidth()
Deprecated. 

getNumLines

public int getNumLines()
Deprecated. 

splitLines

protected void splitLines(int width)
Deprecated. 

insertLine

protected void insertLine(int index)
Deprecated. 

getCharRect

protected boolean getCharRect(int ch,
                              int ln,
                              Rect dest)
Deprecated. 

setText

public void setText(String what)
Deprecated. 
Overrides:
setText in class Control

getText

public String getText()
Deprecated. 
Overrides:
getText in class Control

getLines

public String[] getLines()
Deprecated. 

fixText

protected void fixText()
Deprecated. 

getScreenRows

public int getScreenRows()
Deprecated. 

paintLastChar

public void paintLastChar(Graphics g)
Deprecated. 

paintLastChar

public void paintLastChar(Graphics g,
                          boolean eraseIt)
Deprecated. 

deleteSelection

public boolean deleteSelection()
Deprecated. 
Specified by:
deleteSelection in interface Selectable

paintLine

public void paintLine(Graphics g,
                      int index)
Deprecated. 

doPaint

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

paintCursor

public void paintCursor(Graphics gr)
Deprecated. 

doPaintData

protected void doPaintData(Graphics g)
Deprecated. 
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.

doPaintData

protected void doPaintData(Graphics g,
                           Rect area)
Deprecated. 

getScrollablePanel

public ScrollablePanel getScrollablePanel()
Deprecated. 

doScroll

public void doScroll(int which,
                     int action,
                     int value)
Deprecated. 
Specified by:
doScroll in interface ScrollClient

getActual

public int getActual(int which)
Deprecated. 
Specified by:
getActual in interface ScrollClient

getVisible

public int getVisible(int which,
                      int forSize)
Deprecated. 
Specified by:
getVisible in interface ScrollClient

getCurrent

public int getCurrent(int which)
Deprecated. 
Specified by:
getCurrent in interface ScrollClient

needScrollBar

public boolean needScrollBar(int which,
                             int forSize)
Deprecated. 
Specified by:
needScrollBar in interface ScrollClient

canGo

public boolean canGo(int orientation,
                     int direction,
                     int position)
Deprecated. 
Specified by:
canGo in interface ScrollClient

checkScrolls

public void checkScrolls()
Deprecated. 

updateScrolls

protected void updateScrolls()
Deprecated. 

ticked

public void ticked(int id,
                   int elapsed)
Deprecated. 
Specified by:
ticked in interface TimerProc
Overrides:
ticked in class Control

selectAll

public void selectAll()
Deprecated. 
Specified by:
selectAll in class EditControl

checkSipCoverage

public boolean checkSipCoverage()
Deprecated. 
Overrides:
checkSipCoverage in class EditControl

gotFocus

public void gotFocus(int how)
Deprecated. 
Overrides:
gotFocus in class Control

lostFocus

public void lostFocus(int how)
Deprecated. 
Overrides:
lostFocus in class Control

fix

protected boolean fix()
Deprecated. 

newCursorPos

protected boolean newCursorPos(int ch,
                               int ln,
                               boolean takeSel)
Deprecated. 

newText

protected void newText(String txt,
                       int newCp,
                       boolean redoData)
Deprecated. 

getPenChar

protected Point getPenChar(Point onControl)
Deprecated. 

clearCursor

protected void clearCursor()
Deprecated. 

getLine

protected String getLine(int index)
Deprecated. 

getLine

protected String getLine()
Deprecated. 

noSelection

public boolean noSelection()
Deprecated. 
Specified by:
noSelection in interface Selectable

getSelection

public Object getSelection()
Deprecated. 
Specified by:
getSelection in interface Selectable

replaceSelection

public boolean replaceSelection(Object with)
Deprecated. 
Specified by:
replaceSelection in interface Selectable

hasSelection

public boolean hasSelection()
Deprecated. 
Specified by:
hasSelection in interface Selectable

clearSelection

public void clearSelection()
Deprecated. 

penPressed

public void penPressed(Point where)
Deprecated. 
Description copied from class: Control
Called when the Pen or Mouse button is pressed on the control. 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.

Overrides:
penPressed in class Control
Parameters:
where - The point on the Control where the pen was pressed.

penDoubleClicked

public void penDoubleClicked(Point where)
Deprecated. 
Description copied from class: Control
Called if the Pen or Mouse button is double clicked on the Control. 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 penClicked() method.

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

penReleased

public void penReleased(Point wher)
Deprecated. 
Description copied from class: Control
Called when the Pen or Mouse button is released on the control. 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.

Overrides:
penReleased in class Control
Parameters:
wher - The point on the Control where the pen was released.

penHeld

public void penHeld(Point p)
Deprecated. 
Description copied from class: Control
Called when the Pen or Mouse button is held down on the control. This will only get called if the WantHoldDown modifier has been set for this control. 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.

This method is usually used to display a context sensitive menu. In fact the default code for it is:

                if (!menuIsActive()) doMenu(p);
        

Overrides:
penHeld in class Control
Parameters:
p - The point on the Control where the pen was held.

dragged

public void dragged(DragContext dc)
Deprecated. 
Description copied from class: Control
This is called during the drag operation. It is also called by default by the startDragging() method if you do not override it.

Overrides:
dragged in class Control
Parameters:
dc - The DragContext for the dragging operation.

onKeyEvent

public void onKeyEvent(KeyEvent ev)
Deprecated. 
Overrides:
onKeyEvent in class Control

paintConditionalChar

protected boolean paintConditionalChar(Graphics g,
                                       boolean highlight)
Deprecated. 
Specified by:
paintConditionalChar in class EditControl