public class Spinner extends Control implements TimerListener, UpdateListener
spinner.update()
or the spinner will not be
updated. Without this, it will work in Java but not on devices.Control.TranslucentShape
Modifier and Type | Field and Description |
---|---|
static int |
ANDROID
Used in the type field
|
static int |
IPHONE
Used in the type field
|
static int |
spinnerType
Defines the type of spinner for all instances.
|
static int |
SYNC
Used in the type field
|
AFTER, 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 |
---|
Spinner()
Creates a spinner with the defined spinnerType.
|
Spinner(Image anim)
Creates a spinner from an animated GIF.
|
Spinner(int type)
Creates a spinner of the given type.
|
Modifier and Type | Method and Description |
---|---|
int |
getTimestep()
Gets the timestep used to change images
|
boolean |
isRunning()
Returns if the spin is running.
|
void |
onBoundsChanged(boolean screenChanged)
Called after a setRect.
|
void |
onColorsChanged(boolean changed)
Called after a setEnabled, setForeColor and setBackColor and when a control has
been added to a Container.
|
void |
onPaint(Graphics g)
Called to draw the control.
|
void |
setImage(Image anim)
Changes the gif image of this Spinner
|
void |
setTimestep(int timestep)
Sets the timestep used to change images.
|
void |
setType(int t)
Changes the Spinner to one of the predefined types.
|
void |
start()
Starts the spinning thread.
|
void |
stop()
Stops the spinning thread.
|
void |
timerTriggered(TimerEvent e)
A TRIGGERED event was dispatched.
|
void |
update()
|
void |
updateListenerTriggered(int elapsedMilliseconds)
Called regularly by the system.
|
_onEvent, addEnabledStateListener, addFocusListener, addFontChangeHandler, addGridListener, addHandler, addHighlightListener, addKeyListener, addListContainerListener, addMouseListener, addMultiTouchListener, addPenListener, addPressListener, addPushNotificationListener, addSizeChangeHandler, addTimer, addTimer, addTimerListener, addValueChangeHandler, addWindowListener, bringToFront, changeHighlighted, clear, 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, onEvent, onFontChanged, 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, setEnabled, setFloating, setFocusLess, setFont, setForeColor, setNinePatch, setNinePatch, setRect, setRect, setRect, setRect, setSet, setTextShadowColor, setTranslucent, setVisible, showTip, takeInitialScreenShot, takeScreenShot, translateFromOrigin, uiStyleChanged, updateScreen, updateTemporary, willOpenKeyboard
public static final int IPHONE
public static final int ANDROID
public static final int SYNC
public static int spinnerType
public Spinner()
public Spinner(int type)
public Spinner(Image anim)
public void setType(int t)
public void setImage(Image anim)
public void onBoundsChanged(boolean screenChanged)
Control
onBoundsChanged
in class Control
screenChanged
- If the bounds were changed due to a screen change (rotation, collapse)public void onColorsChanged(boolean changed)
Control
onColorsChanged
in class Control
public void onPaint(Graphics g)
Control
public void start()
public void stop()
public boolean isRunning()
public void timerTriggered(TimerEvent e)
TimerListener
timerTriggered
in interface TimerListener
TimerEvent
@Deprecated public void update()
public int getTimestep()
public void setTimestep(int timestep)
timestep
- time in millisecondspublic void updateListenerTriggered(int elapsedMilliseconds)
UpdateListener
updateListenerTriggered
in interface UpdateListener
elapsedMilliseconds
- number of milliseconds since the last UpdateListenerTriggered call