com.leafdigital.ui.api
Interface Label

All Superinterfaces:
SupportsBaseGroup, SupportsMacIndent, Widget

public interface Label
extends Widget, SupportsBaseGroup, SupportsMacIndent

Interface for wrapping (multi-line) labels


Field Summary
 
Fields inherited from interface com.leafdigital.ui.api.SupportsMacIndent
TYPE_BUTTON, TYPE_EDIT, TYPE_EDIT_LEGACY, TYPE_NONE
 
Method Summary
 java.lang.String getText()
           
 void setAction(java.lang.String tag, TextView.ActionHandler ah)
          Sets handler for 'actions' (user clicking on things).
 void setDefaultWidth(int width)
          Set the default width for the label.
 void setMinWidth(int width)
          Sets minimum preferred width for the label.
 void setSmall(boolean small)
           
 void setText(java.lang.String text)
          Set the text.
 void setWidthGroup(java.lang.String group)
          Intended for field labels.
 
Methods inherited from interface com.leafdigital.ui.api.Widget
getID, getOwner, informClosed, isVisible, setOwner, setVisible
 
Methods inherited from interface com.leafdigital.ui.api.SupportsBaseGroup
setBaseGroup
 
Methods inherited from interface com.leafdigital.ui.api.SupportsMacIndent
setMacIndent, setMacIndent
 

Method Detail

setText

void setText(java.lang.String text)
Set the text.

Parameters:
text - Text for label in XML format.

getText

java.lang.String getText()
Returns:
Text of label

setDefaultWidth

void setDefaultWidth(int width)
Set the default width for the label. Has no effect when the label is already showing.

Parameters:
width - Desired width

setMinWidth

void setMinWidth(int width)
Sets minimum preferred width for the label.

Parameters:
width - Desired width

setWidthGroup

void setWidthGroup(java.lang.String group)
Intended for field labels. Ensures that all labels in the group have the same preferred size.

Parameters:
group - Group identifier

setSmall

void setSmall(boolean small)
Parameters:
small - If yes, uses a small font.

setAction

void setAction(java.lang.String tag,
               TextView.ActionHandler ah)
Sets handler for 'actions' (user clicking on things). If called multiple times for same tag, second call replaces first.

Parameters:
tag - Tag that is sensitive to clicks.
ah - Handler


Copyright © 2011 Samuel Marshall. All rights reserved.