当前位置: 首页>>代码示例>>Java>>正文


Java FormLayout.setDefaultWidth方法代码示例

本文整理汇总了Java中com.extjs.gxt.ui.client.widget.layout.FormLayout.setDefaultWidth方法的典型用法代码示例。如果您正苦于以下问题:Java FormLayout.setDefaultWidth方法的具体用法?Java FormLayout.setDefaultWidth怎么用?Java FormLayout.setDefaultWidth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.extjs.gxt.ui.client.widget.layout.FormLayout的用法示例。


在下文中一共展示了FormLayout.setDefaultWidth方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initUI

import com.extjs.gxt.ui.client.widget.layout.FormLayout; //导入方法依赖的package包/类
private void initUI() {
	// ID. (R)
	// DisplayName (R)
	// DerivedFrom Path. (R)
	// CreateDate (R)
	// LastModififed (R)
	
	// Alias (R/W)
	// DisplayNameExpr (R/W)
	// GID (R/W)
	// Description (R/W)
	setLayout(new FlowLayout());
	/*
	Label label = new Label("DerivedPath: Ci/Test/Test2/Test3");
	label.setHeight("20px");
	add(label);
	*/
	setStyleName("ci-id-panel");
		
	FormPanel form2 = new FormPanel(); 
	
	form2.setFrame(false);  
	form2.setHeaderVisible(false);
	//form2.setHeading("Identification");  
	form2.setLayout(new FlowLayout()); 
	//form2.setCollapsible(true);  
	form2.setSize(-1, 180);
	form2.setLabelWidth(60);
	form2.setFieldWidth(100);
	
	LayoutContainer main = new LayoutContainer();  
	main.setLayout(new ColumnLayout());
	main.setSize(700, 180);
	
	LayoutContainer left = new LayoutContainer();  
	FormLayout layout = new FormLayout();  
	layout.setLabelAlign(LabelAlign.LEFT);  
	layout.setDefaultWidth(180);
	left.setLayout(layout); 
	
	
	FormLayout rightLayout = new FormLayout();  
	rightLayout.setLabelAlign(LabelAlign.LEFT);
	rightLayout.setDefaultWidth(150);
	left.setLayout(layout); 
	
	LayoutContainer right = new LayoutContainer();  
	right.setLayout(rightLayout); 
	
	getInternalModifyFieldSet(left);
	getInternalReadOnlyFieldSet(right);
	left.layout();
	main.add(left, new ColumnData(.5));
	main.add(right, new ColumnData(.5));
	
	form2.add(main);
	/*
	form2.setButtonAlign(HorizontalAlignment.LEFT);
	form2.addButton(new Button("Cancel"));  
	form2.addButton(new Button("Submit"));  
	*/
	add(form2);
	
	layout();
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:66,代码来源:CIIdentityForm.java

示例2: showRPCException

import com.extjs.gxt.ui.client.widget.layout.FormLayout; //导入方法依赖的package包/类
public static void showRPCException(CMDBRPCException e, Listener<WindowEvent> callback) {
	Dialog d = new Dialog();
	d.setLayout(new FitLayout());
	
	//FormPanel form = new FormPanel();
	LayoutContainer area = new LayoutContainer();  
	area.setStyleAttribute("padding", "0 10px 5px 10px");  
	//area.setWidth(450);  
	FormLayout layout = new FormLayout();  
	layout.setLabelAlign(LabelAlign.TOP);
	layout.setDefaultWidth(380);
	area.setLayout(layout);
	
	d.setHeading(e.getHeader());
	
	LabelField field = new LabelField("<b>Received an error from server.<b>");
	
	TextArea stackTrace = new TextArea();
	stackTrace.setFieldLabel("Stacktrace");
	stackTrace.setValue(e.getRemoteStackTrace());
	stackTrace.setReadOnly(true);
	stackTrace.setHeight(200);
	
	TextArea info = new TextArea();
	info.setFieldLabel("Error");
	info.setHeight(60);
	info.setReadOnly(true);
	info.setValue(e.getMessage());
		
	area.add(field);
	area.add(info);
	area.add(stackTrace);
	d.add(area);
	d.setSize(430, 430);
	d.layout();
	d.setHideOnButtonClick(true);
	d.show();
	
	
	/*
	MessageBox box = MessageBox.prompt(title, t.getMessage(), true);
	box.getTextArea().setValue(t.toString());
	*/
	//MessageBox.alert(e.getHeader(), e.getMessage() + "<br>" + e.getRemoteStackTrace(), callback);  
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:46,代码来源:ExceptionErrorDialog.java

示例3: LoginWidget

import com.extjs.gxt.ui.client.widget.layout.FormLayout; //导入方法依赖的package包/类
/**
 * Instantiates a new login widget.
 */
public LoginWidget()
{
    FormLayout layout = new FormLayout();
    layout.setLabelWidth(90);
    layout.setDefaultWidth(175);
    setLayout(layout);

    setButtonAlign(HorizontalAlignment.LEFT);
    setButtons("");
    setIcon(Resources.ICONS.user());
    setHeading(I18nProvider.getMessages().loginWidgetTitle());
    setModal(true);
    setBodyBorder(true);
    setBodyStyle("padding: 8px;background: none");
    setWidth(320);
    setResizable(false);
    setClosable(false);

    KeyListener keyListener = new KeyListener()
        {
            @Override
            public void componentKeyUp(ComponentEvent event)
            {
                if (userName.isDirty() || password.isDirty())
                {
                    boolean loginInfoOk = validate();

                    if (loginInfoOk && (event.getKeyCode() == '\r'))
                    {
                        event.cancelBubble();
                        onSubmit();
                    }
                }
            }
        };

    userName = new TextField<String>();
    userName.setMinLength(USERNAME_MIN_LENGTH);
    userName.setFieldLabel(I18nProvider.getMessages().usernameLabel());
    userName.addKeyListener(keyListener);
    add(userName);

    password = new TextField<String>();
    password.setMinLength(PASSWORD_MIN_LENGTH);
    password.setPassword(true);
    password.setFieldLabel(I18nProvider.getMessages().passwordLabel());
    password.addKeyListener(keyListener);
    add(password);

    setFocusWidget(userName);
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:55,代码来源:LoginWidget.java


注:本文中的com.extjs.gxt.ui.client.widget.layout.FormLayout.setDefaultWidth方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。