本文整理匯總了Java中com.extjs.gxt.ui.client.widget.layout.MarginData類的典型用法代碼示例。如果您正苦於以下問題:Java MarginData類的具體用法?Java MarginData怎麽用?Java MarginData使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
MarginData類屬於com.extjs.gxt.ui.client.widget.layout包,在下文中一共展示了MarginData類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createNorth
import com.extjs.gxt.ui.client.widget.layout.MarginData; //導入依賴的package包/類
private void createNorth(LayoutContainer view) {
// main > view > breadcrumb
LayoutContainer breadcrumb = new LayoutContainer();
breadcrumb.setId("app-main-breadcrumb");
breadcrumb.setLayout(new FitLayout());
BorderLayoutData northData = new BorderLayoutData(Style.LayoutRegion.NORTH, 0.14f);
northData.setMargins(new Margins(0, 0, 0, 0));
view.add(breadcrumb, northData);
breadcrumb.add(new Html("Home"), new MarginData(30,0,0,360));
}
示例2: verifyLayout
import com.extjs.gxt.ui.client.widget.layout.MarginData; //導入依賴的package包/類
/**
* Sets the size of the row editor to EDITOR_HEIGHT.
* Code from http://www.sencha.com/forum/showthread.php?130195-Using-RowEditor-resizing-edited-row-height-in-edit-mode
*/
@Override
protected void verifyLayout(boolean force)
{
// initialize can not be reached... but we use instead "btns !=null"
if (btns != null && (isVisible() || force))
{
Element row = (Element) grid.getView().getRow(rowIndex);
setSize(El.fly(row).getWidth(false), renderButtons ? EDITOR_HEIGHT : 0);
syncSize();
ColumnModel cm = grid.getColumnModel();
for (int i = 0, len = cm.getColumnCount(); i < len; i++)
{
if (!cm.isHidden(i))
{
Field<?> f = (Field<?>) getItem(i);
f.show();
f.getElement().setAttribute("gxt-dindex", "" + cm.getDataIndex(i));
MarginData md = (MarginData) ComponentHelper.getLayoutData(f);
f.setWidth(cm.getColumnWidth(i) - md.getMargins().left - md.getMargins().right);
}
else
{
getItem(i).hide();
}
}
layout(true);
positionButtons();
}
}