本文整理汇总了Java中com.extjs.gxt.ui.client.util.Margins类的典型用法代码示例。如果您正苦于以下问题:Java Margins类的具体用法?Java Margins怎么用?Java Margins使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Margins类属于com.extjs.gxt.ui.client.util包,在下文中一共展示了Margins类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createNorth
import com.extjs.gxt.ui.client.util.Margins; //导入依赖的package包/类
/**
* Creates the north.
*/
private void createNorth()
{
north = new ContentPanel();
north.setHeaderVisible(false);
north.addListener(Events.Resize, new Listener<BaseEvent>()
{
public void handleEvent(BaseEvent be)
{
Dispatcher.forwardEvent(GeoGWTEvents.UPDATE_MAP_SIZE);
// Dispatcher.forwardEvent(GeofenceEvents.UPDATE_SOUTH_SIZE);
}
});
BorderLayoutData data = new BorderLayoutData(LayoutRegion.NORTH,
Constants.NORTH_PANEL_DIMENSION);
data.setMargins(new Margins(0, 5, 0, 5));
data.setSplit(true);
viewport.add(north, data);
}
开发者ID:geoserver,项目名称:geofence,代码行数:25,代码来源:AppView.java
示例2: createDetails
import com.extjs.gxt.ui.client.util.Margins; //导入依赖的package包/类
/**
* Creates the details.
*/
private void createDetails() {
details = new LayoutContainer();
details.setBorders(true);
details.setStyleAttribute("backgroundColor", "white");
BorderLayoutData eastData = new BorderLayoutData(LayoutRegion.EAST, 150, 150, 250);
eastData.setSplit(true);
BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
centerData.setMargins(new Margins(0, 5, 0, 0));
chooser.add(main, centerData);
chooser.add(details, eastData);
}
开发者ID:geoserver,项目名称:geofence,代码行数:19,代码来源:GeofenceChooserWidget.java
示例3: addField
import com.extjs.gxt.ui.client.util.Margins; //导入依赖的package包/类
/**
* Adds a field in the form.
*
* @param field
* The field.
* @param fieldLabelString
* The label of the field. Can be <code>null</code>.
*/
private void addField(Field<?> field, String fieldLabelString) {
// Builds the field label.
final Label fieldLabel = new Label(fieldLabelString);
fieldLabel.setWidth("165px");
fieldLabel.addStyleName("flexibility-element-label");
// Builds the field panel.
final ContentPanel fieldPanel = new ContentPanel();
fieldPanel.setBodyBorder(false);
fieldPanel.setHeaderVisible(false);
fieldPanel.setLayout(new HBoxLayout());
fieldPanel.add(fieldLabel, new HBoxLayoutData(new Margins(4, 20, 0, 0)));
final HBoxLayoutData flex = new HBoxLayoutData(new Margins(0, 20, 0, 0));
flex.setFlex(1);
fieldPanel.add(field, flex);
// Adds the field in the panel.
fieldsPanel.setHeight(FIELD_HEIGHT * fields.size());
fieldsPanel.add(fieldPanel, new VBoxLayoutData(new Margins(4, 0, 0, 0)));
fieldsPanel.layout();
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:32,代码来源:FormWindow.java
示例4: initialize
import com.extjs.gxt.ui.client.util.Margins; //导入依赖的package包/类
@Override
public void initialize() {
schemePanel = Panels.content(I18N.CONSTANTS.adminImportationSchemes());
schemePanel.setWidth(450);
schemePanel.setScrollMode(Scroll.AUTOY);
schemesGrid = buildSchemasGrid();
schemePanel.add(schemesGrid);
schemePanel.setTopComponent(importationSchemeToolBar());
variablePanel = Panels.content(I18N.CONSTANTS.edit());
variablePanel.setScrollMode(Scroll.AUTOY);
variablesGrid = buildVariablesGrid();
variablePanel.add(variablesGrid);
variablePanel.setTopComponent(variableToolBar());
closeButton = new ToolButton(STYLE_TOOL_CLOSE_ICON);
variablePanel.getHeader().addTool(closeButton);
final LayoutContainer details = Layouts.fit(false, STYLE_LAYOUT);
details.add(variablePanel);
final BorderLayoutData leftLayoutData = new BorderLayoutData(LayoutRegion.WEST, 450);
leftLayoutData.setMargins(new Margins(0, 4, 0, 0));
add(schemePanel, leftLayoutData);
final BorderLayoutData mainLayoutData = new BorderLayoutData(LayoutRegion.CENTER);
mainLayoutData.setMargins(new Margins(0, 0, 0, 4));
add(details, mainLayoutData);
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:32,代码来源:ImportationSchemeAdminView.java
示例5: onInitApplicationView
import com.extjs.gxt.ui.client.util.Margins; //导入依赖的package包/类
private void onInitApplicationView() {
final Dispatcher dispatcher = Dispatcher.get();
viewport = new Viewport();
viewport.setId("app-viewport");
viewport.setLayout(new BorderLayout());
// header
LayoutContainer header = new LayoutContainer();
header.setId("app-header");
header.setLayout(new FitLayout());
BorderLayoutData northData = new BorderLayoutData(Style.LayoutRegion.NORTH, 0.08f);
northData.setMargins(new Margins(0, 0, 0, 0));
viewport.add(header, northData);
// main
LayoutContainer main = new LayoutContainer();
main.setId("app-main");
main.setLayout(new FitLayout());
BorderLayoutData centerData = new BorderLayoutData(Style.LayoutRegion.CENTER);
centerData.setMargins(new Margins(0, 0, 0, 0));
viewport.add(main, centerData);
LayoutContainer view = new LayoutContainer();
view.setId("app-main-view");
view.setLayout(new BorderLayout());
main.add(view);
createWest(view);
createEast(view);
createNorth(view);
viewport.add(main, centerData);
RootPanel.get().add(viewport);
// dispatcher.dispatch(FinanceEvents.InitApplicationModule);
}
开发者ID:rafizanbaharum,项目名称:cfi-gov,代码行数:36,代码来源:FinanceView.java
示例6: createNorth
import com.extjs.gxt.ui.client.util.Margins; //导入依赖的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));
}
开发者ID:rafizanbaharum,项目名称:cfi-gov,代码行数:12,代码来源:FinanceView.java
示例7: createNorth
import com.extjs.gxt.ui.client.util.Margins; //导入依赖的package包/类
private void createNorth() {
north = new LayoutContainer();
// north.setLayout(new RowLayout());
// north.setLayout(new FitLayout());
north.setLayout(new FitLayout());
// new BorderLayout()
BorderLayoutData adminToolbarLayoutData = new BorderLayoutData(LayoutRegion.NORTH, 25);
adminToolbarLayoutData.setMargins(new Margins(5));
viewport.add(north, adminToolbarLayoutData);
}
开发者ID:treblereel,项目名称:Opensheet,代码行数:14,代码来源:AppView.java
示例8: createCenter
import com.extjs.gxt.ui.client.util.Margins; //导入依赖的package包/类
private void createCenter() {
center = new LayoutContainer();
// center.setLayout(new RowLayout());
center.setLayout(new FitLayout());
BorderLayoutData data = new BorderLayoutData(LayoutRegion.CENTER);
data.setMargins(new Margins(5, 5, 5, 5));
viewport.add(center, data);
}
开发者ID:treblereel,项目名称:Opensheet,代码行数:12,代码来源:AppView.java
示例9: initUI
import com.extjs.gxt.ui.client.util.Margins; //导入依赖的package包/类
protected void initUI() {
// Layout Fields.
setLayout(new BorderLayout());
List<ColumnConfig> internalAttr = new ArrayList<ColumnConfig>();
List<ColumnConfig> ciAttr = new ArrayList<ColumnConfig>();
/*
for (AttributeColumnConfig aConfig : gridConfig.getColumnConfig()) {
ColumnConfig cfg = EditorFactory.getColumnConfig(aConfig, false);
if (aConfig.isInternal()) {
internalAttr.add(cfg);
} else {
ciAttr.add(cfg);
}
}
*/
LayoutContainer internalPanel = getForm(internalAttr, 2, LabelAlign.LEFT);
LayoutContainer ciPanel = getForm(ciAttr, 3, LabelAlign.TOP);
ContentPanel internalCp = new ContentPanel();
internalCp.setLayout(new FitLayout());
internalCp.setAutoWidth(true);
internalCp.setAutoHeight(true);
internalCp.setHeading("Internal Attributes");
internalCp.setCollapsible(true);
internalCp.add(internalPanel);
ContentPanel attrCp = new ContentPanel();
ToolBar toolbar = new ToolBar();
attrCp.setTopComponent(toolbar);
toolbar.add(new FillToolItem());
toolbar.add(new TextToolItem("Ok"));
toolbar.add(new TextToolItem("Cancel"));
attrCp.setLayout(new FitLayout());
attrCp.setScrollMode(Scroll.ALWAYS);
attrCp.setLayoutOnChange(true);
attrCp.setCollapsible(true);
attrCp.add(ciPanel);
attrCp.setHeading("Attributes");
TabPanel infoTab = new TabPanel();
descriptionTab = new TabItem("Description");
descriptionTab.setStyleName("property-panel-background");
infoTab.add(descriptionTab);
historyTab = new TabItem("History");
historyTab.setStyleName("property-panel-background");
infoTab.add(historyTab);
BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
centerData.setMargins(new Margins(0, 5, 0, 5));
/*
BorderLayoutData northData = new BorderLayoutData(LayoutRegion.NORTH);
northData.setSplit(false);
northData.setCollapsible(true);
northData.setMargins(new Margins(5));
*/
BorderLayoutData southData = new BorderLayoutData(LayoutRegion.SOUTH, 0.3f);
southData.setSplit(true);
southData.setCollapsible(true);
southData.setMargins(new Margins(5));
LayoutContainer fieldCont = new LayoutContainer();
fieldCont.setLayout(new RowLayout());
fieldCont.add(internalCp, new RowData(1,-1));
fieldCont.add(attrCp, new RowData(1,1));
add(fieldCont, centerData);
add(infoTab, southData);
layout();
}
开发者ID:luox12,项目名称:onecmdb,代码行数:81,代码来源:CIValueForm.java
示例10: initUI
import com.extjs.gxt.ui.client.util.Margins; //导入依赖的package包/类
public void initUI() {
setLayout(new BorderLayout());
// ContentPanels
final ContentPanel center = new ContentPanel();
center.setLayout(new FitLayout());
ContentPanel west = new ContentPanel();
// Create a tree.
TreeStore<BaseModel> store = new TreeStore<BaseModel>();
Tree tree = new Tree();
TreeBinder binder = new TreeBinder(tree, store);
binder.setDisplayProperty("name");
tree.addListener(Events.SelectionChange, new Listener<TreeEvent>() {
public void handleEvent(TreeEvent te) {
TreeItem item = te.tree.getSelectedItem();
if (item != null) {
BaseModel model = (BaseModel) item.getModel();
Object obj = model.get("object");
if (obj != null) {
Widget edit = getEditor(obj);
center.removeAll();
center.add(edit);
center.layout();
}
}
}
});
west.add(tree);
BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
centerData.setMargins(new Margins(5, 0, 5, 0));
BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST, 200);
westData.setSplit(true);
westData.setCollapsible(true);
westData.setMargins(new Margins(5));
add(west, westData);
add(center, centerData);
layout();
populateTree(store);
}
开发者ID:luox12,项目名称:onecmdb,代码行数:54,代码来源:GroupEditor.java
示例11: init
import com.extjs.gxt.ui.client.util.Margins; //导入依赖的package包/类
public void init() {
setLayout(new BorderLayout());
CITemplateBrowser browser = new CITemplateBrowser(mdr, roots);
//browser.setPermissions(permissions);
//browser.setReadonly(readonly);
//final CIInstanceBrowser center = new CIInstanceBrowser(mdr);
final LayoutContainer center = new LayoutContainer();
center.setLayout(new FitLayout());
center.setLayoutOnChange(true);
browser.setSelectionListsner(new Listener<TreeEvent>() {
public void handleEvent(TreeEvent te) {
TreeItem item = te.tree.getSelectedItem();
if (item != null) {
if (item.getModel() instanceof CIModel) {
final CIModel model = (CIModel)item.getModel();
/*
center.setRoot(model);
center.start();
*/
center.removeAll();
ContentData cd = new ContentData();
cd.set("template", model.getAlias());
EditableCIInstanceGrid grid = new EditableCIInstanceGrid(mdr, cd, model.getNameAndIcon());
if (roots != null && roots.contains("Root")) {
grid.setRootCI("Root");
}
grid.setPermissions(permissions);
//grid.setReadonly(readonly);
center.add(grid);
}
//Info.display("Selection Changed", "The '{0}' item was selected", item.getText());
}
}
});
ContentPanel left = new ContentPanel();
left.setScrollMode(Scroll.AUTO);
left.setHeading("Template(s)");
left.setLayout(new FitLayout());
left.setLayoutOnChange(true);
left.add(browser);
BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
centerData.setMargins(new Margins(5, 0, 5, 0));
BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST, 200);
westData.setSplit(true);
westData.setCollapsible(true);
westData.setMargins(new Margins(5));
add(left, westData);
add(center, centerData);
layout();
}
开发者ID:luox12,项目名称:onecmdb,代码行数:66,代码来源:CIModelBrowser.java
示例12: BorderLayoutTest
import com.extjs.gxt.ui.client.util.Margins; //导入依赖的package包/类
public BorderLayoutTest() {
setLayout(new BorderLayout());
setLayoutOnChange(true);
LayoutContainer north = new LayoutContainer();
ContentPanel west = new ContentPanel();
ContentPanel center = new ContentPanel();
ContentPanel east = new ContentPanel();
LayoutContainer south = new LayoutContainer();
BorderLayoutData northData = new BorderLayoutData(LayoutRegion.NORTH, 50);
northData.setCollapsible(false);
//northData.setFloatable(false);
//northData.setSplit(false);
northData.setMargins(new Margins(5, 5, 0, 5));
BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST, 200);
westData.setSplit(true);
westData.setCollapsible(true);
westData.setMargins(new Margins(5));
BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
centerData.setMargins(new Margins(5, 0, 5, 0));
BorderLayoutData eastData = new BorderLayoutData(LayoutRegion.EAST, 200);
eastData.setSplit(true);
eastData.setCollapsible(true);
eastData.setMargins(new Margins(5));
BorderLayoutData southData = new BorderLayoutData(LayoutRegion.SOUTH, 50);
//southData.setSplit(false);
southData.setCollapsible(false);
//southData.setFloatable(false);
southData.setMargins(new Margins(0, 5, 5, 5));
add(north, northData);
add(west, westData);
add(center, centerData);
add(east, eastData);
add(south, southData);
}
开发者ID:luox12,项目名称:onecmdb,代码行数:45,代码来源:BorderLayoutTest.java
示例13: toMargins
import com.extjs.gxt.ui.client.util.Margins; //导入依赖的package包/类
/**
* Merges the given {@code margins} instance(s) into a new {@link com.extjs.gxt.ui.client.util.Margins Margins}.
*
* @param margins
* The {@link Margin} instance(s) (may be {@code null}).
* {@code null} values are ignored.
* @return The merged {@link com.extjs.gxt.ui.client.util.Margins Margins} result, never {@code null}.
* @see com.extjs.gxt.ui.client.util.Margins
*/
private static Margins toMargins(final Margin... margins) {
final Margins result = new Margins(0);
if (margins == null) {
return result;
}
for (final Margin margin : margins) {
if (margin == null) {
continue;
}
switch (margin) {
case TOP:
result.top += DEFAULT_MARGIN;
break;
case RIGHT:
result.right += DEFAULT_MARGIN;
break;
case BOTTOM:
result.bottom += DEFAULT_MARGIN;
break;
case LEFT:
result.left += DEFAULT_MARGIN;
break;
case HALF_TOP:
result.top += DEFAULT_MARGIN / 2;
break;
case HALF_RIGHT:
result.right += DEFAULT_MARGIN / 2;
break;
case HALF_BOTTOM:
result.bottom += DEFAULT_MARGIN / 2;
break;
case HALF_LEFT:
result.left += DEFAULT_MARGIN / 2;
break;
case DOUBLE_TOP:
result.top += DEFAULT_MARGIN * 2;
break;
case DOUBLE_RIGHT:
result.right += DEFAULT_MARGIN * 2;
break;
case DOUBLE_BOTTOM:
result.bottom += DEFAULT_MARGIN * 2;
break;
case DOUBLE_LEFT:
result.left += DEFAULT_MARGIN * 2;
break;
}
}
return result;
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:78,代码来源:Layouts.java
示例14: createWest
import com.extjs.gxt.ui.client.util.Margins; //导入依赖的package包/类
private void createWest(LayoutContainer view) {
// main > view > menu
LayoutContainer menu = new LayoutContainer();
menu.setId("app-main-menu");
menu.setLayout(new FitLayout());
BorderLayoutData westData = new BorderLayoutData(Style.LayoutRegion.WEST, 0.25f);
westData.setMargins(new Margins(0, 0, 0, 0));
view.add(menu, westData);
// dummy tree menu
TreeStore<MenuModel> store = new TreeStore<MenuModel>();
store.add(new MenuModel("1", "Home", true), false);
store.add(new MenuModel("2", "Reports", true), false);
MenuModel networkMenu = new MenuModel("3", "Networks", true);
networkMenu.add(new MenuModel("2.1", "My Networks", true));
networkMenu.add(new MenuModel("2.2", "Deployment", true));
networkMenu.add(new MenuModel("2.3", "Settings", true));
MenuModel backupMenu = new MenuModel("3", "Backup", true);
backupMenu.add(new MenuModel("3.1", "My Computers", true));
backupMenu.add(new MenuModel("3.2", "Deployment", true));
store.add(networkMenu, true);
store.add(backupMenu, true);
LayoutContainer menuPanel = new LayoutContainer();
menuPanel.setId("app-main-menu-panel");
menuPanel.setLayout(new FitLayout());
List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
ColumnConfig column = new ColumnConfig();
column.setRenderer(new TreeGridCellRenderer<MenuModel>());
column.setId(MenuModel.NAME);
column.setHeader("");
column.setWidth(200);
configs.add(column);
final ColumnModel cm = new ColumnModel(configs);
TreeGrid<MenuModel> tree = new TreeGrid<MenuModel>(store, cm);
tree.setId("app-main-menu-tree");
tree.getView().setForceFit(true);
tree.setAutoExpandColumn(MenuModel.NAME);
tree.setTrackMouseOver(false);
tree.setHideHeaders(true);
tree.setBorders(false);
tree.getSelectionModel().setSelectionMode(Style.SelectionMode.SINGLE);
tree.setAutoExpand(true);
menuPanel.add(tree);
menu.add(menuPanel);
}
开发者ID:rafizanbaharum,项目名称:cfi-gov,代码行数:51,代码来源:FinanceView.java
示例15: createContents
import com.extjs.gxt.ui.client.util.Margins; //导入依赖的package包/类
/**
* Builds the UI
*/
private void createContents()
{
setSize("254", "100");
setMinimizable(true);
setHeading("Alliance Search");
setLayout(new RowLayout(Orientation.VERTICAL));
this.frmSearch = new FormPanel();
this.frmSearch.setBodyBorder(false);
this.frmSearch.setLabelWidth(35);
this.frmSearch.setHeaderVisible(false);
this.frmSearch.setHeading("New FormPanel");
this.btnSearch = new Button("Search");
this.btnSearch.addSelectionListener(new SelectionListener<ButtonEvent>()
{
public void componentSelected(ButtonEvent ce)
{
executeSearch();
}
});
this.btnSearch.setTabIndex(2);
this.frmSearch.addButton(btnSearch);
this.btnSearch.setWidth("68px");
this.cboAllianceName = new ComboBox<BeanModel>();
this.cboAllianceName.setTabIndex(1);
this.cboAllianceName.setStore(new ListStore<BeanModel>());
cboAllianceName.setMessageTarget("tooltip");
cboAllianceName.setAllowBlank(false);
cboAllianceName.setTriggerAction(TriggerAction.ALL);
cboAllianceName.setSelectOnFocus(true);
cboAllianceName.setForceSelection(true);
cboAllianceName.setTypeAheadDelay(100);
cboAllianceName.setTypeAhead(true);
cboAllianceName.addListener(Events.KeyPress, new Listener<FieldEvent>()
{
@Override
public void handleEvent(FieldEvent e)
{
if (e.getKeyCode() == KeyCodes.KEY_ENTER)
{
executeSearch();
}
}
});
this.frmSearch.add(this.cboAllianceName, new FormData("100%"));
this.cboAllianceName.setFieldLabel("Name");
add(this.frmSearch, new RowData(Style.DEFAULT, 1.0, new Margins()));
}
开发者ID:recon-null,项目名称:eve_finger,代码行数:57,代码来源:WinSearchAlliance.java
示例16: createContents
import com.extjs.gxt.ui.client.util.Margins; //导入依赖的package包/类
/**
* Builds the UI
*/
private void createContents()
{
setSize("254", "100");
setMinimizable(true);
setHeading("Character Search");
setLayout(new RowLayout(Orientation.VERTICAL));
this.frmSearch = new FormPanel();
this.frmSearch.setBodyBorder(false);
this.frmSearch.setLabelWidth(35);
this.frmSearch.setHeaderVisible(false);
this.frmSearch.setHeading("New FormPanel");
this.txtCharName = new TextField<String>();
this.txtCharName.setSelectOnFocus(true);
this.txtCharName.addListener(Events.KeyPress, new Listener<FieldEvent>() {
public void handleEvent(FieldEvent e)
{
if (e.getKeyCode() == KeyCodes.KEY_ENTER)
{
executeSearch();
}
}
});
this.txtCharName.setTabIndex(1);
this.frmSearch.add(this.txtCharName, new FormData("100%"));
this.txtCharName.setFieldLabel("Name");
this.btnSearch = new Button("Search");
this.btnSearch.addSelectionListener(new SelectionListener<ButtonEvent>()
{
public void componentSelected(ButtonEvent ce)
{
executeSearch();
}
});
this.btnSearch.setTabIndex(2);
this.frmSearch.addButton(btnSearch);
this.btnSearch.setWidth("68px");
add(this.frmSearch, new RowData(Style.DEFAULT, 1.0, new Margins()));
}
开发者ID:recon-null,项目名称:eve_finger,代码行数:47,代码来源:WinSearchChar.java
示例17: createContents
import com.extjs.gxt.ui.client.util.Margins; //导入依赖的package包/类
/**
* Builds the GUI.
*/
private void createContents()
{
setModal(true);
setBlinkModal(false);
this.setClosable(false);
this.setSize("300px", "125px");
this.setHeading("Login");
this.setLayout(new RowLayout(Orientation.VERTICAL));
frmLogin = new FormPanel();
frmLogin.setBodyBorder(false);
frmLogin.setHeaderVisible(false);
frmLogin.setHeading("");
this.txtUsername = new TextField<String>();
this.txtUsername.setId("username");
this.txtUsername.setSelectOnFocus(true);
this.txtUsername.setTabIndex(1);
this.txtUsername.setMaxLength(50);
frmLogin.add(txtUsername, new FormData("100%"));
this.txtUsername.setFieldLabel("Username");
this.txtPassword = new TextField<String>();
this.txtPassword.setId("passwd");
this.txtPassword.addListener(Events.KeyPress, new Listener<FieldEvent>() {
public void handleEvent(FieldEvent e)
{
if (e.getKeyCode() == KeyCodes.KEY_ENTER)
{
executeLogin();
}
}
});
this.txtPassword.setMaxLength(50);
this.txtPassword.setTabIndex(2);
this.txtPassword.setSelectOnFocus(true);
this.txtPassword.setPassword(true);
frmLogin.add(txtPassword, new FormData("100%"));
this.txtPassword.setFieldLabel("Password");
btnLogin = new Button("Login");
frmLogin.addButton(btnLogin);
btnLogin.addSelectionListener(new SelectionListener<ButtonEvent>()
{
public void componentSelected(ButtonEvent ce)
{
executeLogin();
}
});
btnLogin.setTabIndex(3);
this.add(frmLogin, new RowData(1.0, 1.0, new Margins()));
}
开发者ID:recon-null,项目名称:eve_finger,代码行数:57,代码来源:WinLogin.java
示例18: setupPanelLayout
import com.extjs.gxt.ui.client.util.Margins; //导入依赖的package包/类
private void setupPanelLayout(LayoutRegion pos) {
if( formPanel.getFields().size() > 0 ){
formPanel.clear();
}
else {
formPanel.setHeading(Resources.constants.Comment_replyCommentHead());
userNameField = CommentForm.getUserNameField();
userNameField.setFieldLabel(Resources.constants.CommentList_userName());
userNameField.setReadOnly(true);
formPanel.add(userNameField);
emailField = CommentForm.getEmailField();
emailField.setFieldLabel(Resources.constants.Comment_email());
emailField.setReadOnly(true);
formPanel.add(emailField);
TextArea contentField = CommentForm.getContentField(Resources.constants.Comment_replyContent()+":");
contentField.setHeight("60px");
contentField.setWidth("180px");
contentField.setFieldLabel(Resources.constants.Comment_replyContent());
contentField.setValue("");
formPanel.add(contentField);
ipAddressField = CommentForm.getIpAddressField();
ipAddressField.setVisible(false);
formPanel.add(ipAddressField);
}
RemoteService.getSpecialService().getAdminUserInfo(new AsyncCallback<Map<String,String>>(){
public void onFailure(Throwable caught) {
caught.printStackTrace();
Window.alert("ERROR: "+caught.getMessage());
}
public void onSuccess(Map<String, String> result) {
userNameField.setValue(result.get(IAdminUser.NAME));
emailField.setValue(result.get(IAdminUser.EMAIL));
ipAddressField.setValue(result.get(IComment.IPADDRESS));
formPanel.repaint();
}
});
BorderLayoutData formData = new BorderLayoutData(pos, 250);
formData.setMargins(new Margins(5, 0, 5, 0));
basePanel.add( formPanel ,formData);
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:52,代码来源:CommentPanel.java
示例19: initUI
import com.extjs.gxt.ui.client.util.Margins; //导入依赖的package包/类
public void initUI() {
ContentPanel panel = new ContentPanel();
panel.setLayout(new BorderLayout());
// Left panel a navigation tree.
PropertyNavigationTree tree = new PropertyNavigationTree(null, "name");
// Right panel input forms.
//PropetyInputForm inpoutForm = new PropertyInputForm();
ContentPanel center = new ContentPanel();
ToolBar toolBar = new ToolBar();
toolBar.add(new FillToolItem());
toolBar.add(new TextToolItem("Save"));
toolBar.add(new TextToolItem("Cancel"));
center.setBottomComponent(toolBar);
// Layout the components.
BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
centerData.setMargins(new Margins(5, 0, 5, 0));
BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST, 200);
westData.setSplit(true);
westData.setCollapsible(true);
westData.setMargins(new Margins(5));
add(tree, westData);
add(center, centerData);
}
开发者ID:luox12,项目名称:onecmdb,代码行数:38,代码来源:PropertyWidget.java
注:本文中的com.extjs.gxt.ui.client.util.Margins类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论