public class ArrowButton extends Button
Control.TranslucentShape
Modifier and Type | Field and Description |
---|---|
int |
arrowColor
The arrow's color.
|
protected byte |
direction
Graphics.ARROW_UP , Graphics.ARROW_DOWN , Graphics.ARROW_LEFT , or Graphics.ARROW_RIGHT . |
protected int |
dkk
The newly assigned arrow size.
|
protected int |
kk
The current arrow size.
|
protected int |
prefWH
prefWH the desired arrow width/height.
|
protected int |
xx
The x position.
|
protected int |
yy
The y position.
|
armed, AUTO_DELAY, autoRepeat, border, BORDER_3D, BORDER_3D_HORIZONTAL_GRADIENT, BORDER_3D_VERTICAL_GRADIENT, BORDER_GRAY_IMAGE, BORDER_NONE, BORDER_OUTLINED, BORDER_ROUND, BORDER_SIMPLE, borderColor, borderColor3DG, borderWidth3DG, bottomColor3DG, CENTRALIZE, commonGap, cornerRadius3DG, currentFrame, disabledColor, drawBordersIfTransparentBackground, fColor, fillWhenPressedOnTransparentBackground, flatBackground, fourColors, hightlightColor, imageHeightFactor, img, img0, imgDis, INITIAL_DELAY, isSticky, ix0, iy0, paddingBottom, paddingLeft, paddingRight, paddingTop, pressColor, pressedImage, relativeToText, roundBorderFactor, shiftOnPress, text, topColor3DG, tx0, ty0, underlinedText
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 |
---|
ArrowButton(byte direction,
int prefWH,
int arrowColor)
Constructs an
ArrowButton . |
Modifier and Type | Method and Description |
---|---|
int |
getPreferredHeight()
Returns the preferred height of this control.
|
int |
getPreferredWidth()
Returns the preferred width of this control.
|
protected void |
onBoundsChanged(boolean screenChanged)
Called after a
setRect() . |
void |
onPaint(Graphics g)
Called by the system to draw the
ArrowButton . |
void |
setArrowSize(int kk)
Sets the arrow size.
|
void |
setBorder(byte border)
Sets the style of the border.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
getImage, getText, isPressed, onColorsChanged, onEvent, onFontChanged, paintBackground, paintImage, paintText, press, setImage, setNinePatch, setNinePatch, setPressedColor, setText, simulatePress
_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, 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, 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, setRect, setRect, setRect, setRect, setSet, setTextShadowColor, setTranslucent, setVisible, showTip, takeInitialScreenShot, takeScreenShot, translateFromOrigin, uiStyleChanged, updateScreen, updateTemporary, willOpenKeyboard
protected byte direction
Graphics.ARROW_UP
, Graphics.ARROW_DOWN
, Graphics.ARROW_LEFT
, or Graphics.ARROW_RIGHT
.protected int prefWH
protected int xx
protected int yy
protected int kk
protected int dkk
public int arrowColor
public ArrowButton(byte direction, int prefWH, int arrowColor)
ArrowButton
.direction
- Graphics.ARROW_UP
, Graphics.ARROW_DOWN
, Graphics.ARROW_LEFT
, or
Graphics.ARROW_RIGHT
.prefWH
- The desired arrow width/height. The effective arrow's size will be computed based in the current width/height.arrowColor
- The arrow color. Can be changed by setting the arrowColor
field.public int getPreferredWidth()
getPreferredWidth
in class Button
public int getPreferredHeight()
getPreferredHeight
in class Button
public void setBorder(byte border)
setBorder
in class Button
border
- One out of Button.BORDER_NONE
, Button.BORDER_SIMPLE
, Button.BORDER_3D
,
Button.BORDER_3D_HORIZONTAL_GRADIENT
, Button.BORDER_3D_VERTICAL_GRADIENT
, or Button.BORDER_GRAY_IMAGE
.Button.BORDER_NONE
,
Button.BORDER_SIMPLE
,
Button.BORDER_3D
,
Button.BORDER_3D_HORIZONTAL_GRADIENT
,
Button.BORDER_3D_VERTICAL_GRADIENT
,
Button.BORDER_GRAY_IMAGE
public void setArrowSize(int kk)
kk
- The new size.protected void onBoundsChanged(boolean screenChanged)
setRect()
.onBoundsChanged
in class Button
screenChanged
- If the bounds was changed due to a screen change (rotation, collapse).public void onPaint(Graphics g)
ArrowButton
.public java.lang.String toString()
toString
in class java.lang.Object