public class GridContainer extends Container
add(gc = new GridContainer(GridContainer.HORIZONTAL_ORIENTATION),LEFT,TOP,FILL,FILL);
gc.setBackColor(Color.WHITE);
Flick f = gc.getFlick();
f.shortestFlick = 1000;
f.longestFlick = 6000;
gc.setPageSize(linhas,colunas);
gc.setRowsPerPage(linhasPorPagina);
Celula []cels = new Celula[TOTAL_ITEMS];
for (int i = 0; i < cels.length; i++)
cels[i] = new Celula(i);
gc.setCells(cels);
| Modifier and Type | Class and Description |
|---|---|
static class |
GridContainer.Cell
A Grid's cell.
|
Control.TranslucentShape| Modifier and Type | Field and Description |
|---|---|
int |
buttonsHeight
A percentage that defines the heihgt of the arrow buttons.
|
static int |
HORIZONTAL_ORIENTATION
Defines a horizontal orientation scroll.
|
NumericPagePosition |
pagepos
The container that has the page number and first/last arrows.
|
ScrollContainer |
sc
The ScrollContainer used in this control.
|
static int |
VERTICAL_ORIENTATION
Defines a vertical orientation scroll.
|
alwaysEraseBackground, BACKGROUND_CYLINDRIC_SHADED, BACKGROUND_SHADED, BACKGROUND_SHADED_INV, BACKGROUND_SOLID, backgroundStyle, BORDER_LOWERED, BORDER_NONE, BORDER_RAISED, BORDER_ROUNDED, BORDER_SIMPLE, BORDER_TOP, borderColor, borderRadius, children, controlFound, finishedStart, ignoreOnAddAgain, ignoreOnRemove, insets, lastH, lastScreenWidth, lastW, lastX, lastY, numChildren, started, tabOrder, tail, TRANSITION_TIMEAFTER, alphaValue, appId, appObj, asContainer, asWindow, backColor, BEFORE, BOTTOM, BOTTOM_OF, BRIGHTER_BACKGROUND, callListenersOnAllTargets, CENTER, CENTER_OF, clearValueInt, clearValueStr, DARKER_BACKGROUND, DP, effect, enableUpdateScreen, esce, eventsEnabled, FILL, fillColor, FIT, floating, fm, fmH, focusHandler, focusLess, focusOnPenDown, focusTraversable, font, FONTSIZE, foreColor, height, ignoreInsets, isHighlighting, isTablet, KEEP, keepDisabled, keepEnabled, LEFT, next, nextTabControl, npParts, offscreen, offscreen0, onEventFirst, parent, PARENTSIZE, PARENTSIZEMAX, PARENTSIZEMIN, PREFERRED, prev, RANGE, repositionAllowed, RIGHT, RIGHT_OF, SAME, SCREENSIZE, SCREENSIZEMAX, SCREENSIZEMIN, setFont, setH, setRel, setW, setX, SETX_NOT_SET, setY, tempW, textShadowColor, TOP, translucentShape, transparentBackground, uiAdjustmentsBasedOnFontHeightIsSupported, uiAndroid, UICONST, uiFlat, uiHolo, uiMaterial, uiVista, visible, width, WILL_RESIZE, x, y| Constructor and Description |
|---|
GridContainer(int orientation)
Constructs a GridContainer with the given orientation
|
| Modifier and Type | Method and Description |
|---|---|
Flick |
getFlick()
Returns the flick attached to the ScrollContainer.
|
void |
initUI()
Called to initialize the User Interface of this container.
|
void |
onColorsChanged(boolean colorsChanged)
Called after a setEnabled, setForeColor and setBackColor and when a control has
been added to a Container.
|
void |
onEvent(Event e)
Called to process key, pen, control and other posted events.
|
void |
onFontChanged()
Called after a setFont
|
void |
setCells(GridContainer.Cell[] cells)
Sets the cells of this GridContainer.
|
void |
setPageSize(int cols,
int rows)
Sets the page size in columns and rows.
|
void |
setRowsPerPage(int rpp)
Sets the rows per page.
|
add, add, add, add, add, broadcastEvent, clear, fillBackground, findChild, findNearestChild, findNextFocusControl, getBorderRadius, getBorderStyle, getChildren, getChildrenCount, getClientRect, getClientRect, getFirstChild, getFocusableControls, getInsets, incLastX, incLastY, isPressed, moveFocusToNextControl, moveFocusToNextEditable, onAddAgain, onPaint, onRemove, onSwapFinished, paintChildren, remove, removeAll, resize, resizeHeight, resizeWidth, setBorderRadius, setBorderStyle, setEnabled, setFocusTraversable, setHighlighting, setInsets, setPressColor, setPressed, swapToTopmostWindow_onEvent, addEnabledStateListener, addFocusListener, addFontChangeHandler, addGridListener, addHandler, addHighlightListener, addKeyListener, addListContainerListener, addMouseListener, addMultiTouchListener, addPenListener, addPressListener, addPushNotificationListener, addSizeChangeHandler, addTimer, addTimer, addTimerListener, addValueChangeHandler, addWindowListener, bringToFront, changeHighlighted, contains, drawTranslucentBackground, getAbsoluteRect, getBackColor, getDoEffect, getEffectH, getEffectW, getEffectX, getEffectY, getEventListeners, getFont, getForeColor, getGap, getGraphics, getHeight, getNext, getParent, getParentWindow, getPos, getPreferredHeight, getPreferredWidth, getPressedEvent, getPrev, getRect, getSize, getTextShadowColor, getWidth, getX, getX2, getY, getY2, hadParentScrolled, handleGeographicalFocusChangeKeys, hasFocus, internalSetEnabled, intXYWH, isActionEvent, isChildOf, isDisplayed, isEnabled, isFloating, isInsideOrNear, isObscured, isTopMost, isVisible, isVisibleAndInside, onBoundsChanged, onWindowPaintFinished, post, postEvent, postPressedEvent, releaseScreenShot, removeEnabledStateListener, removeFocusListener, removeGridListener, removeHandler, removeHighlightListener, removeKeyListener, removeListContainerListener, removeMouseListener, removeMultiTouchListener, removePenListener, removePressListener, removePushNotificationListener, removeTimer, removeTimerListener, removeWindowListener, repaint, repaintNow, reposition, reposition, repositionChildren, requestFocus, resetSetPositions, resetStyle, safeRepaintNow, safeUpdateScreen, sendToBack, setBackColor, setBackForeColors, setDoEffect, setFloating, setFocusLess, setFont, setForeColor, setNinePatch, setNinePatch, setRect, setRect, setRect, setRect, setSet, setTextShadowColor, setTranslucent, setVisible, showTip, takeInitialScreenShot, takeScreenShot, translateFromOrigin, uiStyleChanged, updateScreen, updateTemporary, willOpenKeyboardpublic static final int HORIZONTAL_ORIENTATION
public static final int VERTICAL_ORIENTATION
public ScrollContainer sc
public NumericPagePosition pagepos
public int buttonsHeight
public GridContainer(int orientation)
HORIZONTAL_ORIENTATION,
VERTICAL_ORIENTATIONpublic Flick getFlick()
public void onFontChanged()
ControlonFontChanged in class Controlpublic void initUI()
Containerpublic void setRowsPerPage(int rpp)
public void setPageSize(int cols,
int rows)
public void setCells(GridContainer.Cell[] cells)
public void onEvent(Event e)
Controlpublic void onColorsChanged(boolean colorsChanged)
ControlonColorsChanged in class Container