本文整理汇总了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();
}
}