public class Whiteboard extends Control
Control.TranslucentShape
Modifier and Type | Field and Description |
---|---|
int |
borderColor
Set this to some color so a frame can be drawn around the image
|
boolean |
thick
Set to true to draw a thick line.
|
boolean |
useAA
Deprecated.
This field is useless in OpenGL platforms
|
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 |
---|
Whiteboard()
Constructs a new whiteboard, setting the back color to white.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the WhiteBoard to the current background color.
|
Image |
getImage()
Returns the image where the drawing is taking place.
|
int |
getPenColor()
Returns the drawing pen color.
|
int |
getPreferredHeight()
Returns the preferred height: FILL
|
int |
getPreferredWidth()
Returns the preferred width: FILL
|
void |
onBoundsChanged(boolean screenChanged)
Now that we know our bounds, we can create the image that will hold the drawing
|
void |
onEvent(Event event)
Called to process key, pen, control and other posted events.
|
void |
onPaint(Graphics g)
Called to draw the control.
|
void |
setImage(Image image)
Sets the image for this WhiteBoard.
|
void |
setPenColor(int c)
Sets the drawing pen color
|
_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, 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, onColorsChanged, 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 int borderColor
@Deprecated public boolean useAA
public boolean thick
public Whiteboard()
public void onBoundsChanged(boolean screenChanged)
onBoundsChanged
in class Control
screenChanged
- If the bounds were changed due to a screen change (rotation, collapse)public Image getImage()
public int getPreferredWidth()
getPreferredWidth
in class Control
public int getPreferredHeight()
getPreferredHeight
in class Control
public void setImage(Image image) throws ImageException
ImageException
public void clear()
public void setPenColor(int c)
public int getPenColor()
public void onPaint(Graphics g)
Control