public class UILabel extends UI2dComponent
| Modifier and Type | Field and Description | 
|---|---|
static float | 
DEFAULT_HEIGHT  | 
bottomMargin, height, leftMargin, rightMargin, textAlignHorizontal, textAlignVertical, textOffsetX, textOffsetY, topMargin, width, x, ychildren, hasFocus, mousePressContextMenu, visible| Constructor and Description | 
|---|
UILabel()  | 
UILabel(float x,
       float y,
       float w,
       float h)  | 
UILabel(float x,
       float y,
       float w,
       float h,
       String label)  | 
UILabel(float x,
       float y,
       float w,
       String label)  | 
UILabel(float w,
       float h,
       String label)  | 
UILabel(float w,
       String label)  | 
| Modifier and Type | Method and Description | 
|---|---|
String | 
getDescription()
Objects are encouraged to override this method providing a helpful String displayed to the user explaining
 the function of this UI component. 
 | 
protected void | 
onDraw(UI ui,
      PGraphics pg)
Subclasses should override this method to perform their drawing functions. 
 | 
UILabel | 
setBreakLines(boolean breakLines)
Sets the label to render text multi-line 
 | 
UILabel | 
setBreakLines(boolean breakLines,
             boolean autoHeight)
Sets the label to render text multi-line 
 | 
UILabel | 
setLabel(String label)  | 
UILabel | 
setPadding(int padding)
Sets padding on all 4 sides 
 | 
UILabel | 
setPadding(int topBottom,
          int leftRight)
Sets padding on top and sides, CSS style 
 | 
UILabel | 
setPadding(int topPadding,
          int rightPadding,
          int bottomPadding,
          int leftPadding)
Sets padding on all 4 sides 
 | 
addToContainer, addToContainer, breakTextToWidth, clipTextToWidth, contains, drawBackground, drawBorder, drawFocus, drawFocusCorners, drawFocusCorners, getBackgroundColor, getBorderColor, getBorderRounding, getBorderWeight, getContainer, getFocusColor, getFocusSize, getFont, getFontColor, getHeight, getNextSibling, getParent, getPrevSibling, getWidth, getX, getY, hasBackground, hasBorder, hasFont, hasFontColor, isMappable, onResize, redraw, removeFromContainer, setBackground, setBackgroundColor, setBorder, setBorderColor, setBorderRounding, setBorderWeight, setBottomMargin, setContainerIndex, setDescription, setFocusBackground, setFocusBackgroundColor, setFocusColor, setFocusCorners, setFont, setFontColor, setFontColor, setHeight, setLeftMargin, setMappable, setMargin, setMargin, setMargin, setPosition, setPosition, setPosition, setPosition, setRightMargin, setSize, setTextAlignment, setTextAlignment, setTextOffset, setTopMargin, setVisible, setWidth, setX, setYaddLoopTask, beginDraw, blur, bringToFront, consumeKeyEvent, consumeMousePress, consumeMouseWheelEvent, endDraw, focus, getFocusedChild, getLX, getUI, hasDirectFocus, hasFocus, isVisible, keyEventConsumed, loop, mousePressConsumed, onBlur, onFocus, onUIResize, removeLoopTask, toggleVisibleonKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragged, onMouseMoved, onMouseOut, onMouseOver, onMousePressed, onMouseReleased, onMouseWheelpublic static final float DEFAULT_HEIGHT
public UILabel()
public UILabel(float w,
               String label)
public UILabel(float w,
               float h,
               String label)
public UILabel(float x,
               float y,
               float w,
               String label)
public UILabel(float x,
               float y,
               float w,
               float h)
public UILabel(float x,
               float y,
               float w,
               float h,
               String label)
public UILabel setBreakLines(boolean breakLines)
breakLines - Whether to break linespublic UILabel setBreakLines(boolean breakLines, boolean autoHeight)
breakLines - Whether to break linesautoHeight - Whether to resize automatically based upon line heightpublic UILabel setPadding(int padding)
padding - Paddingpublic UILabel setPadding(int topBottom, int leftRight)
topBottom - Top bottom paddingleftRight - Left right paddingpublic UILabel setPadding(int topPadding, int rightPadding, int bottomPadding, int leftPadding)
topPadding - Top paddingrightPadding - Right paddingbottomPadding - Bottom paddingleftPadding - Left paddingprotected void onDraw(UI ui, PGraphics pg)
UIObjectpublic String getDescription()
UIObjectgetDescription in class UIObjectLX library by Mark C. Slee. © 2012-2020