Installing and using Mobile Suite : webMethods Mobile Designer Native User Interface Reference : Native User Interface (NativeUI) Objects : nUITableButton
nUITableButton
com.softwareag.mobile.runtime.nui.nUITableButton
Use to display a table that contains other NativeUI objects and acts as a button.
Example
This code sample displays a nUITableButton object that contains an image and text. Illustrations of how the example code is rendered on various platforms follows the code sample.
nUITableElement table;
nUITablerowElement tr;
nUITablecellElement tc;
 
//loadImage calls Image.createImage() with the appropriate path and file extension.
Image person = loadImage("PersonRealisticSingle");
table = new nUITableElement(-1, new int[]{30,70});
{
tr = new nUITablerowElement(-1);
{
tc = new nUITablecellElement(-1);
{
tc.add(new nUIImageElement(-1, person));
tc.setVspan(2);
tc.setVAlign(nUIConstants.center);
}
tr.add(tc);
 
tc = new nUITablecellElement(-1);
{
nUITextfieldElement header = new nUITextfieldElement(-1, "Lorem
Ipsum.");
header.setHAlign(nUIConstants.left);
tc.add(header);
}
tr.add(tc);
}
table.add(tr);
 
tr = new nUITablerowElement(-1);
{
//empty cell, cell above us spans into here.
tc = new nUITablecellElement(-1);
tr.add(tc);
 
tc = new nUITablecellElement(-1);
{
nUITextfieldElement details = new nUITextfieldElement(-1, "Dolor
sit amet, consectetur adipisicing elit, sed do eiusmod tempor.");
details.setMaxLines(2);
details.setFontSize(nUIConstants.size_small);
details.setHAlign(nUIConstants.left);
tc.add(details);
}
tr.add(tc);
}
table.add(tr);
}
nUITableButton person_with_text =
new nUITableButton(NUIID_MY_PERSON_TABLEBUTTON);
person_with_text.add(table);
view.add(person_with_text);
Platform
Illustration
Android
iOS 7
iOS 6
Windows Phone
Other
Copyright © 2007-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback