com.vaadin.v7.data.Property.setReadOnly()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(103)

本文整理了Java中com.vaadin.v7.data.Property.setReadOnly()方法的一些代码示例,展示了Property.setReadOnly()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Property.setReadOnly()方法的具体详情如下:
包路径:com.vaadin.v7.data.Property
类名称:Property
方法名:setReadOnly

Property.setReadOnly介绍

[英]Sets the Property's read-only mode to the specified status. This functionality is optional, but all properties must implement the isReadOnly mode query correctly.
[中]将属性的只读模式设置为指定状态。此功能是可选的,但所有属性都必须正确实现isReadOnly模式查询。

代码示例

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

/**
 * Sets the Property's read-only mode to the specified status.
 *
 * @param newStatus
 *            the new read-only status of the Property.
 */
@Override
public void setReadOnly(boolean newStatus) {
  if (dataSource != null) {
    dataSource.setReadOnly(newStatus);
  }
}

代码示例来源:origin: viritin/viritin

/**
 * Sets the Property's read-only mode to the specified status.
 *
 * This functionality is optional, but all properties must implement the
 * <code>isReadOnly</code> mode query correctly.
 *
 * @param newStatus new read-only status of the Property
 * @return this (for method chaining)
 * @see #setReadOnly(boolean)
 */
public default S withReadOnly(boolean newStatus) {
  ((Property) this).setReadOnly(newStatus);
  return (S) this;
}

代码示例来源:origin: com.haulmont.cuba/cuba-web

@Override
public void setReadOnly(boolean newStatus) {
  itemProperty.setReadOnly(newStatus);
}

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

@Override
public void setReadOnly(boolean newStatus) {
  boolean oldStatus = isReadOnly();
  wrappedProperty.setReadOnly(newStatus);
  if (oldStatus != isReadOnly()) {
    fireReadOnlyStatusChange();
  }
}

代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility

newProperty.setReadOnly(true);
adapter.addItemProperty(id_3, newProperty);
jcrProperty.setReadOnly(true);
Node res = adapter.applyChanges();

相关文章

微信公众号

最新文章

更多