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


Java FormLayout类代码示例

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


FormLayout类属于com.extjs.gxt.ui.client.widget.layout包,在下文中一共展示了FormLayout类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addComponentToForm

import com.extjs.gxt.ui.client.widget.layout.FormLayout; //导入依赖的package包/类
@Override
public void addComponentToForm()
{
    fieldSet = new FieldSet();
    fieldSet.setHeading("Role Information");

    FormLayout layout = new FormLayout();
    layout.setLabelWidth(80);
    fieldSet.setLayout(layout);

    profileName = new TextField<String>();
    profileName.setAllowBlank(false);
    profileName.setFieldLabel("Role name");
    fieldSet.add(profileName);

    this.formPanel.add(fieldSet);

    addOtherComponents();
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:20,代码来源:AddProfileWidget.java

示例2: addComponentToForm

import com.extjs.gxt.ui.client.widget.layout.FormLayout; //导入依赖的package包/类
@Override
public void addComponentToForm()
{
    fieldSet = new FieldSet();
    fieldSet.setHeading("Instance Information");

    FormLayout layout = new FormLayout();
    layout.setLabelWidth(80);
    fieldSet.setLayout(layout);

    instanceName = new TextField<String>();
    instanceName.setAllowBlank(false);
    instanceName.setFieldLabel("name");
    fieldSet.add(instanceName);

    instanceDescription = new TextField<String>();
    instanceDescription.setAllowBlank(false);
    instanceDescription.setFieldLabel("description");
    fieldSet.add(instanceDescription);

    instanceBaseURL = new TextField<String>();
    instanceBaseURL.setAllowBlank(false);
    instanceBaseURL.setFieldLabel("base url");
    fieldSet.add(instanceBaseURL);

    instanceUsername = new TextField<String>();
    instanceUsername.setAllowBlank(false);
    instanceUsername.setFieldLabel("username");
    fieldSet.add(instanceUsername);

    instancePassword = new TextField<String>();
    instancePassword.setAllowBlank(false);
    instancePassword.setPassword(true);
    instancePassword.setFieldLabel("password");
    fieldSet.add(instancePassword);

    this.formPanel.add(fieldSet);

    addOtherComponents();
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:41,代码来源:AddInstanceWidget.java

示例3: createFormPanel

import com.extjs.gxt.ui.client.widget.layout.FormLayout; //导入依赖的package包/类
/**
 * Creates the form panel.
 */
private void createFormPanel()
{
    formPanel = new FormPanel();
    formPanel.setFrame(true);
    formPanel.setHeaderVisible(false);
    formPanel.setAutoHeight(true);

    FieldSet fieldSet = new FieldSet();
    fieldSet.setHeading("Search Management");
    fieldSet.setCheckboxToggle(false);
    fieldSet.setCollapsible(false);

    FormLayout layout = new FormLayout();
    fieldSet.setLayout(layout);

    search = new Button("Search", new SelectionListener<ButtonEvent>()
            {

                @Override
                public void componentSelected(ButtonEvent ce)
                {
                    Dispatcher.forwardEvent(GeofenceEvents.SHOW_SEARCH_USER_WIDGET);
                }
            });

    ButtonBar bar = new ButtonBar();
    bar.setAlignment(HorizontalAlignment.CENTER);

    bar.add(search);

    Button p = new Button("get AOIs");

    Button q = new Button("get Features");

    bar.add(p);
    bar.add(q);

    fieldSet.add(bar);

    formPanel.add(fieldSet);
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:45,代码来源:UserSearchComponent.java

示例4: getWidget

import com.extjs.gxt.ui.client.widget.layout.FormLayout; //导入依赖的package包/类
public Widget getWidget() {
  final FieldSet fieldSet = new FieldSet();
  fieldSet.setHeadingHtml(getName());
  fieldSet.setCollapsible(true);

  final FormLayout formLayout = new FormLayout();
  formLayout.setLabelWidth(250);

  fieldSet.setLayout(formLayout);

  return fieldSet;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:13,代码来源:LayoutGroupIterationDTO.java

示例5: getWidget

import com.extjs.gxt.ui.client.widget.layout.FormLayout; //导入依赖的package包/类
public Widget getWidget() {
	final FieldSet fieldSet = new FieldSet();
	fieldSet.setHeadingHtml(getTitle());
	fieldSet.setCollapsible(true);

	final FormLayout formLayout = new FormLayout();
	formLayout.setLabelWidth(250);

	fieldSet.setLayout(formLayout);

	return fieldSet;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:13,代码来源:LayoutGroupDTO.java

示例6: getDialog

import com.extjs.gxt.ui.client.widget.layout.FormLayout; //导入依赖的package包/类
private static Dialog getDialog() {
	if (editReportDialog == null) {
		final Dialog dialog = new Dialog();
		dialog.setButtons(Dialog.OKCANCEL);
		dialog.setHeadingText(I18N.CONSTANTS.reportCreateReport());
		dialog.setModal(true);

		dialog.setResizable(false);
		dialog.setWidth("340px");

		dialog.setLayout(new FormLayout());

		// Report name
		final TextField<String> nameField = new TextField<String>();
		nameField.setFieldLabel(I18N.CONSTANTS.reportName());
		nameField.setAllowBlank(false);
		nameField.setName("name");
		dialog.add(nameField);

		// Cancel button
		dialog.getButtonById(Dialog.CANCEL).addSelectionListener(new SelectionListener<ButtonEvent>() {

			@Override
			public void componentSelected(ButtonEvent ce) {
				dialog.hide();
			}
		});

		editReportDialog = dialog;
	}
	return editReportDialog;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:33,代码来源:EditReportDialog.java

示例7: afterRender

import com.extjs.gxt.ui.client.widget.layout.FormLayout; //导入依赖的package包/类
@Override
    protected void afterRender() {
//		super.afterRender();
		//TODO 添加按钮
      super.add(formPanel);
      
      FormLayout fl = new FormLayout();
      fl.setLabelWidth(150);
      fl.setLabelPad(50);
      formPanel.setLayout(fl);
      setupPanelLayout();
     
      btnOk = new Button("确定");
      btnOk.addSelectionListener(selectionListener);
      btnPre = new Button("上一步", new SelectionListener<ButtonEvent>() {
		public void componentSelected(ButtonEvent ce) {
			OrderGoodsPanel.State newState = new OrderGoodsPanel.State();
			newState.setIsEdit(false);
			newState.setUserId(getCurState().getUserId());
			newState.setId(getCurState().getOrderId());
			newState.execute();
		}
      });
      btnNext = new Button("下一步");
      btnNext.addSelectionListener(selectionListener);
      btnCancel = new Button("取消", new SelectionListener<ButtonEvent>() {
		public void componentSelected(ButtonEvent ce) {
			cancel();
		}
      });
      
      formPanel.setButtonAlign(HorizontalAlignment.CENTER);
      formPanel.addButton(btnOk);
      formPanel.addButton(btnPre);
      formPanel.addButton(btnNext);
      formPanel.addButton(btnCancel);
      
	}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:39,代码来源:ConsigneePanel.java

示例8: onRender

import com.extjs.gxt.ui.client.widget.layout.FormLayout; //导入依赖的package包/类
@Override
  protected void onRender(Element parent, int index) {

  	super.onRender(parent, index);
  	basePanel.setLayout(new BorderLayout());
  	basePanel.setStyleAttribute("padding", "10px");
  	super.add(basePanel);

  	FormLayout fl = new FormLayout();
      fl.setLabelWidth(150);
      fl.setLabelPad(50);
  	
  	formPanel.setLayout(fl);
      initCommentLayout();
initReplyLayout();

btnNew.setText(Resources.constants.ok());        
btnReset.setText(Resources.constants.reset());
    
   formPanel.setButtonAlign(HorizontalAlignment.CENTER);
   formPanel.addButton(btnNew);
   formPanel.addButton(btnReset);
     
   btnNew.addSelectionListener(selectionListener);
   btnReset.addSelectionListener(
   	new SelectionListener<ButtonEvent>() {
     		public void componentSelected(ButtonEvent sender) {
     			formPanel.reset();
     		}
     	}
   );
	
    
  }
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:35,代码来源:CommentPanel.java

示例9: afterRender

import com.extjs.gxt.ui.client.widget.layout.FormLayout; //导入依赖的package包/类
@Override
    protected void afterRender() {
    	super.afterRender();

//        add(formPanel);
        super.add(formPanel);
//        formPanel.setBodyBorder(false);
        //formPanel.setWidth(800);
        
        FormLayout fl = new FormLayout();
        fl.setLabelWidth(150);
        fl.setLabelPad(50);
        formPanel.setLayout(fl);
        formPanel.setWidth("100%");

        setupPanelLayout();

      btnNew.setText(Resources.constants.ok());        
      btnReset.setText(Resources.constants.reset());
//      panel.add(btnNew);         
//      panel.add(btnCancel);
      
      formPanel.setButtonAlign(HorizontalAlignment.CENTER);
      formPanel.addButton(btnNew);
      formPanel.addButton(btnReset);
      
      
      btnNew.addSelectionListener(selectionListener);
      
      btnReset.addSelectionListener(
      		new SelectionListener<ButtonEvent>() {
      			public void componentSelected(ButtonEvent sender) {
      				formPanel.reset();
      			}
      		}
      	);
    }
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:38,代码来源:BaseEntityEditPanel.java

示例10: setupArticleContent

import com.extjs.gxt.ui.client.widget.layout.FormLayout; //导入依赖的package包/类
private void setupArticleContent(TabPanel tabs){
	TabItem content = new TabItem();
	content.setStyleAttribute("padding", "10");
	tabs.add(content);
	content.setText(Resources.constants.Article_tabgeneral());
	FormLayout fl = getFormLayout();
	fl.setHideLabels(true);
	content.setLayout(fl);
	HtmlEditor contentField = ArticleForm.getContent();
	contentField.setHeight(300);
	content.add(contentField, lfd());
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:13,代码来源:ArticlePanel.java

示例11: 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

示例12: 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

示例13: addComponentToForm

import com.extjs.gxt.ui.client.widget.layout.FormLayout; //导入依赖的package包/类
@Override
public void addComponentToForm()
{
    fieldSet = new FieldSet();
    fieldSet.setHeading("User Information");

    FormLayout layout = new FormLayout();
    layout.setLabelWidth(80);
    fieldSet.setLayout(layout);

    userName = new TextField<String>();
    userName.setAllowBlank(false);
    userName.setFieldLabel("User name");
    fieldSet.add(userName);

    password = new TextField<String>();
    password.setPassword(true);
    password.setAllowBlank(false);
    password.setFieldLabel("Password");
    fieldSet.add(password);

    fullName = new TextField<String>();
    fullName.setAllowBlank(false);
    fullName.setFieldLabel("Full name");
    fieldSet.add(fullName);

    eMail = new TextField<String>();
    eMail.setAllowBlank(false);
    eMail.setFieldLabel("e-mail");
    fieldSet.add(eMail);

    isAdmin = new CheckBox();
    isAdmin.setFieldLabel("Admin");
    fieldSet.add(isAdmin);

    //createProfilesComboBox();

    this.formPanel.add(fieldSet);

    addOtherComponents();
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:42,代码来源:AddGsUserWidget.java

示例14: 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

示例15: addComponentToForm

import com.extjs.gxt.ui.client.widget.layout.FormLayout; //导入依赖的package包/类
@Override
    public void addComponentToForm()
    {
        fieldSet = new FieldSet();
        fieldSet.setHeading("User Information");

        FormLayout layout = new FormLayout();
        layout.setLabelWidth(150);
        fieldSet.setLayout(layout);

        userName = new TextField<String>();
        userName.setEnabled(false);
        userName.setId(UpdateUserKey.USER_NAME_ID.getValue());
        userName.setName(BeanKeyValue.USER_NAME.getValue());
        userName.setFieldLabel("User Name");
        fieldSet.add(userName);

        email = new TextField<String>();
        email.setFieldLabel("Email");
        email.setId(UpdateUserKey.EMAIL_UPDATE.getValue());
        email.setName(BeanKeyValue.EMAIL.getValue());
        email.setEnabled(false);

        // email.setValidator(new Validator() {
        //
        // public String validate(Field<?> field, String value) {
        // if (((String) field.getValue()).matches("[email protected]+\\.[a-z]+"))
        // return null;
        // return "Email not valid";
        // }
        // });

        fieldSet.add(email);

//        reducedContent = new CheckBox();
//        reducedContent.setId(BeanKeyValue.REDUCED_CONTENT_UPDATE.getValue());
//        reducedContent.setName(BeanKeyValue.REDUCED_CONTENT.getValue());
//        reducedContent.setFieldLabel("Hide Attributions");
//        reducedContent.setWidth(150);
//        reducedContent.setEnabled(true);
//
//        fieldSet.add(reducedContent);

        this.initCombo();

        this.formPanel.add(fieldSet);

    }
 
开发者ID:geoserver,项目名称:geofence,代码行数:49,代码来源:UpdateUserWidget.java


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