本文整理汇总了PHP中Table::setClass方法的典型用法代码示例。如果您正苦于以下问题:PHP Table::setClass方法的具体用法?PHP Table::setClass怎么用?PHP Table::setClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Table
的用法示例。
在下文中一共展示了Table::setClass方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: NewException
/**
* Constructor ContactForm
* @param Page $page_object
* @param string $send_method
* @param string $table_style
*/
function __construct($page_object, $send_method, $table_style = '')
{
parent::__construct();
if (!isset($page_object) || !isset($send_method)) {
throw new NewException("2 arguments for " . get_class($this) . "::__construct() are mandatory", 0, getDebugBacktrace(1));
}
if (gettype($page_object) != "object" || !is_subclass_of($page_object, "Page")) {
throw new NewException("Argument page_object for " . get_class($this) . "::__construct() error", 0, getDebugBacktrace(1));
}
$this->page_object = $page_object;
$this->mail_to = SMTP_MAIL;
$this->mail_to_name = SMTP_NAME;
$table_main = new Table();
$table_main->setClass($table_style);
$form = new Form($this->page_object);
$name = new TextBox($form, "contact_name");
$name_validation = new LiveValidation();
$name->setLiveValidation($name_validation->addValidatePresence()->setFieldName(__(CONTACTFORM_NAME)));
$table_main->addRowColumns(__(CONTACTFORM_NAME) . ": ", $name->setFocus())->setColumnWidth(2, "100%");
$email = new TextBox($form, "contact_email");
$email_validation = new LiveValidation();
$email->setLiveValidation($email_validation->addValidateEmail()->addValidatePresence()->setFieldName(__(CONTACTFORM_EMAIL)));
$table_main->addRowColumns(__(CONTACTFORM_EMAIL) . ": ", $email);
$subject = new TextBox($form, "contact_subject");
$subject_validation = new LiveValidation();
$subject->setLiveValidation($subject_validation->addValidatePresence()->setFieldName(__(CONTACTFORM_SUBJECT)));
$table_main->addRowColumns(__(CONTACTFORM_SUBJECT) . ": ", $subject);
$table_main->addRow();
$editor = new Editor($form, "contact_message");
$editor_validation = new LiveValidation();
$editor->setLiveValidation($editor_validation->addValidatePresence()->setFieldName(__(CONTACTFORM_MESSAGE)));
$editor->setToolbar(Editor::TOOLBAR_SIMPLE);
$table_main->addRow(new Object(__(CONTACTFORM_MESSAGE) . ": ", "<br/>", $editor))->setColspan(3)->setAlign(RowTable::ALIGN_LEFT);
$table_main->addRow();
$this->captcha = new Captcha($form, "contact_captcha");
$table_main->addRow($this->captcha)->setColspan(3);
$table_main->addRow();
$this->send_button = new Button($form, "contact_send", "", __(CONTACTFORM_SEND));
$this->send_button->assignEnterKey()->onClick($send_method)->setAjaxEvent();
$table_main->addRow($this->send_button)->setColspan(3);
$table_main->addRow();
$form->setContent($table_main);
$this->render = $form;
}
示例2: budget
<?php
$win = new SDPanel();
$win->setCaption("Movements");
$maintable = new Table();
$maintable->setRowsStyle("100%");
$maintable->setWidth("100%");
$maintable->setHeight("100%");
$maintable->setClass("table.white");
$label_budget = new Label();
$label_budget->setCaption("Add Budget");
$label_budget->setClass("label.blue");
$label_budget->onTap(budget());
$label_income = new Label();
$label_income->setCaption("Income");
$label_income->setClass("label.green");
$label_income->onTap(income());
$label_outcome = new Label();
$label_outcome->setCaption("Outcome");
$label_outcome->setClass("label.red");
$label_outcome->onTap(outcome());
$maintable->addControl($label_budget, 1, 1, 1, 1, "Center", "Middle");
$maintable->addControl($label_income, 2, 1, 1, 1, "Center", "Middle");
$maintable->addControl($label_outcome, 3, 1, 1, 1, "Center", "Middle");
$win->addControl($maintable);
function budget()
{
$win->Open("Budget");
}
function income()
{
示例3: SDPanel
<?php
/***
* Edit my data.
*/
$win = new SDPanel();
$win->setCaption("My Account");
$token = new InputText(80);
Data::getParm($token);
$table = new Table();
$table->setClass("tablebackground");
$table_form = new Table();
$table_form->setClass("tableforms");
$table_form->setRowsStyle("76dip;76dip;76dip");
$name = new InputText();
$name->setClass("inputForm");
$last_name = new InputText();
$last_name->setClass("inputForm");
$email = new InputEmail();
$email->setClass("inputForm");
$btn_save = new Button();
$btn_save->setCaption("Save");
$btn_save->setClass("buttonform");
$btn_save->onTap(save());
$table_form->addControl($name, 1, 1);
$table_form->addControl($last_name, 2, 1);
$table_form->addControl($email, 3, 1);
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
$table->addControl($table_form, 1, 1);
$table->addControl($table_button, 2, 1);
示例4: Table
$table_facebook->addControl($img_facebook, 1, 1, 1, 1, "Center", "Middle");
$table_facebook->addControl($lbl_facebook, 1, 2, 1, 1, "Left", "Middle");
$table_twitter = new Table();
$table_twitter->setClass("table.MenuOption");
$table_twitter->setColumnsStyle("20%;80%");
$img_twitter = new Image();
$img_twitter->setImage("img/Android/hdpi/ic_twitter.png");
$img_twitter->setClass("image.menu");
$lbl_twitter = new Label();
$lbl_twitter->setClass("label.MenuOption");
$lbl_twitter->setCaption("Twitter");
$table_twitter->onTap(twitte());
$table_twitter->addControl($img_twitter, 1, 1, 1, 1, "Center", "Middle");
$table_twitter->addControl($lbl_twitter, 1, 2, 1, 1, "Left", "Middle");
$table_map = new Table();
$table_map->setClass("table.MenuOption");
$table_map->setColumnsStyle("20%;80%");
$img_map = new Image();
$img_map->setImage("img/Android/hdpi/ic_map.png");
$img_map->setClass("image.menu");
$lbl_map = new Label();
$lbl_map->setClass("label.MenuOption");
$lbl_map->setCaption("Map");
$table_map->onTap(map());
$table_map->addControl($img_map, 1, 1, 1, 1, "Center", "Middle");
$table_map->addControl($lbl_map, 1, 2, 1, 1, "Left", "Middle");
$mainTable->addControl($table_home, 2, 1);
$mainTable->addControl($table_facebook, 3, 1);
$mainTable->addControl($table_twitter, 4, 1);
$mainTable->addControl($table_map, 5, 1);
$win->addControl($mainTable);
示例5: start
$tableImg->setClass("table.image");
$tableImg->setRowsStyle("pd;150dip;pd");
$image = new InputImage();
$image->setReadOnly(true);
$image->setClass("image.roundBorder");
$name = new InputText();
$name->setReadOnly(true);
$name->setClass("input.title");
$address = new InputAddress();
$address->setReadOnly(true);
$phone = new InputPhone();
$phone->setReadOnly(true);
$tableImg->addControl($image, 2, 1, 1, 1, "Center", "Middle");
$tableImg->addControl($name, 3, 1, 1, 1, "Center", "Middle");
$tableDesc = new Table();
$tableDesc->setClass("table.margin");
$tableDesc->addControl($address, 1, 1);
$tableDesc->addControl($phone, 2, 1);
$mainTable->addControl($tableImg, 1, 1);
$mainTable->addControl($tableDesc, 2, 1);
$win->addControl($mainTable);
function start()
{
$url = "http://demo.kikapptools.com/CRMManager/crud/getCompanies.php?companyId=" . $id;
$httpClient = new httpClient();
$result = $httpClient->Execute('GET', $url);
$struct = array("CompanyName" => DataType::Character(100), "CompanyImage" => DataType::Character(200), "CompanyPhone" => DataType::Phone(), "CompanyAddress" => DataType::Address());
Data::FromJson($struct, $result);
$image = $struct['CompanyImage'];
$name = $struct['CompanyName'];
$address = $struct['CompanyAddress'];
示例6: SDPanel
<?php
/***
* Navigation Style - Slide.
* Main screen.
*/
$win = new SDPanel();
$win->setCaption("Menu");
$table = new Table();
$table->setClass("tableMenu");
$table_home = new Table();
$table_home->setClass("tableMenuOption");
$table_home->setColumnsStyle("20%;80%");
$img_home = new Image();
$img_home->setImage("img/Android/hdpi/ic_home.png");
$img_home->setClass("imagemenu");
$lbl_home = new Label();
$lbl_home->setClass("labelMenuOption");
$lbl_home->setCaption("Home");
$table_home->onTap(home());
$table_home->addControl($img_home, 1, 1, 1, 1, "Center", "Middle");
$table_home->addControl($lbl_home, 1, 2, 1, 1, "Left", "Middle");
$table_account = new Table();
$table_account->setClass("tableMenuOption");
$table_account->setColumnsStyle("20%;80%");
$table_account->setInvisibleMode("Collapse Space");
$img_account = new Image();
$img_account->setImage("img/Android/hdpi/ic_product.png");
$img_account->setClass("imagemenu");
$lbl_account = new Label();
$lbl_account->setClass("labelMenuOption");
示例7: SDPanel
<?php
/***
* Home.
*/
$win = new SDPanel();
$win->setCaption("Home");
$token = new InputText(80);
Data::getParm($token);
$maintable = new Table();
$maintable->setWidth("100%");
$maintable->setHeight("100%");
$maintable->setClass("table.global");
$maintable->setRowsStyle("100%");
$table_first = new Table();
$table_first->setWidth("100%");
$table_first->setHeight("40%");
$table_first->setClass("table.first");
$table_canvas = new Table();
$table_canvas->setRowsStyle("100%");
$table_canvas->setWidth("100%");
$table_canvas->setHeight("100%");
$canvas = new Canvas();
$canvas->setWidth("100%");
$canvas->setHeight("100%");
$label_account = new Label();
$label_account->setCaption("Account");
$label_account->setClass("label.black");
$input_account = new InputNumeric(11);
$input_account->setReadOnly(true);
$input_account->setClass("label.black");
示例8: SDPanel
<?php
/***
* Detail of product
*/
$win = new SDPanel();
//$win -> setCaption("Detail of product");
$id = new InputNumeric();
$productUrl = new InputText();
Data::getParm($id, $title, $desc, $price, $stock, $productUrl);
$table = new Table();
$table->setClass("tableGray");
//Action Bar and Action Group.
$apb1 = new ActionBar();
$acg1 = new ActionGroup();
$acg1->setCaption("");
$acg1->setImage("img/ic_share.png");
$btn_facebook = new ButtonBar();
$btn_facebook->setCaption("Facebook");
$btn_facebook->setImage("img/ic_facebook.png");
$btn_facebook->onTap(facebook());
$btn_tw = new ButtonBar();
$btn_tw->setCaption("Twitter");
$btn_tw->setImage("img/ic_tw.png");
$btn_tw->onTap(twitter());
$btn_sms = new ButtonBar();
$btn_sms->setCaption("SMS");
$btn_sms->setImage("img/ic_sms.png");
$btn_sms->onTap(sms());
$btn_email = new ButtonBar();
$btn_email->setCaption("EMail");
示例9: SDPanel
<?php
/**
* Main object.
* @author Kikapp
* @version 1.0
*/
$win = new SDPanel();
$win->setCaption("Welcome");
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$mainTable = new Table();
$mainTable->setClass("table.general");
$label = new Label();
$label->setCaption("Welcome to the Global Example!");
$label->setClass("label.Home");
$label2 = new Label();
$label2->setCaption("Use the Slide to open Facebook, Twitter and Map!");
$label2->setClass("label.Home");
$image = new Image();
$image->setImage("img/Android/hdpi/appicon.png");
$mainTable->addControl($label, 2, 1, 1, 1, "Center", "Middle");
$mainTable->addControl($label2, 3, 1, 1, 1, "Center", "Middle");
$mainTable->addControl($image, 4, 1, 1, 1, "Center", "Middle");
$win->addControl($mainTable);
示例10: grid_load
$grid_home->setShowPageController(false);
$table_grid = new Canvas();
$grid_home->addData(grid_load());
//inputs and controls
$title = new InputText(150);
$title->setClass("inputtextTitlewhite");
$title->setAutoGrow(true);
$image = new InputImage();
$image->setClass("imageImageList");
$desc = new InputText(300);
$desc->setClass("inputtextwhite");
$price = new InputText(10);
$price->setClass("inputtextPrice");
$table_desc = new Table();
$table_desc->setRowsStyle("25dip;35dip;25dip");
$table_desc->setClass("tableProductThumb");
$table_desc->addControl($title, 1, 1);
$table_desc->addControl($desc, 2, 1);
$table_desc->addControl($price, 3, 1);
$table_grid->addPosition($image, "0%", "100%", "0", "230dip", "0%", "100%");
$table_grid->addPosition($table_desc, "0%", "100%", "140dip", "83dip", "0", "0");
$grid_home->addControl($table_grid);
$mainTable->setRowsStyle("230dip;100%");
$mainTable->addControl($grid_home, 1, 1);
$win->addControl($mainTable);
function grid_load()
{
$url = "http://www.demo.kikapptools.com/magento/apiGecko/productos.php?display=home";
$httpClient = new httpClient();
$result = $httpClient->Execute('GET', $url);
$struct = array(array("id" => DataType::Numeric(6), "name" => DataType::Character(150), "description" => DataType::Character(300), "pirce" => DataType::Character(10), "thumb" => DataType::Character(200)));
示例11: SDPanel
/***
* My shopping cart
*/
$win = new SDPanel();
$win->setCaption("My cart");
$token = new InputText(80);
Data::getParm($token);
$acb = new ActionBar();
$btn_delete = new ButtonBar();
$btn_delete->setCaption("Delete");
$btn_delete->onTap(delete());
$acb->addControl($btn_delete);
$win->addControl($acb);
$table = new Table();
$table->setClass("table.cartMain");
$table->setRowsStyle("93%;160dip");
$list = new Grid();
$list->setEmptyGridBackgroundClass("table.gray");
$list->setEmptyGridText("Your cart is empty");
//$list->setPullToRefresh(true);
$list->addData(load_grid());
//$list->onTap(view_image());
$id = new InputNumeric();
$image = new InputImage();
$image->setClass("image.checkout");
$name = new InputText();
$name->setClass("input.titleProductNameWhite");
$qty = new InputText();
$qty->setClass("inputtextTitlewhite");
$price = new InputNumeric(12, 4);
示例12: clientStart
$token = new InputText(80);
$maintable = new Table();
$maintable->setRowsStyle("100%");
$maintable->setWidth("100%");
$maintable->setHeight("100%");
$input = new InputNumeric(11);
$input->setClass("label.black");
$input->setReadOnly(true);
$label = new Label();
$label->setCaption("Total balance:");
$label->setClass("label.black");
$table = new Table();
$table->setRowsStyle("100%");
$table->setWidth("100%");
$table->setHeight("65%");
$table->setClass("table.account");
$table->addControl($label, 1, 1, 1, 1, "Center", "Middle");
$table->addControl($input, 1, 2, 1, 1, "Center", "Middle");
$maintable->addControl($table, 1, 1);
$win->addControl($maintable);
function clientStart()
{
$token = StorageAPI::Get("token");
$url = "http://demo.kikapptools.com/Gastos/crud/getAccount.php";
$httpClient = new httpClient();
$httpClient->addVariable("id", $token);
$result = $httpClient->Execute('POST', $url);
$struct = array("money" => DataType::Numeric(11));
Data::FromJson($struct, $result);
$input = $struct['money'];
}
示例13: load_image
Data::getParm($id, $title);
$table = new Table();
$grid = new HorizontalGrid();
$grid->setRowsPerPagePortrait(1);
$grid->setShowPageController(true);
$grid->addData(load_image());
$table_grid = new Table();
$table_grid->setRowsStyle("100%");
$table_grid->setHeight("100%");
$image = new InputImage();
$image->setClass("imageImageList");
$table_grid->addControl($image, 1, 1);
$grid->addControl($table_grid, 1, 1);
$table->addControl($grid, 1, 1);
$table->setRowsStyle("100%");
$table->setClass("tableGrid");
$win->addControl($table);
function load_image()
{
$url = "http://demo.kikapptools.com/magento/apiKikApp/ProductImages.php?pId=" . $id;
$httpClient = new httpClient();
echo $id;
$result = $httpClient->Execute('GET', $url);
$str_images = array(array("url" => DataType::Character(350)));
Data::FromJson($str_images, $result);
foreach ($str_images as $img) {
$image = $img['url'];
}
}
function start()
{
示例14: action
* Sub categories list.
*/
$win = new SDPanel();
$cat = new InputNumeric();
Data::getParm($cat, $name);
$table = new Table();
$list = new Grid();
$list->addData(load_grid());
$list->setEmptyGridText("No items available");
$list->onTap(action());
$id = new InputNumeric();
$name = new InputText();
$name->setClass("input.categories");
$table_list = new Table();
$table_list->setHeight("60dip");
$table_list->setClass("table.categorias");
$table_list->addControl($name, 1, 1, 1, 1, "Left", "Middle");
$list->addControl($table_list, 1, 1);
$table->addControl($list, 1, 1);
$win->addControl($table);
$win->Render();
function action()
{
$win->Open("ProductList", $id);
}
function load_grid()
{
$url = "http://demo.kikapptools.com/magento/apiKikApp/Categories.php?cId=" . $cat;
$httpClient = new httpClient();
$result = $httpClient->Execute('GET', $url);
$struct = array(array("id" => DataType::Numeric(6), "name" => DataType::Character(150)));
示例15: SDPanel
<?php
/**
* Table example.
* mainTable.php
*/
//Create SDPanel
$win = new SDPanel();
$win->setCaption("Hello world!");
//Labels to add to the table
$label_one = new Label();
$label_one->setCaption("Text 1");
$label_one->setClass("label.Example");
$label_two = new Label();
$label_two->setCaption("Text 2");
$label_two->setClass("label.Example");
//Inner table
$table = new Table();
$table->setClass("table.Example");
$table->addControl($label_one, 1, 1, 1, 1, "Center", "Middle");
$table->addControl($label_two, 2, 1, 1, 1, "Center", "Middle");
$win->addControl($table);