com.vaadin.ui.Grid.setReadOnly()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(168)

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

Grid.setReadOnly介绍

暂无

代码示例

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

@Override
protected void doReadDesign(Element design, DesignContext context) {
  Attributes attrs = design.attributes();
  if (design.hasAttr(DECLARATIVE_DATA_ITEM_TYPE)) {
    String itemType = design.attr(DECLARATIVE_DATA_ITEM_TYPE);
    setBeanType(itemType);
  }
  if (attrs.hasKey("selection-mode")) {
    setSelectionMode(DesignAttributeHandler.readAttribute(
        "selection-mode", attrs, SelectionMode.class));
  }
  Attributes attr = design.attributes();
  if (attr.hasKey("selection-allowed")) {
    setReadOnly(DesignAttributeHandler
        .readAttribute("selection-allowed", attr, Boolean.class));
  }
  if (attrs.hasKey("rows")) {
    setHeightByRows(DesignAttributeHandler.readAttribute("rows", attrs,
        double.class));
  }
  readStructure(design, context);
  // Read frozen columns after columns are read.
  if (attrs.hasKey("frozen-columns")) {
    setFrozenColumnCount(DesignAttributeHandler
        .readAttribute("frozen-columns", attrs, int.class));
  }
}

代码示例来源:origin: jpos/jPOS-EE

@Override
public void setReadOnly(boolean readOnly) {
  super.setReadOnly(readOnly);
  if (getColumn("delete") != null)
    getColumn("delete").setHidden(readOnly);
}

相关文章

Grid类方法