當前位置: 首頁>>代碼示例>>Java>>正文


Java TextField.setReadOnly方法代碼示例

本文整理匯總了Java中com.vaadin.ui.TextField.setReadOnly方法的典型用法代碼示例。如果您正苦於以下問題:Java TextField.setReadOnly方法的具體用法?Java TextField.setReadOnly怎麽用?Java TextField.setReadOnly使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.vaadin.ui.TextField的用法示例。


在下文中一共展示了TextField.setReadOnly方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: SearchAnneeUnivApoField

import com.vaadin.ui.TextField; //導入方法依賴的package包/類
/**
 * Constructeur, initialisation du champs
 * @param libelleBtnFind 
 */
public SearchAnneeUnivApoField(String libelleBtnFind) {
	super();
	layout = new HorizontalLayout();
	layout.setSpacing(true);
	anneeField = new TextField();
	anneeField.addValueChangeListener(e->showOrHideError());
	anneeField.setNullRepresentation("");
	anneeField.setReadOnly(true);
	btnSearch = new OneClickButton(libelleBtnFind,FontAwesome.SEARCH);
	btnSearch.addClickListener(e->{
		SearchAnneeUnivApoWindow window = new SearchAnneeUnivApoWindow();
		window.addAnneeUniListener(a->changeFieldValue(a));
		UI.getCurrent().addWindow(window);
	});
	layout.addComponent(anneeField);
	layout.addComponent(btnSearch);
}
 
開發者ID:EsupPortail,項目名稱:esup-ecandidat,代碼行數:22,代碼來源:SearchAnneeUnivApoField.java

示例2: platformBackupWanted

import com.vaadin.ui.TextField; //導入方法依賴的package包/類
private void platformBackupWanted(boolean wanted) {
  int row = getBackupRow();
  if (wanted) {
    dataRootGrid.insertRow(row);
    TextField id = new TextField();
    id.setPlaceholder("ID");
    id.setValue("BACKUP");
    id.setReadOnly(true);
    TextField path = new TextField();
    path.setPlaceholder("Location");
    path.setValue(new File(baseLocation.getValue(), "data/backup").getAbsolutePath());
    path.setEnabled(false);
    path.setWidth(100, Unit.PERCENTAGE);
    dataRootGrid.addComponent(id, 0, row, 1, row);
    dataRootGrid.addComponent(path, DATAROOT_PATH_COLUMN, row);
  } else {
    dataRootGrid.removeRow(row);
  }
}
 
開發者ID:Terracotta-OSS,項目名稱:tinypounder,代碼行數:20,代碼來源:TinyPounderMainUI.java

示例3: platformPersistenceWanted

import com.vaadin.ui.TextField; //導入方法依賴的package包/類
private void platformPersistenceWanted(boolean wanted) {
  int row = getPersistenceRow();
  if (wanted) {
    dataRootGrid.insertRow(row);
    TextField id = new TextField();
    id.setPlaceholder("ID");
    id.setValue("PLATFORM");
    id.setReadOnly(true);
    TextField path = new TextField();
    path.setPlaceholder("Location");
    path.setValue(new File(baseLocation.getValue(), "data/platform").getAbsolutePath());
    path.setEnabled(false);
    path.setWidth(100, Unit.PERCENTAGE);
    dataRootGrid.addComponent(id, 0, row, 1, row);
    dataRootGrid.addComponent(path, DATAROOT_PATH_COLUMN, row);
  } else {
    dataRootGrid.removeRow(row);
  }
}
 
開發者ID:Terracotta-OSS,項目名稱:tinypounder,代碼行數:20,代碼來源:TinyPounderMainUI.java

示例4: getSecurityTokenLayout

import com.vaadin.ui.TextField; //導入方法依賴的package包/類
private HorizontalLayout getSecurityTokenLayout(final String securityToken) {
    final HorizontalLayout securityTokenLayout = new HorizontalLayout();

    final Label securityTableLbl = new Label(
            SPUIComponentProvider.getBoldHTMLText(getI18n().getMessage("label.target.security.token")),
            ContentMode.HTML);
    securityTableLbl.addStyleName(SPUIDefinitions.TEXT_STYLE);
    securityTableLbl.addStyleName("label-style");

    final TextField securityTokentxt = new TextField();
    securityTokentxt.addStyleName(ValoTheme.TEXTFIELD_BORDERLESS);
    securityTokentxt.addStyleName(ValoTheme.TEXTFIELD_TINY);
    securityTokentxt.addStyleName("targetDtls-securityToken");
    securityTokentxt.addStyleName(SPUIDefinitions.TEXT_STYLE);
    securityTokentxt.setCaption(null);
    securityTokentxt.setNullRepresentation("");
    securityTokentxt.setValue(securityToken);
    securityTokentxt.setReadOnly(true);

    securityTokenLayout.addComponent(securityTableLbl);
    securityTokenLayout.addComponent(securityTokentxt);
    return securityTokenLayout;
}
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:24,代碼來源:TargetDetails.java

示例5: RequiredColorPickerField

import com.vaadin.ui.TextField; //導入方法依賴的package包/類
/**
 * Constructeur, initialisation du champs
 */
public RequiredColorPickerField(String caption) {
	super();
	layout = new HorizontalLayout();
	layout.setWidth(100, Unit.PERCENTAGE);
	layout.setSpacing(true);
	colorTextField = new TextField();
	colorTextField.addValueChangeListener(e->showOrHideError());
	colorTextField.setNullRepresentation("");
	colorTextField.addStyleName(ValoTheme.TEXTFIELD_BORDERLESS);
	colorTextField.setReadOnly(true);

	btnColor = new ColorPicker("Couleur de l'alerte");
	btnColor.addColorChangeListener(e->{
		changeFieldValue(e.getColor().getCSS());
	});
	btnColor.setPosition(Page.getCurrent().getBrowserWindowWidth() / 2 - 246/2,
               Page.getCurrent().getBrowserWindowHeight() / 2 - 507/2);
	btnColor.setSwatchesVisibility(true);
	btnColor.setHistoryVisibility(false);
	btnColor.setTextfieldVisibility(true);
	btnColor.setHSVVisibility(false);
	layout.addComponent(btnColor);
	layout.addComponent(colorTextField);
	layout.setExpandRatio(colorTextField, 1);
	
}
 
開發者ID:EsupPortail,項目名稱:esup-ecandidat,代碼行數:30,代碼來源:RequiredColorPickerField.java


注:本文中的com.vaadin.ui.TextField.setReadOnly方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。