|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.ui.ControlBase
ewe.ui.Control
ewe.ui.ChoiceControl
ewe.ui.Menu
ewe.ui.BasicList
This is an intermediate class which is the superclass for mList and for SimpleList. You should not use this class or inherit from this class yourself.
Inherit from mList to create a List that gets its items from a Vector of stored Strings or MenuItems. Note that this will use a lot of memory for very large lists.
Inherit from SimpleList to create a List that does not get its items from a Vector of stored Strings or MenuItems. SimpleList uses specific method calls to get the items which are to be displayed and these methods should be overridden to provide the most efficient method of item storage and retrieval.
| Field Summary | |
protected boolean |
amScrolling
|
boolean |
multiSelect
This specifies whether the list allows multiple selections or not. |
static int |
OPTION_CURSOR_EXIT_DOWN
|
static int |
OPTION_CURSOR_EXIT_LEFT
|
static int |
OPTION_CURSOR_EXIT_RIGHT
|
static int |
OPTION_CURSOR_EXIT_UP
|
static int |
OPTION_SELECT_FIRST_ON_KEY_FOCUS
|
int |
options
|
boolean |
penSelectMode
If this is true then pen presses act as if CONTROL is always pressed. |
| Fields inherited from class ewe.ui.Menu |
autoSelectFirst, border3D, defaultBackground, defaultUseScrollBarSize, dontSearchForKeys, followPen, keepFrame, myFrame, parentMenu, popupController, pressedItem, use3DPopup, useScrollBarSize, wasSelected |
| Fields inherited from class ewe.ui.ChoiceControl |
blockColor, blockSelected, calculateWidth, clipBuffer, container, dimRect, displayRows, dontAutoScroll, dropDownButton, dummyItem, firstItem, INDENT_ITEM_FLAG, indentDropItems, innerRect, isAList, isSingleLine, itemHeight, items, newClip, notifyDataChangeOnSelect, noWrapAround, selectedIndex, shortenItems, spacing, useMenuItems, xOffset, xShift |
| 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.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 | |
BasicList()
|
|
BasicList(int rows,
int columns,
boolean multi)
|
|
| Method Summary | |
protected boolean |
allowNotOnMeSelection()
|
protected void |
calculateSizes()
Override this to calculate the preferred, minimum and maximum size of your control. |
int |
countListItems()
Count the number of list items. |
int |
countSelectedIndexes()
Returns the number of items that are currently selected. |
void |
dragged(DragContext dc)
This is called during the drag operation. |
abstract Object[] |
getListItems()
Get all the list items. |
ScrollablePanel |
getScrollablePanel()
|
abstract int |
getSelectedIndex(int selectedIndexIndex)
This returns one of the selected index. |
abstract int[] |
getSelectedIndexes()
Get a list of all the currently selected items as an array of indexes. |
void |
gotFocus(int how)
|
abstract boolean |
isSelected(int index)
Checks if an item is selected. |
void |
onKeyEvent(KeyEvent ev)
|
void |
penClicked(Point p)
Called if the Pen or Mouse button is quickly pressed and released. |
void |
penDoubleClicked(Point where)
Called if the Pen or Mouse button is double clicked on the Control. |
void |
penPressed(Point p)
Called when the Pen or Mouse button is pressed on the control. |
void |
penReleased(Point p)
Called when the Pen or Mouse button is released on the control. |
protected void |
pressedNewSelected(int oldSel)
|
protected void |
releasedOnNothing()
|
abstract void |
selectAll(boolean select)
This either selects all the items (select == true) or none of the items (select = false). |
boolean |
selectAndView(int row)
This selects the item at the specified row (index) exclusively and then ensures that it is visible. |
abstract void |
setListItems(Object[] items)
Set the list items. |
abstract void |
setSelectedIndexes(int[] indexes)
Set which indexes should be selected. |
| Methods inherited from class ewe.ui.Menu |
canGo, canScreenScroll, close, doActionKey, doDropMenu, doMenu, doScroll, exec, getActual, getCarrierFrame, getCarrierFrame, getCurrent, getItemRect, getMenuWidth, getTextRect, getVisible, needScrollBar, noMenu, onEvent, onPenEvent, postEvent, postEventNormally, selectNewItem, trySubMenu, updateItems, whichItem |
| Methods inherited from class ewe.ui.ChoiceControl |
addItem, addItems, addSection, centerSelected, changeItem, changeModifiers, checkOnlyOne, deleteItem, doPaint, doPaintData, findItem, findKeyed, getBlockColor, getDataRect, getDisplayRows, getDisplayString, getInt, getItemAt, getItemHeight, getItemToAdd, getMenuHeight, getMenuWidth, getScreenRows, getSelectedItem, getText, indexOf, insertItemAt, itemIsVisible, itemsSize, make, makeItemVisible, makeVisible, modifyItems, notifySelection, paintBox, paintItem, paintItem, refresh, removeAll, repaintItem, select, select, selectItem, selectItem, selectItems, selectNext, selectOrUnselect, selectPrev, setData, setInt, setText, trySelectItem |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode |
| Methods inherited from interface ewe.data.ISimpleList |
getListItem, itemIsVisible, makeItemVisible, updateItems |
| Methods inherited from interface ewe.data.IndexSelectable |
select |
| Methods inherited from interface ewe.ui.ScrollClient |
getServer, setServer |
| Field Detail |
protected boolean amScrolling
public boolean multiSelect
public boolean penSelectMode
public int options
public static final int OPTION_CURSOR_EXIT_UP
public static final int OPTION_CURSOR_EXIT_DOWN
public static final int OPTION_CURSOR_EXIT_LEFT
public static final int OPTION_CURSOR_EXIT_RIGHT
public static final int OPTION_SELECT_FIRST_ON_KEY_FOCUS
| Constructor Detail |
public BasicList()
public BasicList(int rows,
int columns,
boolean multi)
| Method Detail |
protected boolean allowNotOnMeSelection()
allowNotOnMeSelection in class Menupublic void dragged(DragContext dc)
Control
dragged in class Menuprotected void releasedOnNothing()
public void penPressed(Point p)
ControlWithin 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.
penPressed in class Menupublic void penReleased(Point p)
ControlWithin 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.
penReleased in class Menupublic void penClicked(Point p)
ControlWithin 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.
penClicked in class Controlp - The point on the Control where the pen was clicked.public void penDoubleClicked(Point where)
ControlWithin 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.
penDoubleClicked in class Controlwhere - The point on the Control where the pen was double-clicked.protected void pressedNewSelected(int oldSel)
pressedNewSelected in class Menupublic abstract void selectAll(boolean select)
public abstract void setSelectedIndexes(int[] indexes)
IndexSelectable
setSelectedIndexes in interface IndexSelectableindexes - an array of integer indexes to be set as the selection.public abstract int getSelectedIndex(int selectedIndexIndex)
IndexSelectable
getSelectedIndex in interface IndexSelectableselectedIndexIndex - which of the selected indexes to return.
public abstract int[] getSelectedIndexes()
IndexSelectable
getSelectedIndexes in interface IndexSelectablepublic abstract boolean isSelected(int index)
IndexSelectable
isSelected in interface IndexSelectableisSelected in class ChoiceControlpublic int countSelectedIndexes()
IndexSelectable
countSelectedIndexes in interface IndexSelectablepublic boolean selectAndView(int row)
row - The row to select exclusively.
public int countListItems()
ISimpleList
countListItems in interface ISimpleListpublic abstract Object[] getListItems()
ISimpleList
getListItems in interface ISimpleListpublic abstract void setListItems(Object[] items)
ISimpleList
setListItems in interface ISimpleListprotected void calculateSizes()
Control
calculateSizes in class ChoiceControlpublic ScrollablePanel getScrollablePanel()
public void gotFocus(int how)
gotFocus in class Controlpublic void onKeyEvent(KeyEvent ev)
onKeyEvent in class Menu
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||