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


Java FormLayout.setLabelWidth方法代码示例

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


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

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

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

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

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

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

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

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

示例11: initialize

import com.extjs.gxt.ui.client.widget.layout.FormLayout; //导入方法依赖的package包/类
/**
 * init panel
 */

@Override
public void initialize() {

	mainPanel = Forms.panel();

	FormLayout layout = new FormLayout();
	layout.setLabelWidth(LABEL_WIDTH);
	mainPanel.setLayout(layout);

	nameField = new TextField<String>();
	nameField.setFieldLabel(I18N.CONSTANTS.importVariableName());
	nameField.setAllowBlank(false);

	referenceField = new TextField<String>();

	// TODO
	/*
	 * switch (type) { case ROW: referenceField.setFieldLabel(I18N.CONSTANTS.adminImportReferenceColumn()); break; case
	 * SEVERAL: referenceField.setFieldLabel(I18N.CONSTANTS.adminImportReferenceCell()); break; case UNIQUE:
	 * referenceField.setFieldLabel(I18N.CONSTANTS.adminImportReferenceSheetCell()); break; default: break; }
	 */

	referenceField.setAllowBlank(false);

	// TODO case Update
	/*
	 * if (variableToUpdate.getId() > 0) { nameField.setValue(variableToUpdate.getName());
	 * referenceField.setValue(variableToUpdate.getReference()); }
	 */

	saveButton = new Button(I18N.CONSTANTS.save(), IconImageBundle.ICONS.save());

	mainPanel.add(referenceField);
	mainPanel.add(nameField);
	mainPanel.add(saveButton);

	initPopup(mainPanel);

}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:44,代码来源:AddVariableImporationSchemeView.java

示例12: initialize

import com.extjs.gxt.ui.client.widget.layout.FormLayout; //导入方法依赖的package包/类
/**
 * Popup initialization.
 */

@Override
public void initialize() {

	formPanel = Forms.panel();
	formPanel.setAutoHeight(true);
	formPanel.setAutoWidth(true);

	FormLayout layout = new FormLayout();
	layout.setLabelWidth(LABEL_WIDTH);
	formPanel.setLayout(layout);

	nameField = new TextField<String>();
	nameField.setFieldLabel(I18N.CONSTANTS.importSchemeName());
	nameField.setAllowBlank(false);

	formPanel.add(nameField);

	fileFormatGroup = new RadioGroup("fileFormat");
	fileFormatGroup.setFieldLabel(I18N.CONSTANTS.importSchemeFileFormat());
	fileFormatGroup.setFireChangeEventOnSetValue(true);

	csvRadio = createRadio(I18N.CONSTANTS.csv(), ImportationSchemeFileFormat.CSV);
	odsRadio = createRadio(I18N.CONSTANTS.ods(), ImportationSchemeFileFormat.ODS);
	excelRadio = createRadio(I18N.CONSTANTS.excel(), ImportationSchemeFileFormat.MS_EXCEL);

	fileFormatGroup.add(csvRadio);
	fileFormatGroup.add(odsRadio);
	fileFormatGroup.add(excelRadio);

	formPanel.add(fileFormatGroup);

	uniqueRadio = createRadio(I18N.CONSTANTS.adminImportSchemeFileImportTypeUnique(), ImportationSchemeImportType.UNIQUE);
	severalRadio = createRadio(I18N.CONSTANTS.adminImportSchemeFileImportTypeSeveral(), ImportationSchemeImportType.SEVERAL);
	lineRadio = createRadio(I18N.CONSTANTS.adminImportSchemeFileImportTypeLine(), ImportationSchemeImportType.ROW);

	importTypeGroup = new RadioGroup("importType");
	importTypeGroup.setFieldLabel(I18N.CONSTANTS.adminImportSchemeFileImportType());
	importTypeGroup.setOrientation(Orientation.VERTICAL);

	importTypeGroup.add(uniqueRadio);
	importTypeGroup.add(severalRadio);
	importTypeGroup.add(lineRadio);

	formPanel.add(importTypeGroup);

	// Create button.
	createButton = new Button(I18N.CONSTANTS.save());

	formPanel.add(createButton);

	initPopup(formPanel);

}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:58,代码来源:AddImportationSchemeView.java

示例13: AddReportPanel

import com.extjs.gxt.ui.client.widget.layout.FormLayout; //导入方法依赖的package包/类
private FieldSet AddReportPanel(){
	FieldSet fieldSet = new FieldSet();  
    fieldSet.setHeadingHtml("Department Month Report");  
    
  
    FormLayout layout = new FormLayout();  
    layout.setLabelWidth(75);  
    fieldSet.setLayout(layout);  
	
    
    
	startingDateField = new DateField();  
	startingDateField.setAllowBlank(false);
	startingDateField.setValue(starting);
	startingDateField.setFieldLabel("Starting");
	fieldSet.add(startingDateField);
	
	finishingDateField = new DateField();  
	finishingDateField.setAllowBlank(false);
	finishingDateField.setValue(finishing);
	finishingDateField.setFieldLabel("Finishing");
	fieldSet.add(finishingDateField);
	
	
	Button export = new Button("Xls export");
	export.setIcon(Resources.ICONS.table()); 
	export.addListener(Events.Select, new Listener<BaseEvent>(){
		@SuppressWarnings("deprecation")
		@Override public void handleEvent(BaseEvent be) {
			if(departmentId == null){
				MessageBox.info("ERORR","Choose Department first",null);
			}else{
			
			Date start  = startingDateField.getValue();
			Date end = finishingDateField.getValue();
			Window.Location.assign(GWT.getHostPageBaseURL().toString() +"quickdepartmentreportbyassignmentandbyuser.htm?department="+
					departmentId+"&s_year="+start.getYear()+"&s_month="+start.getMonth()+
					"&s_day="+start.getDate()+"&e_year="+end.getYear()+"&e_month="
					+end.getMonth()+"&e_day="+end.getDate());
			}		
		}
    });
	
	fieldSet.add(export);
	
	return fieldSet;
}
 
开发者ID:treblereel,项目名称:Opensheet,代码行数:48,代码来源:DepartmentReportContentPanel.java

示例14: getFormLayout

import com.extjs.gxt.ui.client.widget.layout.FormLayout; //导入方法依赖的package包/类
public FormLayout getFormLayout() {
       FormLayout fl = new FormLayout();
       fl.setLabelWidth(150);
       fl.setLabelPad(50);
       return fl;
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:7,代码来源:ArticlePanel.java


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