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


Java Label类代码示例

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


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

示例1: addField

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

示例2: initialize

import com.extjs.gxt.ui.client.widget.Label; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void initialize() {

	form = Forms.panel();

	headerLabel = new Label(I18N.CONSTANTS.reminderUpdateDetails());
	headerLabel.setStyleName(STYLE_HEADER_LABEL);
	labelField = Forms.text(I18N.CONSTANTS.monitoredPointLabel(), true);
	expectedDateField = Forms.date(I18N.CONSTANTS.monitoredPointExpectedDate(), true);

	saveButton = Forms.button(I18N.CONSTANTS.formWindowSubmitAction(), IconImageBundle.ICONS.save());
	deleteButton = Forms.button(I18N.CONSTANTS.formWindowDeleteAction(), IconImageBundle.ICONS.remove());

	form.add(headerLabel);
	form.add(labelField);
	form.add(expectedDateField);

	form.addButton(deleteButton);
	form.addButton(saveButton);

	initPopup(form);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:26,代码来源:ReminderEditView.java

示例3: addButton

import com.extjs.gxt.ui.client.widget.Label; //导入依赖的package包/类
public void addButton(int value, String text) {
    RadioButton button = new RadioButton(name, text);
    button.addClickHandler(clickHandler);
    
    Choice choice = new Choice();
    choice.button = button;
    choice.text = text;
    choice.value = value;
    buttons.add(choice);
    
    contentPanel.add(button);
    
    Label label = new Label();
    label.setWidth(20);
    contentPanel.add(label);
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:17,代码来源:RadioPanel.java

示例4: updateLinkedProjectsToolbars

import com.extjs.gxt.ui.client.widget.Label; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void updateLinkedProjectsToolbars(final boolean canRelateProject, final boolean canCreateProject) {

	fundingProjectsToolbar.removeAll();
	fundedProjectsToolbar.removeAll();

	final Label fundingTitle = new Label(I18N.CONSTANTS.projectFinancialProjectsHeader());
	fundingTitle.addStyleName(STYLE_TOOLBAR_TITLE);

	final Label fundedTitle = new Label(I18N.CONSTANTS.projectLocalPartnerProjectsHeader());
	fundedTitle.addStyleName(STYLE_TOOLBAR_TITLE);

	fundingProjectsToolbar.add(fundingTitle);
	fundedProjectsToolbar.add(fundedTitle);

	if (canRelateProject) {
		fundingProjectsToolbar.add(new SeparatorToolItem());
		fundedProjectsToolbar.add(new SeparatorToolItem());
		fundingProjectsToolbar.add(fundingProjectsSelectButton);
		fundedProjectsToolbar.add(fundedProjectsSelectButton);
	}

	if (canCreateProject) {
		fundingProjectsToolbar.add(new SeparatorToolItem());
		fundedProjectsToolbar.add(new SeparatorToolItem());
		fundingProjectsToolbar.add(fundingProjectsCreateButton);
		fundedProjectsToolbar.add(fundedProjectsCreateButton);
	}
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:33,代码来源:ProjectDashboardView.java

示例5: initialize

import com.extjs.gxt.ui.client.widget.Label; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void initialize() {

	form = Forms.panel(180);

	headerLabel = new Label(I18N.CONSTANTS.createProjectTypeFunding());
	headerLabel.setStyleName(STYLE_HEADER_LABEL);
	projectsField = Forms.combobox(I18N.CONSTANTS.createProjectTypeFunding(), true, ProjectDTO.ID, ProjectDTO.COMPLETE_NAME, new ListStore<ModelData>());

	projectsField.setTemplate(PROJECTS_LIST_TEMPLATE);

	projectTypeField = Forms.label(I18N.CONSTANTS.createProjectType());
	projectTypeField.setHeight(25);

	amountField = Forms.number(I18N.MESSAGES.projectFundedByDetails(null), true);

	percentageField = Forms.label(I18N.CONSTANTS.createProjectPercentage());

	saveButton = Forms.button(I18N.CONSTANTS.formWindowSubmitAction(), IconImageBundle.ICONS.save());
	deleteButton = Forms.button(I18N.CONSTANTS.formWindowDeleteAction(), IconImageBundle.ICONS.linkDelete());

	form.add(headerLabel);
	form.add(projectsField);
	form.add(projectTypeField);
	form.add(amountField);
	form.add(percentageField);

	form.addButton(deleteButton);
	form.addButton(saveButton);

	initPopup(form);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:36,代码来源:LinkedProjectView.java

示例6: initialize

import com.extjs.gxt.ui.client.widget.Label; //导入依赖的package包/类
@Override
public void initialize() {

	mainPanel = Panels.content("");
	mainPanel.setHeaderVisible(false);

	Label label = new Label(I18N.CONSTANTS.projectCoreSelectVersion());

	mainPanel.add(label);

	amendmentsComboBox1 = new ComboBox<AmendmentDTO>();
	amendmentsComboBox1.setStore(new ListStore<AmendmentDTO>());
	amendmentsComboBox1.setDisplayField("name");
	amendmentsComboBox1.setTriggerAction(ComboBox.TriggerAction.ALL);

	amendmentsComboBox2 = new ComboBox<AmendmentDTO>();
	amendmentsComboBox2.setStore(new ListStore<AmendmentDTO>());
	amendmentsComboBox2.setDisplayField("name");
	amendmentsComboBox2.setTriggerAction(ComboBox.TriggerAction.ALL);

	final LayoutContainer container = Layouts.hBox(HBoxLayoutAlign.TOP);

	container.add(amendmentsComboBox1, Layouts.hBoxData(Margin.LEFT));
	container.add(amendmentsComboBox2, Layouts.hBoxData(Margin.LEFT));

	projectFields = buildGrid();

	mainPanel.setScrollMode(Scroll.AUTO);
	mainPanel.add(container);
	mainPanel.add(projectFields);

	initPopup(mainPanel);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:34,代码来源:ProjectCoreDiffView.java

示例7: getDialog

import com.extjs.gxt.ui.client.widget.Label; //导入依赖的package包/类
private static Dialog getDialog() {

		if (keyQuestionDialog == null) {
			final Dialog dialog = new Dialog();
			dialog.setButtons(Dialog.OKCANCEL);
			dialog.setModal(true);

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

			dialog.setLayout(new RowLayout(Orientation.VERTICAL));

			// Question label
			final Label questionLabel = new Label("key-question");
			questionLabel.addStyleName("project-report-key-question-label");
			dialog.add(questionLabel);

			// Text area
			final RichTextArea textArea = new RichTextArea();
			textArea.setStyleName("project-report-key-question");
			dialog.add(textArea);

			// Toolbar
			final ToolBar toolBar = new ToolBar();
			ReportsView.createRichTextToolbar(toolBar, new RichTextArea.Formatter[] {textArea.getFormatter()});
			dialog.setTopComponent(toolBar);

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

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

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

示例8: getPanel

import com.extjs.gxt.ui.client.widget.Label; //导入依赖的package包/类
private HorizontalPanel getPanel(String label, Label dataLabel) {
	HorizontalPanel hp = new HorizontalPanel();
	HTML title = new HTML("<b>"+label + "</b>:");
	title.setWidth("150");
	hp.add(title);
	hp.add(dataLabel);
	hp.setWidth("500");
	return hp;
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:10,代码来源:OrderDetailPanel.java

示例9: renderFeePanel

import com.extjs.gxt.ui.client.widget.Label; //导入依赖的package包/类
private void renderFeePanel() {
	HorizontalPanel calculateTotalAmountPanel = new HorizontalPanel();
	calculateTotalAmountPanel.add(new Label(Resources.constants.OrderDetail_goodsAmount() + ":"));
	calculateTotalAmountPanel.add(goodsAmountLabel);
	calculateTotalAmountPanel.add(new Label("+" + Resources.constants.OrderDetail_shippingFee() + ":"));
	calculateTotalAmountPanel.add(shippingFeeLabel);
	calculateTotalAmountPanel.add(new Label("+" + Resources.constants.OrderDetail_insuranceFee() + ":"));
	calculateTotalAmountPanel.add(insuranceFeeLabel);
	calculateTotalAmountPanel.add(new Label("+" + Resources.constants.OrderDetail_payFee() + ":"));
	calculateTotalAmountPanel.add(payFeeLabel);
	feePanel.add(calculateTotalAmountPanel);
	
	
	HorizontalPanel totalAmountPanel = new HorizontalPanel();
	totalAmountPanel.add(new Label("=" + Resources.constants.OrderDetail_orderAmount() + ":"));
	totalAmountPanel.add(orderAmountLabel);
	feePanel.add(totalAmountPanel);
	
	HorizontalPanel calculateOrderAmountPanel = new HorizontalPanel();
	calculateOrderAmountPanel.add(new Label("-" + Resources.constants.OrderDetail_moneyPaid() + ":"));
	calculateOrderAmountPanel.add(moneyPaidLabel);
	calculateOrderAmountPanel.add(new Label("-" + Resources.constants.OrderDetail_surplus() + ":"));
	calculateOrderAmountPanel.add(surplusLabel);
	feePanel.add(calculateOrderAmountPanel);
	
	HorizontalPanel orderAmountPanel = new HorizontalPanel();
	orderAmountPanel.add(moneyShouldPayTitle);
	orderAmountPanel.add(moneyShouldPayLabel);
	orderAmountPanel.add(btnRefund);
	feePanel.add(orderAmountPanel);
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:32,代码来源:OrderDetailPanel.java

示例10: onRender

import com.extjs.gxt.ui.client.widget.Label; //导入依赖的package包/类
@Override
	protected void onRender(Element parent, int index) {
		super.onRender(parent, index);
		
		goodsPanel = new ContentPanel();
		renderGoodsPanel();
		add(goodsPanel);
		
		HorizontalPanel selectGoodsPanel = new HorizontalPanel();
		selectGoodsPanel.add(new Label(Resources.constants.OrderGoods_selectGoods() + ":"));
		lbGoods = new ListBox();
		lbGoods.addChangeHandler(new ChangeHandler() {
			public void onChange(ChangeEvent event) {
				selectGoods();
			}
	    });
		selectGoodsPanel.add(lbGoods);
		add(selectGoodsPanel);
		
		goodsInfoPanel = new ContentPanel();
		renderGoodsInfoPanel();
		add(goodsInfoPanel);
		
//		ContentPanel buttonPanel = new ContentPanel();
//		buttonPanel.setButtonAlign(Style.HorizontalAlignment.CENTER);

		
//		buttonPanel.addButton(btnOk);
//		buttonPanel.addButton(btnNext);
//		buttonPanel.addButton(btnCancel);
//		add(buttonPanel);
	}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:33,代码来源:OrderGoodsPanel.java

示例11: addRow

import com.extjs.gxt.ui.client.widget.Label; //导入依赖的package包/类
private void addRow(FlexTable flexTable) {
	int numRows = flexTable.getRowCount();
    flexTable.setWidget(numRows, 0, new Label("数量"));
    flexTable.setWidget(numRows, 1, new TextBox());
    flexTable.setWidget(numRows, 2, new Label("价格"));
    flexTable.setWidget(numRows, 3, new TextBox());
    flexTable.getFlexCellFormatter().setRowSpan(0, 1, numRows + 1);
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:9,代码来源:NewWholesalePanel.java

示例12: addRowWithValue

import com.extjs.gxt.ui.client.widget.Label; //导入依赖的package包/类
private void addRowWithValue(FlexTable flexTable, String key, String value) {
	int numRows = flexTable.getRowCount();
    flexTable.setWidget(numRows, 0, new Label("数量"));
    TextBox keyT = new TextBox();
    keyT.setText(key);
    flexTable.setWidget(numRows, 1, keyT);
    flexTable.setWidget(numRows, 2, new Label("价格"));
    TextBox vT = new TextBox();
    vT.setText(value);
    flexTable.setWidget(numRows, 3, vT);
    flexTable.getFlexCellFormatter().setRowSpan(0, 1, numRows + 1);
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:13,代码来源:ModifyWholesalePanel.java

示例13: addRow

import com.extjs.gxt.ui.client.widget.Label; //导入依赖的package包/类
private void addRow(FlexTable flexTable, Button button) {
	int numRows = flexTable.getRowCount();
    flexTable.setWidget(numRows, 0, new Label("数量达到"));
    flexTable.setWidget(numRows, 1, new TextBox());
    flexTable.setWidget(numRows, 2, new Label("享受价格"));
    flexTable.setWidget(numRows, 3, new TextBox());
    flexTable.setWidget(numRows, 4, button);
    flexTable.getFlexCellFormatter().setRowSpan(0, 1, numRows + 1);
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:10,代码来源:NewGroupBuyPanel.java

示例14: prepareAfterGetContacts

import com.extjs.gxt.ui.client.widget.Label; //导入依赖的package包/类
private Runnable prepareAfterGetContacts(ContentPanel mainPanel, final ListStore<ContactDTO> store) {
  Runnable afterGetContacts;
  final ToolBar actionsToolBar = new ToolBar();
  actionsToolBar.setAlignment(HorizontalAlignment.LEFT);

  actionsToolBar.add(Forms.button(I18N.CONSTANTS.addItem(), IconImageBundle.ICONS.add(), new SelectionListener<ButtonEvent>() {
    @Override
    public void componentSelected(ButtonEvent ce) {
      showContactSelector(store);
    }
  }));

  final Label offlineLabel = new Label(I18N.CONSTANTS.sigmahContactsOfflineUnavailable());
  actionsToolBar.add(offlineLabel);

  mainPanel.setTopComponent(actionsToolBar);

  // if offline mode, no contact can be used
  actionsToolBar.setEnabled(!Profiler.INSTANCE.isOfflineMode());
  offlineLabel.setVisible(Profiler.INSTANCE.isOfflineMode());
  if (eventBus != null) {
    eventBus.addHandler(OfflineEvent.getType(), new OfflineHandler() {
      @Override
      public void handleEvent(OfflineEvent event) {
        final boolean isOffline = ApplicationState.OFFLINE == event.getState();
        actionsToolBar.setEnabled(!isOffline && !isReadOnly(store));
        offlineLabel.setVisible(isOffline);
      }
    });
  }

  final Listener<StoreEvent<ContactDTO>> listener = new ContactStoreEventListener(store, actionsToolBar);

  afterGetContacts = new Runnable() {
    @Override
    public void run() {
      actionsToolBar.setEnabled(!Profiler.INSTANCE.isOfflineMode() && !isReadOnly(store));

      store.addListener(Store.BeforeAdd, listener);
      store.addListener(Store.Add, listener);
      store.addListener(Store.BeforeClear, listener);
      store.addListener(Store.Clear, listener);
      store.addListener(Store.Remove, listener);

      handlerManager.fireEvent(new RequiredValueEvent(store.getCount() > 0, true));
    }
  };
  return afterGetContacts;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:50,代码来源:ContactListElementDTO.java

示例15: getFirstRowLabel

import com.extjs.gxt.ui.client.widget.Label; //导入依赖的package包/类
@Override
public Label getFirstRowLabel() {
	return firstRowLabel;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:5,代码来源:ImportationSchemeAdminView.java


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