|
||||||||||
| 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
ewe.ui.SimpleList
This is the base class for creating a List control that represents a list of data that is not necessarily stored in a Vector. This should be used when the list data is large and it would be memory inefficient to keep the entire list in memory.
You create a SimpleList by implementing specific key methods, which are used to determine the number of items, and what String should be used to represent a particular item.
This List avoids ever having to traverse the entire list of data for any operation, and so should work properly for any size list.
| Field Summary | |
protected static Point |
buff
|
protected RangeList |
selectedItems
|
| Fields inherited from class ewe.ui.BasicList |
amScrolling, multiSelect, OPTION_CURSOR_EXIT_DOWN, OPTION_CURSOR_EXIT_LEFT, OPTION_CURSOR_EXIT_RIGHT, OPTION_CURSOR_EXIT_UP, OPTION_SELECT_FIRST_ON_KEY_FOCUS, options, penSelectMode |
| 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 | |
SimpleList()
|
|
SimpleList(int rows,
int columns,
boolean multi)
|
|
| Method Summary | |
void |
changeItem(int index,
Object newText)
This repaints the item at the particular index. |
int |
countSelectedIndexes()
Returns the number of items that are currently selected. |
abstract String |
getDisplayItem(int idx)
Return the String used to represent the item at a particular index on screen. |
MenuItem |
getItemAt(int idx)
|
abstract int |
getItemCount()
Get the number of items in the list. |
Object |
getListItem(int idx)
Get the Object at the list index. |
Object[] |
getListItems()
Get all the list items. |
abstract Object |
getObjectAt(int idx)
Return an Object representing the item at a particular index. |
int |
getSelectedIndex(int selectedIndexIndex)
This returns one of the selected index. |
int[] |
getSelectedIndexes()
Get a list of all the currently selected items as an array of indexes. |
Object |
getSelectedItem()
|
boolean |
isSelected(int index)
Checks if an item is selected. |
int |
itemsSize()
This returns getItemCount(). |
void |
listChanged()
|
void |
selectAll(boolean select)
This either selects all the items (select == true) or none of the items (select = false). |
void |
selectItem(int index,
boolean selected)
Select or deselect a particular item. |
void |
selectItems(int start,
int end,
boolean selected)
Select or deselect a range of items. |
void |
setListItems(Object[] items)
Set the list items. |
void |
setSelectedIndexes(int[] all)
Set which indexes should be selected. |
| Methods inherited from class ewe.ui.BasicList |
allowNotOnMeSelection, calculateSizes, countListItems, dragged, getScrollablePanel, gotFocus, onKeyEvent, penClicked, penDoubleClicked, penPressed, penReleased, pressedNewSelected, releasedOnNothing, selectAndView |
| 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, changeModifiers, checkOnlyOne, deleteItem, doPaint, doPaintData, findItem, findKeyed, getBlockColor, getDataRect, getDisplayRows, getDisplayString, getInt, getItemHeight, getItemToAdd, getMenuHeight, getMenuWidth, getScreenRows, getText, indexOf, insertItemAt, itemIsVisible, make, makeItemVisible, makeVisible, modifyItems, notifySelection, paintBox, paintItem, paintItem, refresh, removeAll, repaintItem, select, select, selectItem, 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 |
itemIsVisible, makeItemVisible, updateItems |
| Methods inherited from interface ewe.data.IndexSelectable |
select |
| Methods inherited from interface ewe.ui.ScrollClient |
getServer, setServer |
| Field Detail |
protected RangeList selectedItems
protected static Point buff
| Constructor Detail |
public SimpleList()
public SimpleList(int rows,
int columns,
boolean multi)
| Method Detail |
public abstract String getDisplayItem(int idx)
idx - The index of the item to display.
public Object getListItem(int idx)
ISimpleList
public abstract Object getObjectAt(int idx)
idx - The index of the item to retrieve.
public abstract int getItemCount()
public int itemsSize()
itemsSize in class ChoiceControlpublic MenuItem getItemAt(int idx)
getItemAt in class ChoiceControlpublic Object getSelectedItem()
getSelectedItem in class ChoiceControlpublic void listChanged()
public void selectItems(int start,
int end,
boolean selected)
selectItems in class ChoiceControlstart - The first item in the range (inclusive).end - The last item in the range (inclusive).selected - true to select the items, false to remve the items.
public void selectItem(int index,
boolean selected)
selectItem in class ChoiceControlindex - The item to select or deselect.selected - true to select the item, false to deselect it.public int countSelectedIndexes()
IndexSelectable
countSelectedIndexes in interface IndexSelectablecountSelectedIndexes in class BasicListpublic int[] getSelectedIndexes()
IndexSelectable
getSelectedIndexes in interface IndexSelectablegetSelectedIndexes in class BasicListpublic boolean isSelected(int index)
IndexSelectable
isSelected in interface IndexSelectableisSelected in class BasicListpublic void selectAll(boolean select)
BasicList
selectAll in class BasicListpublic void setSelectedIndexes(int[] all)
IndexSelectable
setSelectedIndexes in interface IndexSelectablesetSelectedIndexes in class BasicListpublic int getSelectedIndex(int selectedIndexIndex)
IndexSelectable
getSelectedIndex in interface IndexSelectablegetSelectedIndex in class BasicList
public void changeItem(int index,
Object newText)
changeItem in class ChoiceControlpublic Object[] getListItems()
ISimpleList
getListItems in interface ISimpleListgetListItems in class BasicListpublic void setListItems(Object[] items)
ISimpleList
setListItems in interface ISimpleListsetListItems in class BasicList
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||