• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java LabelField类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: PageSizePagingToolBar

import com.extjs.gxt.ui.client.widget.form.LabelField; //导入依赖的package包/类
public PageSizePagingToolBar(int pageSize) {
	super(pageSize);
	add(new SeparatorToolItem());
	pageSizeField = new TextField<String>();
	pageSizeField.setWidth(30);
	pageSizeField.setValue("" + pageSize);
	pageSizeField.addKeyListener(new KeyListener() {

		@Override
		public void componentKeyUp(ComponentEvent event) {
			if (event.getKeyCode() ==  KeyboardListener.KEY_ENTER) {
				refresh();
			}
		}
		
	});
	add(new AdapterToolItem(pageSizeField));
	add(new AdapterToolItem(new LabelField("Page Size")));
	//add(new AdapterToolItem(getSecurityGroupCombo()));
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:21,代码来源:PageSizePagingToolBar.java


示例2: render

import com.extjs.gxt.ui.client.widget.form.LabelField; //导入依赖的package包/类
public Object render(final RuleModel model, String property,
                ColumnData config, int rowIndex, int colIndex,
                ListStore<RuleModel> store, Grid<RuleModel> grid) {

            if (!init) {
                init = true;
                grid.addListener(Events.ColumnResize, new ResizeListener(20));
            }

            LabelField field = new LabelField();
            field.setId(fieldId);
            field.setName(fieldId);
            field.setEmptyText("*");
            field.setFieldLabel(BeanKeyValue.NAME.getValue());
            field.setValue(BeanKeyValue.NAME.getValue());
            field.setReadOnly(true);

//            field.setWidth(initialWidth - 10);
            field.setAutoWidth(true);
            field.show();

            setFieldValue(model, field);
            
            return field;
        }
 
开发者ID:geoserver,项目名称:geofence,代码行数:26,代码来源:RuleGridWidget.java


示例3: buildDateField

import com.extjs.gxt.ui.client.widget.form.LabelField; //导入依赖的package包/类
/**
 * Creates a date field. <br/>
 * This method is shared between the start date and the end date fields.
 *
 * @param label   Label of the field.
 * @param value   Current value.
 * @param enabled <code>true</code> if the field must be editable, <code>false</code> otherwise.
 * @return A new date field.
 */
protected Field<?> buildDateField(String label, Date value, boolean enabled) {
  final Field<?> field;

  // Builds the field and sets its value.
  if (enabled) {
    final DateField dateField = createDateField(true);
    dateField.setValue(value);
    field = dateField;

  } else {
    final LabelField labelField = createLabelField();
    if (value != null) {
      labelField.setValue(DateUtils.DATE_SHORT.format(value));
    } else {
      labelField.setValue(EMPTY_VALUE);
    }
    field = labelField;
  }

  // Sets the field label.
  setLabel(label);
  field.setFieldLabel(getLabel());

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


示例4: buildTopMembershipField

import com.extjs.gxt.ui.client.widget.form.LabelField; //导入依赖的package包/类
private Field<?> buildTopMembershipField(final String topMembershipId) {
  final LabelField labelField = createLabelField();
  dispatch.execute(new GetContact(Integer.parseInt(topMembershipId), ContactDTO.Mode.BASIC_INFORMATION), new AsyncCallback<ContactDTO>() {
    @Override
    public void onFailure(Throwable caught) {
      Log.error("Error while getting contact " + topMembershipId + ".", caught);
    }

    @Override
    public void onSuccess(ContactDTO contactDTO) {
      if (contactDTO != null) {
        labelField.setValue(contactDTO.getFullName());
      } else {
        labelField.setValue(EMPTY_VALUE);
      }
    }
  });
  // Sets the field label.
  setLabel(I18N.CONSTANTS.contactTopMembership());
  labelField.setFieldLabel(getLabel());

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


示例5: addLabelField

import com.extjs.gxt.ui.client.widget.form.LabelField; //导入依赖的package包/类
/**
 * Adds a label field in the window.
 * 
 * @param fieldLabelString
 *          The label of the date field. Can be <code>null</code>.
 * @return The field.
 */
public LabelField addLabelField(String fieldLabelString) {

	// Lazy building.
	if (window == null) {
		init();
	}

	// Builds the text field.
	final LabelField field = new LabelField();
	field.setFieldLabel(fieldLabelString);

	fields.add(new FieldWrapper(field, true));

	addField(field, fieldLabelString);

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


示例6: LabelButtonField

import com.extjs.gxt.ui.client.widget.form.LabelField; //导入依赖的package包/类
/**
 * Initializes a new {@code TextButtonField} field instance with multiple text fields.
 *
 * @param fieldLabel
 *          The field label.
 */
public LabelButtonField(String fieldLabel) {

	labelField = new LabelField();

	button = Forms.button(I18N.CONSTANTS.formWindowListEmptyText());
	button.setAutoWidth(true);
	buttonAdapter = Forms.adapter(fieldLabel, button);

	if (ClientUtils.isNotBlank(fieldLabel)) {
		setFieldLabel(fieldLabel);
	} else {
		setLabelSeparator("");
	}

	setSpacing(7);

	add(labelField);
	add(buttonAdapter);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:26,代码来源:LabelButtonField.java


示例7: buildCurrentRegionLabel

import com.extjs.gxt.ui.client.widget.form.LabelField; //导入依赖的package包/类
private void buildCurrentRegionLabel(){
	currentRegionPanel = new ContentPanel();
	currentRegionPanel.setHeaderVisible(false);
	TableRowLayout tableLayout = new TableRowLayout();
	tableLayout.setWidth("100%");
	tableLayout.setBorder(0);
	tableLayout.setCellHorizontalAlign(HorizontalAlignment.CENTER);
	tableLayout.setCellVerticalAlign(VerticalAlignment.BOTTOM);
	
	currentRegionPanel.setLayout(tableLayout);
	currentRegionPanel.setHeight(40);
	
	current_Label = new LabelField();
	
	current_name = RegionForm.getHiddenNameField();
	current_type = RegionForm.getTypeField();
	
	currentRegionPanel.add(current_Label);
	currentRegionPanel.add(current_name);
	currentRegionPanel.add(current_type);

	super.add(currentRegionPanel);
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:24,代码来源:RegionPanel.java


示例8: setFieldValue

import com.extjs.gxt.ui.client.widget.form.LabelField; //导入依赖的package包/类
void setFieldValue(RuleModel model, LabelField field) {
    if ((model.getUsername() != null)) {
        String name2 = model.getUsername();
        field.setValue(name2);
    } else {
        field.setValue("*");
    }
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:9,代码来源:RuleGridWidget.java


示例9: createLabelField

import com.extjs.gxt.ui.client.widget.form.LabelField; //导入依赖的package包/类
/**
 * Create a label field to represent a default flexible element.
 *
 * @return The label field.
 */
protected LabelField createLabelField() {

  final LabelField labelField = new LabelField();
  labelField.setLabelSeparator(":");

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


示例10: buildCountryField

import com.extjs.gxt.ui.client.widget.form.LabelField; //导入依赖的package包/类
protected Component buildCountryField(String country, boolean enabled) {
  final Field<?> field = buildCountryField((CountryDTO) null, enabled);

  final int countryId = Integer.parseInt(country);

  dispatch.execute(new GetCountry(countryId), new CommandResultHandler<CountryDTO>() {

    @Override
    public void onCommandFailure(final Throwable caught) {
    }

    @Override
    public void onCommandSuccess(final CountryDTO result) {
      // BUGFIX #694: Disable events on first set.
      field.enableEvents(false);

      if (field instanceof ComboBox) {
        ((ComboBox<CountryDTO>) field).setValue(result);

      } else if (field instanceof LabelField) {
        ((LabelField) field).setValue(result.getName());
      }

      field.enableEvents(true);
    }

  });

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


示例11: getComponentInBanner

import com.extjs.gxt.ui.client.widget.form.LabelField; //导入依赖的package包/类
@Override
protected Component getComponentInBanner(ValueResult valueResult) {

	if (currentContainerDTO instanceof DefaultFlexibleElementContainer) {
		container = (DefaultFlexibleElementContainer) currentContainerDTO;
	} else {
		throw new IllegalArgumentException(
			"The flexible elements container isn't an instance of DefaultFlexibleElementContainer. The default flexible element connot be instanciated.");
	}

	Map<Integer, String> values = ValueResultUtils.splitMapElements(valueResult.getValueObject());

	final LabelField budgetLabelField = createLabelField();
	budgetLabelField.setFieldLabel(I18N.CONSTANTS.projectBannerBudget());

	final String dividendValue = values.get(getRatioDividend().getId());
	final String divisorValue = values.get(getRatioDivisor().getId());
	if (dividendValue != null && divisorValue != null) {
		budgetLabelField.setValue(dividendValue + " / " + divisorValue);
	} else {
		budgetLabelField.setValue("0.0 / 0.0");
	}
	final LabelField ratioLabel = Forms.label(I18N.CONSTANTS.adminBudgetRatio());
	String rationBudgetSubFieldNames = "";
	if (getRatioDividend() != null && getRatioDivisor() != null) {
		rationBudgetSubFieldNames = " (" + generateBudgetSubFieldLabel(getRatioDividend()) + " / " + generateBudgetSubFieldLabel(getRatioDivisor()) + ")";
	}
	if (values.get(getRatioDividend().getId()) != null && values.get(getRatioDivisor().getId()) != null) {
		ratioLabel.setValue(NumberUtils.ratioAsString(Double.valueOf(values.get(getRatioDividend().getId())),
			Double.valueOf(values.get(getRatioDivisor().getId())))
			+ rationBudgetSubFieldNames);

	} else {
		ratioLabel.setValue(NumberUtils.ratioAsString(0, 0) + rationBudgetSubFieldNames);
	}
	return budgetLabelField;

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


示例12: buildOwnerField

import com.extjs.gxt.ui.client.widget.form.LabelField; //导入依赖的package包/类
/**
 * Creates the owner field.
 * This field is always read-only.
 * 
 * @param fullName Full name of the owner.
 * @return The owner field.
 */
private Field<?> buildOwnerField(String fullName) {
	final LabelField labelField = createLabelField();

	// Sets the field label.
	setLabel(I18N.CONSTANTS.projectOwner());
	labelField.setFieldLabel(getLabel());

	// Sets the value to the field.
	labelField.setValue(fullName);

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


示例13: buildManagerField

import com.extjs.gxt.ui.client.widget.form.LabelField; //导入依赖的package包/类
/**
 * Creates the manager field.
 * 
 * @param managerId ID of the manager.
 * @param enabled <code>true</code> if the field must be editable, <code>false</code> otherwise.
 * @return The manager field.
 */
private Field<?> buildManagerField(String managerId, boolean enabled) {
	final Field<?> field = buildManagerField((UserDTO) null, enabled);

	final int userId = Integer.parseInt(managerId);
	
	dispatch.execute(new GetUsersByOrganization(auth().getOrganizationId(), userId, null), new CommandResultHandler<ListResult<UserDTO>>() {

		@Override
		public void onCommandFailure(final Throwable caught) {
			// Field is already set to null. Nothing to do.
		}

		@Override
		public void onCommandSuccess(final ListResult<UserDTO> result) {
			// BUGFIX #694: Disable events on first set.
			field.enableEvents(false);
			
			if(!result.isEmpty()) {
				final UserDTO manager = result.getList().get(0);
				
				if(field instanceof ComboBox) {
					((ComboBox<UserDTO>)field).setValue(manager);
					
				} else if(field instanceof LabelField) {
					((LabelField)field).setValue(manager.getFirstName() != null ? manager.getFirstName() + ' ' + manager.getName() : manager.getName());
				}
			}
			
			field.enableEvents(true);
		}

	});

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


示例14: showRPCException

import com.extjs.gxt.ui.client.widget.form.LabelField; //导入依赖的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


示例15: createStyleTextBox

import com.extjs.gxt.ui.client.widget.form.LabelField; //导入依赖的package包/类
/**
 * Creates the style text box.
 * 
 * @return the grid cell renderer
 */
private GridCellRenderer<LayerStyle> createStyleTextBox() {

	GridCellRenderer<LayerStyle> textRendered = new GridCellRenderer<LayerStyle>() {

		private boolean init;

		public Object render(final LayerStyle model, String property,
				ColumnData config, int rowIndex, int colIndex,
				ListStore<LayerStyle> store, Grid<LayerStyle> grid) {

			if (!init) {
				init = true;
				grid.addListener(Events.ColumnResize,
						new Listener<GridEvent<LayerStyle>>() {

							public void handleEvent(GridEvent<LayerStyle> be) {
								for (int i = 0; i < be.getGrid().getStore()
										.getCount(); i++) {
									if ((be.getGrid().getView()
											.getWidget(i, be.getColIndex()) != null)
											&& (be.getGrid()
													.getView()
													.getWidget(
															i,
															be.getColIndex()) instanceof BoxComponent)) {
										((BoxComponent) be
												.getGrid()
												.getView()
												.getWidget(i,
														be.getColIndex()))
												.setWidth(be.getWidth() - 10);
									}
								}
							}
						});
			}

			LabelField styleName = new LabelField();
			styleName.setWidth(150);
			styleName.setReadOnly(true);
			styleName.setValue(model.getStyle());

			return styleName;
		}
	};

	return textRendered;
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:54,代码来源:RuleDetailsGridWidget.java


示例16: createNameTextBox

import com.extjs.gxt.ui.client.widget.form.LabelField; //导入依赖的package包/类
/**
 * Creates the name text box.
 *
 * @return the grid cell renderer
 */
private GridCellRenderer<LayerAttribUI> createNameTextBox()
{

    GridCellRenderer<LayerAttribUI> textRendered = new GridCellRenderer<LayerAttribUI>()
        {

            private boolean init;

            public Object render(final LayerAttribUI model, String property, ColumnData config,
                int rowIndex, int colIndex, ListStore<LayerAttribUI> store, Grid<LayerAttribUI> grid)
            {

                if (!init)
                {
                    init = true;
                    grid.addListener(Events.ColumnResize, new Listener<GridEvent<LayerAttribUI>>()
                        {

                            public void handleEvent(GridEvent<LayerAttribUI> be)
                            {
                                for (int i = 0; i < be.getGrid().getStore().getCount(); i++)
                                {
                                    if ((be.getGrid().getView().getWidget(i, be.getColIndex()) != null) &&
                                            (be.getGrid().getView().getWidget(i, be.getColIndex()) instanceof BoxComponent))
                                    {
                                        ((BoxComponent) be.getGrid().getView().getWidget(i,
                                                be.getColIndex())).setWidth(be.getWidth() - 10);
                                    }
                                }
                            }
                        });
                }

                LabelField attrName = new LabelField();
                attrName.setWidth(150);
                attrName.setReadOnly(true);
                attrName.setValue(model.getName());

                return attrName;
            }
        };

    return textRendered;
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:50,代码来源:LayerAttributesGridWidget.java


示例17: createTypeTextBox

import com.extjs.gxt.ui.client.widget.form.LabelField; //导入依赖的package包/类
/**
 * Creates the type text box.
 *
 * @return the grid cell renderer
 */
private GridCellRenderer<LayerAttribUI> createTypeTextBox()
{

    GridCellRenderer<LayerAttribUI> textRendered = new GridCellRenderer<LayerAttribUI>()
        {

            private boolean init;

            public Object render(final LayerAttribUI model, String property, ColumnData config,
                int rowIndex, int colIndex, ListStore<LayerAttribUI> store, Grid<LayerAttribUI> grid)
            {

                if (!init)
                {
                    init = true;
                    grid.addListener(Events.ColumnResize, new Listener<GridEvent<LayerAttribUI>>()
                        {

                            public void handleEvent(GridEvent<LayerAttribUI> be)
                            {
                                for (int i = 0; i < be.getGrid().getStore().getCount(); i++)
                                {
                                    if ((be.getGrid().getView().getWidget(i, be.getColIndex()) != null) &&
                                            (be.getGrid().getView().getWidget(i, be.getColIndex()) instanceof BoxComponent))
                                    {
                                        ((BoxComponent) be.getGrid().getView().getWidget(i,
                                                be.getColIndex())).setWidth(be.getWidth() - 10);
                                    }
                                }
                            }
                        });
                }

                LabelField attrType = new LabelField();
                attrType.setWidth(150);
                attrType.setReadOnly(true);
                attrType.setValue(model.getDataType());

                return attrType;
            }
        };

    return textRendered;
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:50,代码来源:LayerAttributesGridWidget.java


示例18: createProfileTextBox

import com.extjs.gxt.ui.client.widget.form.LabelField; //导入依赖的package包/类
/**
 * Creates the style text box.
 *
 * @return the grid cell renderer
 */
private GridCellRenderer<UserGroupModel> createProfileTextBox()
{

    GridCellRenderer<UserGroupModel> textRendered = new GridCellRenderer<UserGroupModel>()
        {

            private boolean init;

            public Object render(final UserGroupModel model, String property, ColumnData config,
                int rowIndex, int colIndex, ListStore<UserGroupModel> store, Grid<UserGroupModel> grid)
            {

                if (!init)
                {
                    init = true;
                    grid.addListener(Events.ColumnResize, new Listener<GridEvent<UserGroupModel>>()
                        {

                            public void handleEvent(GridEvent<UserGroupModel> be)
                            {
                                for (int i = 0; i < be.getGrid().getStore().getCount(); i++)
                                {
                                    if ((be.getGrid().getView().getWidget(i, be.getColIndex()) != null) &&
                                            (be.getGrid().getView().getWidget(i, be.getColIndex()) instanceof BoxComponent))
                                    {
                                        ((BoxComponent) be.getGrid().getView().getWidget(i,
                                                be.getColIndex())).setWidth(be.getWidth() - 10);
                                    }
                                }
                            }
                        });
                }

                LabelField profileName = new LabelField();
                profileName.setWidth(150);
                profileName.setReadOnly(true);
                profileName.setValue(model.getName());

                return profileName;
            }
        };

    return textRendered;
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:50,代码来源:ProfilesGridWidget.java


示例19: createGrantsCustomField

import com.extjs.gxt.ui.client.widget.form.LabelField; //导入依赖的package包/类
/**
 * Creates the grants custom field.
 * 
 * @return the grid cell renderer
 */
private GridCellRenderer<RuleModel> createGrantsCustomField() {
	GridCellRenderer<RuleModel> comboRendered = new GridCellRenderer<RuleModel>() {

		private boolean init;

		public Object render(final RuleModel model, String property,
				ColumnData config, int rowIndex, int colIndex,
				ListStore<RuleModel> store, Grid<RuleModel> grid) {

			if (!init) {
				init = true;
				grid.addListener(Events.ColumnResize,
						new Listener<GridEvent<RuleModel>>() {

							public void handleEvent(GridEvent<RuleModel> be) {
								for (int i = 0; i < be.getGrid().getStore()
										.getCount(); i++) {
									if ((be.getGrid().getView()
											.getWidget(i, be.getColIndex()) != null)
											&& (be.getGrid()
													.getView()
													.getWidget(
															i,
															be.getColIndex()) instanceof BoxComponent)) {
										((BoxComponent) be
												.getGrid()
												.getView()
												.getWidget(i,
														be.getColIndex()))
												.setWidth(be.getWidth() - 10);
									}
								}
							}
						});
			}

			// TODO: generalize this!
			LabelField field = new LabelField();
			field.setId("grantsCombo");
			field.setName("grantsCombo");

			field.setFieldLabel(BeanKeyValue.GRANT.getValue());
			field.setReadOnly(false);
			field.setWidth(COLUMN_GRANT_WIDTH - 10);

			if (model.getGrant() != null) {
				field.setValue(model.getGrant());
			} else {
				field.setValue("ALLOW");
			}

			field.setEmptyText("(No grant available)");

			return field;
		}

	};

	return comboRendered;
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:66,代码来源:RuleGridWidget.java


示例20: buildOrgUnitField

import com.extjs.gxt.ui.client.widget.form.LabelField; //导入依赖的package包/类
/**
 * Creates the organization unit field.
 *
 * @param orgUnit Organization unit.
 * @param enabled <code>true</code> if the field must be editable, <code>false</code> otherwise.
 * @return The organization unit field.
 */
protected Field<?> buildOrgUnitField(String label, OrgUnitDTO orgUnit, boolean enabled) {
  final Field<?> field;

  if (enabled) {

    final ComboBox<OrgUnitDTO> comboBox = new ComboBox<OrgUnitDTO>();

    ensureOrgUnitStore();

    comboBox.setStore(orgUnitsStore);
    comboBox.setDisplayField(OrgUnitDTO.COMPLETE_NAME);
    comboBox.setValueField(OrgUnitDTO.ID);
    comboBox.setTriggerAction(ComboBox.TriggerAction.ALL);
    comboBox.setEditable(true);
    comboBox.setAllowBlank(true);

    // BUGFIX #694 : SelectionChangedEvent listener is added AFTER
    // setting the initial value to avoid sending a
    // SelectionChangedEvent during view initialization.
    comboBox.setValue(orgUnit);

    // Listens to the selection changes.
    addOrgUnitSelectionChangedListener(comboBox);

    field = comboBox;

  } else {
    // Builds the field and sets its value.
    final LabelField labelField = createLabelField();
    if(orgUnit != null) {
      labelField.setValue(orgUnit.getName() + " - " + orgUnit.getFullName());
    } else {
      labelField.setValue(EMPTY_VALUE);
    }

    field = labelField;
  }

  // Sets the field label.
  setLabel(label);
  field.setFieldLabel(getLabel());

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java EntityFireball类代码示例发布时间:2022-05-22
下一篇:
Java HeadersFrame类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap