public class ShadedButton extends Button
Control.TranslucentShape
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, 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 |
---|
ShadedButton(java.lang.String text,
Image back0,
int fcolor,
int bcolor) |
Modifier and Type | Method and Description |
---|---|
int |
getPreferredHeight()
Returns the preffered height of this control.
|
int |
getPreferredWidth()
Returns the preffered width of this control.
|
void |
onBoundsChanged(boolean changed)
Called after a setRect.
|
void |
onPaint(Graphics g)
Called by the system to draw the button.
|
getImage, getText, isPressed, onColorsChanged, onEvent, onFontChanged, paintBackground, paintImage, paintText, press, setBorder, 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
public ShadedButton(java.lang.String text, Image back0, int fcolor, int bcolor)
public void onBoundsChanged(boolean changed)
Control
onBoundsChanged
in class Button
changed
- If the bounds were changed due to a screen change (rotation, collapse)public int getPreferredWidth()
Button
getPreferredWidth
in class Button
public int getPreferredHeight()
Button
getPreferredHeight
in class Button