com.sap.tc.mobile.wdlite.progmodel.core.viewitem
Class LabelViewItem

java.lang.Object
  extended by com.sap.tc.mobile.wdlite.progmodel.core.viewitem.ViewItem
      extended by com.sap.tc.mobile.wdlite.progmodel.core.viewitem.LabelViewItem
All Implemented Interfaces:
Const, CommonConstants

public class LabelViewItem
extends ViewItem

Label view item class. Example

   
        public final class SomeController extends Controller {
                ...
                public void wdDoModifyView(SomeView view, boolean firstTime)
                {
                        LabelViewItem label = view.getRootUIElementContainerViewItem().createLabel("Some name");
                        label.setText("Text");
                        label.bindVisibleProperty(wdContext.nodeSomeNode(), "some-attr");
                }
                ...
        } 
        
Removing example
  
        public final class SomeController extends Controller {  
                ...
                public void wdDoModifyView(SomeView view, boolean firstTime)
                {
                        parentViewItem.remove("View item name");
                                or
                        parentViewItem.remove(someViewItemObject);
                }
                ... 
        } 
        


Field Summary
 
Fields inherited from class com.sap.tc.mobile.wdlite.progmodel.core.viewitem.ViewItem
viewElement
 
Fields inherited from interface com.sap.tc.mobile.wdlite.progmodel.core.Const
CARDINALITY_0_1, CARDINALITY_0_N, CARDINALITY_1_1, CARDINALITY_1_N, EMPTY_ARR, EMPTY_CLASS_ARR, EMPTY_INT_ARRAY, EMPTY_INT_ARRAY2, EMPTY_MAP, FALSE, NAV_INFO_COMPONENT, NAV_INFO_PLUG, NAV_INFO_VIEW, NONE, PROPERTY_EMPTY_ARRAY, TRUE, TYPE_BINARY, TYPE_BOOLEAN, TYPE_DATE, TYPE_DECIMAL, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INTEGER, TYPE_LONG, TYPE_SHORT, TYPE_STRING, TYPE_TIME, TYPE_TIMESTAMP
 
Fields inherited from interface com.sap.tc.mobile.wdlite.util.CommonConstants
BUTTONS_OK, BUTTONS_OK_CANCEL, BUTTONS_RETRY_CANCEL, BUTTONS_YES_NO, BUTTONS_YES_NO_CANCEL, CONTAINER_LAYOUT_FLOWLAYOUT, CONTAINER_LAYOUT_GRIDLAYOUT, ERROR, NORMAL, PROPERTY_ADJUST_IMAGE_SIZE, PROPERTY_BORDER, PROPERTY_CHECKED, PROPERTY_COLS, PROPERTY_CONTAINER_LAYOUT, PROPERTY_DATASOURCE, PROPERTY_DATATYPE, PROPERTY_ENABLED, PROPERTY_FILTERVALUE, PROPERTY_FIRSTVISIBLEROW, PROPERTY_FLOWLAYOUT_WRAPPING, PROPERTY_GRIDDATA_COLSPAN, PROPERTY_GRIDLAYOUT_COLCOUNT, PROPERTY_HEIGHT, PROPERTY_IMAGEFIRST, PROPERTY_IMAGESOURCE, PROPERTY_KEYCODE, PROPERTY_KEYTOSELECT, PROPERTY_LENGTH, PROPERTY_MODEL, PROPERTY_NUMOFTABS, PROPERTY_PASSWORDFIELD, PROPERTY_READONLY, PROPERTY_ROWS, PROPERTY_SELECTEDKEY, PROPERTY_SELECTEDTAB, PROPERTY_SOURCE, PROPERTY_TABLABEL, PROPERTY_TABLE_DESIGN, PROPERTY_TABLE_SELECTIONMODE, PROPERTY_TEXT, PROPERTY_TEXTEDIT_WRAPPING, PROPERTY_TEXTS, PROPERTY_TEXTVIEW_DESIGN, PROPERTY_TYPE, PROPERTY_VALUE, PROPERTY_VISIBLE, PROPERTY_VISIBLEROWCOUNT, PROPERTY_WIDTH, PROPERTY_WRAPPING, RESPONSE_CANCEL, RESPONSE_NO, RESPONSE_OK, RESPONSE_RETRY, RESPONSE_YES, TABLE_DESIGN_ALTERNATING, TABLE_DESIGN_STANDARD, TABLE_DESIGN_TRANSPARENT, TABLE_SELECTION_MODE_SINGLE, TABLE_SELECTIONMODE_AUTO, TABLE_SELECTIONMODE_MULTI, TEXTEDIT_WRAPPING_OFF, TEXTEDIT_WRAPPING_SOFT, TEXTVIEW_DESIGN_EMPHASIZED, TEXTVIEW_DESIGN_HEADER1, TEXTVIEW_DESIGN_HEADER2, TEXTVIEW_DESIGN_HEADER3, TEXTVIEW_DESIGN_HEADER4, TEXTVIEW_DESIGN_LABEL, TEXTVIEW_DESIGN_LABEL_SMALL, TEXTVIEW_DESIGN_LEGEND, TEXTVIEW_DESIGN_MONOSPACE, TEXTVIEW_DESIGN_REFERENCE, TEXTVIEW_DESIGN_STANDARD, TYPE_BUTTON, TYPE_CAPTION, TYPE_CHECKBOX, TYPE_DATEPICKER, TYPE_DATEPICKER_E, TYPE_DROPDOWNBYINDEX, TYPE_DROPDOWNBYKEY, TYPE_IMAGE, TYPE_INPUTFIELD, TYPE_LABEL, TYPE_LINKTOACTION, TYPE_NOTWRAPPEDTEXTEDIT, TYPE_PROGRESS_INDICATOR, TYPE_RADIOBUTTON, TYPE_ROWREPEATER, TYPE_TAB, TYPE_TABLE, TYPE_TABLECOLUMN, TYPE_TABSTRIP, TYPE_TEXTEDIT, TYPE_TEXTVIEW, TYPE_TIMEPICKER, TYPE_TIMEPICKER_E, TYPE_TRANSPARENTCONTAINER, TYPE_UIELEMENT_FUNCTIONKEY, WARNING
 
Constructor Summary
LabelViewItem(ViewElement viewElement)
          Constructs this view item.
 
Method Summary
 void bindTextProperty(ContextNode mappedNode, java.lang.String attributeName)
          Binds "text" property to context attribute
 void bindVisibleProperty(ContextNode mappedNode, java.lang.String attributeName)
          Binds "enable" property to context attribute
 void bindWidthProperty(ContextNode mappedNode, java.lang.String attributeName)
          Binds "width" property to context attribute
 java.lang.String getText()
          Determines the component's text.
 int getWidth()
          Determines this component width.
 boolean isVisible()
          Determines whether this component should be visible when its parent is visible.
 void setText(java.lang.String text)
          Sets the component's text to be the specified value.
 void setVisible(boolean visible)
          Shows or hides this component depending on the value of parameter.
 void setWidth(int width)
          Resizes this component width.
 
Methods inherited from class com.sap.tc.mobile.wdlite.progmodel.core.viewitem.ViewItem
bindProperty, getBooleanPropertyValue, getId, getIntegerPropertyValue, getStringPropertyValue, setPropertyValue, setUIControlSubType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelViewItem

public LabelViewItem(ViewElement viewElement)
Constructs this view item.

Method Detail

bindVisibleProperty

public void bindVisibleProperty(ContextNode mappedNode,
                                java.lang.String attributeName)
Binds "enable" property to context attribute


setVisible

public void setVisible(boolean visible)
Shows or hides this component depending on the value of parameter.


isVisible

public boolean isVisible()
Determines whether this component should be visible when its parent is visible.


bindWidthProperty

public void bindWidthProperty(ContextNode mappedNode,
                              java.lang.String attributeName)
Binds "width" property to context attribute


setWidth

public void setWidth(int width)
Resizes this component width.


getWidth

public int getWidth()
Determines this component width.


bindTextProperty

public void bindTextProperty(ContextNode mappedNode,
                             java.lang.String attributeName)
Binds "text" property to context attribute


setText

public void setText(java.lang.String text)
Sets the component's text to be the specified value.


getText

public java.lang.String getText()
Determines the component's text.



(c) 2007, SAP AG. All rights reserved.