public class SpanMultiButton

  1. Object
  2. Component
  3. Container
  4. SpanMultiButton

ImplementsActionSource, Animation, Editable, IconHolder, Iterable<Component>, SelectableIconHolder, StyleListener, TextHolder

A powerful button like component that allows multiple rows/and an icon to be added every row/icon can have its own UIID. Internally the multi-button is a container with a lead component. Up to 4 rows are supported.

It’s like MultiButton, but it breaks lines.

Form hi = new Form("Test SpanMultiButton", BoxLayout.y());

Image icon = FontImage.createMaterial(FontImage.MATERIAL_WARNING, "Button", 3.0f);
Image emblem = FontImage.createMaterial(FontImage.MATERIAL_ARROW_FORWARD, "Button", 3.0f);

SpanMultiButton twoLinesNoIcon = new SpanMultiButton("SpanMultiButton");
twoLinesNoIcon.setTextLine2("Line 2 long - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
SpanMultiButton oneLineIconEmblem = new SpanMultiButton("Icon + Emblem");
oneLineIconEmblem.setIcon(icon);
oneLineIconEmblem.setEmblem(emblem);
SpanMultiButton twoLinesIconEmblem = new SpanMultiButton("Icon + Emblem");
twoLinesIconEmblem.setIcon(icon);
twoLinesIconEmblem.setEmblem(emblem);
twoLinesIconEmblem.setTextLine2("Line 2 long - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");

SpanMultiButton twoLinesIconEmblemHorizontal = new SpanMultiButton("Icon + Emblem");
twoLinesIconEmblemHorizontal.setIcon(icon);
twoLinesIconEmblemHorizontal.setEmblem(emblem);
twoLinesIconEmblemHorizontal.setTextLine2("Line 2 Horizontal");
twoLinesIconEmblemHorizontal.setHorizontalLayout(true);

SpanMultiButton twoLinesIconCheckBox = new SpanMultiButton("CheckBox");
twoLinesIconCheckBox.setIcon(icon);
twoLinesIconCheckBox.setCheckBox(true);
twoLinesIconCheckBox.setTextLine2("Line 2 long - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");

SpanMultiButton fourLinesIcon = new SpanMultiButton("With Icon");
fourLinesIcon.setIcon(icon);
fourLinesIcon.setTextLine2("Line 2 - Lorem ipsum dolor sit amet, consectetur adipiscing elit");
fourLinesIcon.setTextLine3("Line 3 - sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
fourLinesIcon.setTextLine4("Line 4 - Excepteur sint occaecat cupidatat non proident");

oneLineIconEmblem.addActionListener(l -> ToastBar.showInfoMessage("Hello 1"));
twoLinesNoIcon.addActionListener(l -> ToastBar.showInfoMessage("Hello 2"));
twoLinesIconEmblem.addActionListener(l -> ToastBar.showInfoMessage("Hello 3"));
twoLinesIconEmblemHorizontal.addActionListener(l -> ToastBar.showInfoMessage("Hello 4"));
twoLinesIconCheckBox.addActionListener(l -> ToastBar.showInfoMessage("Hello 5"));
fourLinesIcon.addActionListener(l -> ToastBar.showInfoMessage("Hello 6"));

hi.add(oneLineIconEmblem).
add(twoLinesNoIcon).
add(twoLinesIconEmblem).
add(twoLinesIconEmblemHorizontal).
add(twoLinesIconCheckBox).
add(fourLinesIcon);
hi.show();

Constructors

public SpanMultiButton(String line1)Initializes a multibutton with the first line of text
public SpanMultiButton()Default constructor allowing the designer to create an instance of this class

Methods

public boolean isLinesTogetherMode()Indicates if the lines are grouped together on this button
public void setLinesTogetherMode(boolean l)Changes the layout so the lines of the button are grouped together
public Label getIconComponent()Allows us to gain direct access to the icon component so we can set it directly without going via the other methods, this is especially useful for classes such as the ImageDownloadService which can then update the icon seamlessly.
public void addActionListener(ActionListener al)Adds an action listener
public void removeActionListener(ActionListener al)Removes an action listener
public void addLongPressListener(ActionListener l)Adds a listener to the pointer event
public void removeLongPressListener(ActionListener l)Removes the listener from the pointer event
public void addPointerPressedListener(ActionListener l)Adds a listener to the pointer event
public void removePointerPressedListener(ActionListener l)Removes the listener from the pointer event
public void addPointerReleasedListener(ActionListener l)Adds a listener to the pointer event
public void removePointerReleasedListener(ActionListener l)Removes the listener from the pointer event
public Command getCommand()Returns the command for the emblem
public void setCommand(Command c)Sets the command for the component, it doesn’t affe
public boolean isCheckBox()Returns true if this is a checkbox button
public void setCheckBox(boolean b)Turns the multi-button into a checkbox multi-button
public boolean isRadioButton()Returns true if this is a radio button
public void setRadioButton(boolean b)Turns the multi-button into a radio multi-button
public boolean isSelected()Returns true if the checkbox/radio button is selected
public void setSelected(boolean b)Toggles the selected state for the radio button/check box modes
public boolean isHorizontalLayout()Indicates whether the first two labels are be side by side
public void setHorizontalLayout(boolean b)Indicates the first two labels should be side by side
public boolean isInvertFirstTwoEntries()Inverts the order of the first two entries so the second line appears first.
public void setInvertFirstTwoEntries(boolean b)Inverts the order of the first two entries so the second line appears first.
public String getTextLine1()Returns the content of the row
public void setTextLine1(String t)Sets the content of the row
public String getNameLine1()Returns the name of the row
public void setNameLine1(String t)Sets the name of the row (important for use in generic renderers)
public String getUIIDLine1()Returns the UIID of the row
public void setUIIDLine1(String t)Sets the UIID of the row
public String getTextLine2()Returns the content of the row
public void setTextLine2(String t)Sets the content of the row
public String getNameLine2()Returns the name of the row
public void setNameLine2(String t)Sets the name of the row (important for use in generic renderers
public String getUIIDLine2()Returns the UIID of the row
public void setUIIDLine2(String t)Sets the UIID of the row
public void removeTextLine1()Removes the content of the row
public void removeTextLine2()Removes the content of the row
public void removeTextLine3()Removes the content of the row
public void removeTextLine4()Removes the content of the row
public String getTextLine3()Returns the content of the row
public void setTextLine3(String t)Sets the content of the row
public String getNameLine3()Returns the name of the row
public void setNameLine3(String t)Sets the name of the row (important for use in generic renderers
public String getUIIDLine3()Returns the UIID of the row
public void setUIIDLine3(String t)Sets the UIID of the row
public String getTextLine4()Returns the content of the row
public void setTextLine4(String t)Sets the content of the row
public String getNameLine4()Returns the name of the row
public void setNameLine4(String t)Sets the name of the row (important for use in generic renderers
public String getUIIDLine4()Returns the UIID of the row
public void setUIIDLine4(String t)Sets the UIID of the row
public Image getIcon()Returns the icon image
public void setIcon(Image i)Sets the icon
public Image getEmblem()Returns the emblem image
public void setEmblem(Image i)Sets the emblem
public String getIconPosition()Returns the icon position based on border layout constraints
public void setIconPosition(String t)Sets the icon position based on border layout constraints
public String getEmblemPosition()Returns the emblem position based on border layout constraints
public void setEmblemPosition(String t)Sets the emblem position based on border layout constraints
public String getIconName()Returns the name of the icon
public void setIconName(String t)Sets the name of the icon (important for use in generic renderers
public String getIconUIID()Returns the UIID of the Icon
public void setIconUIID(String t)Sets the UIID of the icon
public String getEmblemName()Returns the name of the emblem
public void setEmblemName(String t)Sets the name of the emblem (important for use in generic renderers
public String getEmblemUIID()Returns the UIID of the Emblem
public void setEmblemUIID(String t)Sets the UIID of the emblem
public String[] getPropertyNames()A component may expose mutable property names for a UI designer to manipulate, this API is designed for usage internally by the GUI builder code
public Class[] getPropertyTypes()Matches the property names method (see that method for further details).
public Object getPropertyValue(String name)Returns the current value of the property name, this method is used by the GUI builder
public String getText()Sets the line 1 text The text of the component
public void setText(String text)Returns the line 1 text New text for the component
public String setPropertyValue(String name, Object value)Sets a new value to the given property, returns an error message if failed and null if successful.
public String getGroup()Indicates the group for the radio button
public void setGroup(String group)Indicates the group for the radio button
public void setGroup(ButtonGroup bg)Sets the button group for a radio button mode multibutton
public String getMaskName()Set the mask name for the icon
public void setMaskName(String maskName)The mask name for the icon
public boolean isShouldLocalize()Indicates if text should be localized when set to the component, by default all text is localized so this allows disabling automatic localization for a specific component.
public void setShouldLocalize(boolean shouldLocalize)Indicates if text should be localized when set to the component, by default all text is localized so this allows disabling automatic localization for a specific component.
public int getGap()Returns the gap in pixels between the icon/text to the Label boundaries
public void setGap(int gap)Set the gap in pixels between the icon/text to the Label boundaries
public int getTextPosition()Returns The position of the text relative to the icon
public void setTextPosition(int textPosition)Sets the position of the text relative to the icon if exists
public Component getIconStyleComponent()Gets the component that should be used for styling material the material icon.
public void setMaterialIcon(char c, float size)This method is shorthand for char, float)
public void setFontIcon(Font font, char c, float size)This method is shorthand for com.codename1.ui.Font, char, float)
public Image getRolloverIcon()Indicates the icon that is displayed on the button when the button is in rolled over state
public void setRolloverIcon(Image arg0)Indicates the icon that is displayed on the button when the button is in rolled over state
public Image getPressedIcon()Indicates the icon that is displayed on the button when the button is in pressed state
public void setPressedIcon(Image arg0)Indicates the icon that is displayed on the button when the button is in pressed state
public Image getDisabledIcon()Indicates the icon that is displayed on the button when the button is in the disabled state
public void setDisabledIcon(Image arg0)Indicates the icon that is displayed on the button when the button is in the disabled state
public Image getRolloverPressedIcon()Indicates the icon that is displayed on the button when the button is in pressed state and is selected.
public void setRolloverPressedIcon(Image icn)Indicates the icon that is displayed on the button when the button is in pressed state and is selected.
public Image getIconFromState()Returns the icon for the button based on its current state

Inherited fields

Inherited methods

From Container

encloseIn, encloseIn, initLaf, getUIManager, setUIManager, isSurface, add, addAll, add, add, add, add, add, getLeadComponent, setLeadComponent, getLeadParent, keyPressed, keyReleased, getLayout, setLayout, invalidate, setShouldLayout, setShouldCalcPreferredSize, getLayoutWidth, getLayoutHeight, applyRTL, constrainWidthWhenScrollable, constrainHeightWhenScrollable, addComponent, addComponent, addComponent, addComponent, replaceAndWait, replaceAndWait, replace, replaceAndWait, replace, createReplaceTransition, isEnabled, setEnabled, removeComponent, cancelRepaints, flushReplace, removeAll, revalidateWithAnimationSafety, revalidate, revalidateLater, forceRevalidate, clearClientProperties, paint, paintGlass, layoutContainer, isSafeArea, setSafeArea, isSafeAreaRoot, getSafeAreaRoot, setSafeAreaRoot, getComponentCount, getComponentAt, getComponentIndex, contains, scrollComponentToVisible, getClosestComponentTo, getResponderAt, getComponentAt, findDropTargetAt, pointerPressed, calcPreferredSize, paramString, refreshTheme, isScrollableX, setScrollableX, isScrollableY, setScrollableY, getSideGap, getBottomGap, setScrollable, setCellRenderer, getScrollIncrement, setScrollIncrement, findFirstFocusable, dragInitiated, fireClicked, isSelectableInteraction, getGridPosY, paintComponentBackground, getGridPosX, animateHierarchyAndWait, createAnimateHierarchy, animateHierarchy, animateHierarchyFadeAndWait, createAnimateHierarchyFade, animateHierarchyFade, animateLayoutFadeAndWait, createAnimateLayoutFadeAndWait, animateLayoutFade, createAnimateLayoutFade, animateLayoutAndWait, animateLayout, updateTabIndices, createAnimateLayout, drop, createAnimateMotion, morph, morphAndWait, animateUnlayout, animateUnlayoutAndWait, createAnimateUnlayout, getChildrenAsList, iterator, iterator

From Component

setSameSize, isSetCursorSupported, parsePreferredSize, getDefaultDragTransparency, setDefaultDragTransparency, getEditingDelegate, setEditingDelegate, getCursor, setCursor, showNativeOverlay, hideNativeOverlay, updateNativeOverlay, getNativeOverlay, getAllStyles, getSameWidth, setSameWidth, getSameHeight, setSameHeight, getX, setX, getOuterX, getInnerX, getY, setY, getOuterY, getInnerY, isVisible, setVisible, getClientProperty, stripMarginAndPadding, putClientProperty, getDirtyRegion, setDirtyRegion, isOpaque, setOpaque, getWidth, setWidth, getOuterWidth, getInnerWidth, getHeight, setHeight, getOuterHeight, getInnerHeight, isDragRegion, getDragRegionStatus, getBaseline, getBaselineResizeBehavior, getPreferredSizeStr, setPreferredSizeStr, getPreferredSize, setPreferredSize, getScrollDimension, calcScrollSize, setScrollSize, getPreferredW, setPreferredW, getPreferredH, setPreferredH, getOuterPreferredH, getInnerPreferredH, getOuterPreferredW, getInnerPreferredW, setSize, getUIID, setUIID, setUIIDFinal, setUIID, getInlineAllStyles, setInlineAllStyles, getInlineSelectedStyles, setInlineSelectedStyles, getInlineUnselectedStyles, setInlineUnselectedStyles, getInlineDisabledStyles, setInlineDisabledStyles, getInlinePressedStyles, setInlinePressedStyles, remove, getParent, getOwner, setOwner, isOwnedBy, containsOrOwns, addFocusListener, removeFocusListener, addScrollListener, removeScrollListener, getSelectCommandText, setSelectCommandText, getLabelForComponent, setLabelForComponent, focusGained, focusLost, paintBackgrounds, paintShadows, getAbsoluteX, getAbsoluteY, isInClippingRegion, paintIntersectingComponentsAbove, paintScrollbars, paintScrollbarX, getScrollOpacity, getSelectedRect, paintScrollbarY, paintComponent, paintComponent, getBorder, getScrollable, paintBackground, isScrollable, getScrollX, setScrollX, getScrollY, setScrollY, onScrollX, onScrollY, getDraggedx, getDraggedy, contains, visibleBoundsContains, hasFixedPreferredSize, getBounds, getBounds, getVisibleBounds, getVisibleBounds, isFocusable, setFocusable, onSetFocusable, resetFocusable, getTabIndex, setTabIndex, getPreferredTabIndex, setPreferredTabIndex, isTraversable, setTraversable, handlesInput, setHandlesInput, consumesRawTextInput, hasFocus, setFocus, getComponentForm, getTopLevelContainer, repaint, repaint, longKeyPress, keyRepeated, registerForAnimation, deregisterFromAnimation, getAnimationManager, getScrollAnimationSpeed, setScrollAnimationSpeed, isBlockLead, setBlockLead, isIgnorePointerEvents, setIgnorePointerEvents, isRippleEffect, setRippleEffect, getInlineStylesTheme, setInlineStylesTheme, shouldRenderComponentSelection, isHideInLandscape, setHideInLandscape, createStyleAnimation, isSmoothScrolling, setSmoothScrolling, pointerHover, stopScrollMomentum, pointerHoverReleased, pointerHoverPressed, pinch, pinchReleased, pinch, rotation, isPinchBlocksDragAndDrop, setPinchBlocksDragAndDrop, pointerDragged, getDragImage, getDragTransparency, setDragTransparency, toImage, drawDraggedImage, draggingOver, dragEnter, dragExit, addPullToRefresh, setPullToRefresh, respondsToPointerEvents, pointerDragged, isStickyDrag, pointerPressed, isDragAndDropOperation, pointerReleased, longPointerPress, pointerReleased, setVerticalScrollBounds, setHorizontalScrollBounds, isVScrollThumbGrabbed, isHScrollThumbGrabbed, isVScrollThumbHover, isHScrollThumbHover, isTensileDragEnabled, setTensileDragEnabled, getTextSelectionSupport, addDropListener, removeDropListener, addDragOverListener, removeDragOverListener, isNativeDragSource, setNativeDragSource, getNativeDragOperation, setNativeDragOperation, createNativeDragOperation, isNativeDropTarget, setNativeDropTarget, getAcceptedDropMimeTypes, setAcceptedDropMimeTypes, getAcceptedDropActions, setAcceptedDropActions, canAcceptNativeDrop, nativeDragEnter, nativeDragOver, nativeDragExit, nativeDrop, addNativeDropListener, removeNativeDropListener, addNativeDragOverListener, removeNativeDragOverListener, dragFinished, addDragFinishedListener, addStateChangeListener, removeStateChangeListener, addContextMenuListener, removeContextMenuListener, addMouseWheelListener, removeMouseWheelListener, addStylusListener, removeStylusListener, mouseWheel, paintRippleOverlay, removeDragFinishedListener, addPointerDraggedListener, removePointerDraggedListener, getDragSpeed, getStyle, getPressedStyle, setPressedStyle, initUnselectedStyle, initPressedStyle, initDisabledStyle, initSelectedStyle, getUnselectedStyle, setUnselectedStyle, getSelectedStyle, setSelectedStyle, getDisabledStyle, setDisabledStyle, installDefaultPainter, requestFocus, toString, refreshTheme, refreshTheme, isDragActivated, animate, scrollRectToVisible, scrollRectToVisible, paintBorder, paintBorderBackground, isCellRenderer, isScrollVisible, setScrollVisible, setIsScrollVisible, startEditingAsync, stopEditing, isEditing, isEditable, laidOut, deinitialize, initComponent, isInitialized, setInitialized, styleChanged, getNextFocusDown, setNextFocusDown, getNextFocusUp, setNextFocusUp, getNextFocusLeft, setNextFocusLeft, getNextFocusRight, setNextFocusRight, getName, setName, initCustomStyle, deinitializeCustomStyle, isRTL, setRTL, isTactileTouch, isTactileTouch, setTactileTouch, getPropertyTypeNames, paintLockRelease, paintLock, isSnapToGrid, setSnapToGrid, shouldBlockSideSwipe, shouldBlockSideSwipeLeft, shouldBlockSideSwipeRight, blocksSideSwipe, isFlatten, setFlatten, getTensileLength, setTensileLength, isGrabsPointerEvents, setGrabsPointerEvents, getScrollOpacityChangeSpeed, setScrollOpacityChangeSpeed, growShrink, isAlwaysTensile, setAlwaysTensile, isDraggable, setDraggable, isDropTarget, setDropTarget, isChildOf, isHideInPortrait, setHideInPortrait, getBindablePropertyNames, getBindablePropertyTypes, bindProperty, unbindProperty, getBoundPropertyValue, setBoundPropertyValue, getCloudBoundProperty, setCloudBoundProperty, getCloudDestinationProperty, setCloudDestinationProperty, getComponentState, setComponentState, setHidden, isHidden, setHidden, isHidden, announceForAccessibility, getAccessibilityText, setAccessibilityText, getSemantics, getAccessibilityNode, accessibilityChanged, accessibilityChanged, getTooltip, setTooltip

Constructor details

SpanMultiButton

public SpanMultiButton(String line1)
Initializes a multibutton with the first line of text

Parameters

line1 String
first line of text

SpanMultiButton

public SpanMultiButton()
Default constructor allowing the designer to create an instance of this class

Method details

isLinesTogetherMode

public boolean isLinesTogetherMode()
Indicates if the lines are grouped together on this button

setLinesTogetherMode

public void setLinesTogetherMode(boolean l)
Changes the layout so the lines of the button are grouped together

Parameters

l boolean
true to group the lines together

getIconComponent

public Label getIconComponent()
Allows us to gain direct access to the icon component so we can set it directly without going via the other methods, this is especially useful for classes such as the ImageDownloadService which can then update the icon seamlessly.

Returns

the component used internally to represent the icon

addActionListener

public void addActionListener(ActionListener al)
Adds an action listener

Parameters

al ActionListener
the action listener

removeActionListener

public void removeActionListener(ActionListener al)
Removes an action listener

Parameters

al ActionListener
the action listener

addLongPressListener

public void addLongPressListener(ActionListener l)
Adds a listener to the pointer event

removeLongPressListener

public void removeLongPressListener(ActionListener l)
Removes the listener from the pointer event

addPointerPressedListener

public void addPointerPressedListener(ActionListener l)
Adds a listener to the pointer event

removePointerPressedListener

public void removePointerPressedListener(ActionListener l)
Removes the listener from the pointer event

addPointerReleasedListener

public void addPointerReleasedListener(ActionListener l)
Adds a listener to the pointer event

removePointerReleasedListener

public void removePointerReleasedListener(ActionListener l)
Removes the listener from the pointer event

getCommand

public Command getCommand()
Returns the command for the emblem

Returns

the command instance

setCommand

public void setCommand(Command c)
Sets the command for the component, it doesn’t affe

Parameters

c Command
the command

isCheckBox

public boolean isCheckBox()
Returns true if this is a checkbox button

Returns

true for a checkbox button

setCheckBox

public void setCheckBox(boolean b)
Turns the multi-button into a checkbox multi-button

Parameters

b boolean
true for a checkbox multi-button

isRadioButton

public boolean isRadioButton()
Returns true if this is a radio button

Returns

true for a radio button

setRadioButton

public void setRadioButton(boolean b)
Turns the multi-button into a radio multi-button

Parameters

b boolean
true for a radio multi-button

isSelected

public boolean isSelected()
Returns true if the checkbox/radio button is selected

Returns

true if the checkbox/radio button is selected

setSelected

public void setSelected(boolean b)
Toggles the selected state for the radio button/check box modes

Parameters

b boolean
true for checked false for unchecked

isHorizontalLayout

public boolean isHorizontalLayout()
Indicates whether the first two labels are be side by side

Returns

true if the first two labels are side by side

setHorizontalLayout

public void setHorizontalLayout(boolean b)
Indicates the first two labels should be side by side

Parameters

b boolean
true to place the first two labels side by side

isInvertFirstTwoEntries

public boolean isInvertFirstTwoEntries()
Inverts the order of the first two entries so the second line appears first. This only works in horizontal mode!

Returns

true when the second row entry should be placed before the first entry

setInvertFirstTwoEntries

public void setInvertFirstTwoEntries(boolean b)
Inverts the order of the first two entries so the second line appears first. This only works in horizontal mode!

Parameters

b boolean
true to place the second row entry as the first entry

getTextLine1

public String getTextLine1()
Returns the content of the row

Returns

the text

setTextLine1

public void setTextLine1(String t)
Sets the content of the row

Parameters

t String
text to set

getNameLine1

public String getNameLine1()
Returns the name of the row

Returns

the name

setNameLine1

public void setNameLine1(String t)
Sets the name of the row (important for use in generic renderers)

Parameters

t String
name to set

getUIIDLine1

public String getUIIDLine1()
Returns the UIID of the row

Returns

the UIID

setUIIDLine1

public void setUIIDLine1(String t)
Sets the UIID of the row

Parameters

t String
UIID to set

getTextLine2

public String getTextLine2()
Returns the content of the row

Returns

the text

setTextLine2

public void setTextLine2(String t)
Sets the content of the row

Parameters

t String
text to set

getNameLine2

public String getNameLine2()
Returns the name of the row

Returns

the name

setNameLine2

public void setNameLine2(String t)
Sets the name of the row (important for use in generic renderers

Parameters

t String
name to set

getUIIDLine2

public String getUIIDLine2()
Returns the UIID of the row

Returns

the UIID

setUIIDLine2

public void setUIIDLine2(String t)
Sets the UIID of the row

Parameters

t String
UIID to set

removeTextLine1

public void removeTextLine1()
Removes the content of the row

removeTextLine2

public void removeTextLine2()
Removes the content of the row

removeTextLine3

public void removeTextLine3()
Removes the content of the row

removeTextLine4

public void removeTextLine4()
Removes the content of the row

getTextLine3

public String getTextLine3()
Returns the content of the row

Returns

the text

setTextLine3

public void setTextLine3(String t)
Sets the content of the row

Parameters

t String
text to set

getNameLine3

public String getNameLine3()
Returns the name of the row

Returns

the name

setNameLine3

public void setNameLine3(String t)
Sets the name of the row (important for use in generic renderers

Parameters

t String
name to set

getUIIDLine3

public String getUIIDLine3()
Returns the UIID of the row

Returns

the UIID

setUIIDLine3

public void setUIIDLine3(String t)
Sets the UIID of the row

Parameters

t String
UIID to set

getTextLine4

public String getTextLine4()
Returns the content of the row

Returns

the text

setTextLine4

public void setTextLine4(String t)
Sets the content of the row

Parameters

t String
text to set

getNameLine4

public String getNameLine4()
Returns the name of the row

Returns

the name

setNameLine4

public void setNameLine4(String t)
Sets the name of the row (important for use in generic renderers

Parameters

t String
name to set

getUIIDLine4

public String getUIIDLine4()
Returns the UIID of the row

Returns

the UIID

setUIIDLine4

public void setUIIDLine4(String t)
Sets the UIID of the row

Parameters

t String
UIID to set

getIcon

public Image getIcon()
Returns the icon image

Returns

the image instance

setIcon

public void setIcon(Image i)
Sets the icon

Parameters

i Image
the icon

getEmblem

public Image getEmblem()
Returns the emblem image

Returns

the image instance

setEmblem

public void setEmblem(Image i)
Sets the emblem

Parameters

i Image
the icon

getIconPosition

public String getIconPosition()
Returns the icon position based on border layout constraints

Returns

position either North/South/East/West

setIconPosition

public void setIconPosition(String t)
Sets the icon position based on border layout constraints

Parameters

t String
position either North/South/East/West

getEmblemPosition

public String getEmblemPosition()
Returns the emblem position based on border layout constraints

Returns

position either North/South/East/West

setEmblemPosition

public void setEmblemPosition(String t)
Sets the emblem position based on border layout constraints

Parameters

t String
position either North/South/East/West

getIconName

public String getIconName()
Returns the name of the icon

Returns

the name

setIconName

public void setIconName(String t)
Sets the name of the icon (important for use in generic renderers

Parameters

t String
name to set

getIconUIID

public String getIconUIID()
Returns the UIID of the Icon

Returns

the UIID

setIconUIID

public void setIconUIID(String t)
Sets the UIID of the icon

Parameters

t String
UIID to set

getEmblemName

public String getEmblemName()
Returns the name of the emblem

Returns

the name

setEmblemName

public void setEmblemName(String t)
Sets the name of the emblem (important for use in generic renderers

Parameters

t String
name to set

getEmblemUIID

public String getEmblemUIID()
Returns the UIID of the Emblem

Returns

the UIID

setEmblemUIID

public void setEmblemUIID(String t)
Sets the UIID of the emblem

Parameters

t String
UIID to set

getPropertyNames

public String[] getPropertyNames()
A component may expose mutable property names for a UI designer to manipulate, this API is designed for usage internally by the GUI builder code

Returns

the property names allowing mutation

getPropertyTypes

public Class[] getPropertyTypes()
Matches the property names method (see that method for further details).

Returns

the types of the properties

getPropertyValue

public Object getPropertyValue(String name)
Returns the current value of the property name, this method is used by the GUI builder

Parameters

name String
the name of the property

Returns

the value of said property

getText

public String getText()
Sets the line 1 text The text of the component

Returns

the text

setText

public void setText(String text)
Returns the line 1 text New text for the component

Parameters

text String
the text

setPropertyValue

public String setPropertyValue(String name, Object value)
Sets a new value to the given property, returns an error message if failed and null if successful. Notice that some builtin properties such as “$designMode” might be sent to components to indicate application state.

Parameters

name String
the name of the property
value Object
new value for the property

Returns

error message or null

getGroup

public String getGroup()
Indicates the group for the radio button

Returns

the group

setGroup

public void setGroup(String group)
Indicates the group for the radio button

Parameters

group String
the group to set

setGroup

public void setGroup(ButtonGroup bg)
Sets the button group for a radio button mode multibutton

Parameters

bg ButtonGroup
the button group

getMaskName

public String getMaskName()
Set the mask name for the icon

Returns

the maskName

setMaskName

public void setMaskName(String maskName)
The mask name for the icon

Parameters

maskName String
the maskName to set

isShouldLocalize

public boolean isShouldLocalize()
Indicates if text should be localized when set to the component, by default all text is localized so this allows disabling automatic localization for a specific component.

Returns

the shouldLocalize value

setShouldLocalize

public void setShouldLocalize(boolean shouldLocalize)
Indicates if text should be localized when set to the component, by default all text is localized so this allows disabling automatic localization for a specific component.

Parameters

shouldLocalize boolean
the shouldLocalize to set

getGap

public int getGap()
Returns the gap in pixels between the icon/text to the Label boundaries

Returns

the gap in pixels between the icon/text to the Label boundaries

setGap

public void setGap(int gap)
Set the gap in pixels between the icon/text to the Label boundaries

Parameters

gap int
the gap in pixels

getTextPosition

public int getTextPosition()
Returns The position of the text relative to the icon

Returns

The position of the text relative to the icon, one of: LEFT, RIGHT, BOTTOM, TOP

setTextPosition

public void setTextPosition(int textPosition)
Sets the position of the text relative to the icon if exists

Parameters

textPosition int
alignment value (LEFT, RIGHT, BOTTOM or TOP)

getIconStyleComponent

public Component getIconStyleComponent()
Gets the component that should be used for styling material the material icon. If #setIconUIID(java.lang.String) has been used to set a custom UIID for the icon, then this will return a component with that UIID. Otherwise this will just return this component itself.

Returns

The component to use for styling the material icon.

setMaterialIcon

public void setMaterialIcon(char c, float size)
This method is shorthand for char, float)

Parameters

c char
one of the constants from com.codename1.ui.FontImage
size float
the size of the icon in millimeters

setFontIcon

public void setFontIcon(Font font, char c, float size)
This method is shorthand for com.codename1.ui.Font, char, float)

Parameters

font Font
Not documented.
c char
one of the constants from the font
size float
the size of the icon in millimeters

getRolloverIcon

public Image getRolloverIcon()
Indicates the icon that is displayed on the button when the button is in rolled over state

Returns

icon used

setRolloverIcon

public void setRolloverIcon(Image arg0)
Indicates the icon that is displayed on the button when the button is in rolled over state

Parameters

arg0 Image
icon to use

getPressedIcon

public Image getPressedIcon()
Indicates the icon that is displayed on the button when the button is in pressed state

Returns

icon used

setPressedIcon

public void setPressedIcon(Image arg0)
Indicates the icon that is displayed on the button when the button is in pressed state

Parameters

arg0 Image
icon used

getDisabledIcon

public Image getDisabledIcon()
Indicates the icon that is displayed on the button when the button is in the disabled state

Returns

icon used

setDisabledIcon

public void setDisabledIcon(Image arg0)
Indicates the icon that is displayed on the button when the button is in the disabled state

Parameters

arg0 Image
icon used

getRolloverPressedIcon

public Image getRolloverPressedIcon()
Indicates the icon that is displayed on the button when the button is in pressed state and is selected. This is ONLY applicable to toggle buttons

Returns

icon used

setRolloverPressedIcon

public void setRolloverPressedIcon(Image icn)
Indicates the icon that is displayed on the button when the button is in pressed state and is selected. This is ONLY applicable to toggle buttons

Parameters

icn Image
icon used

getIconFromState

public Image getIconFromState()
Returns the icon for the button based on its current state

Returns

the button icon based on its current state