Examples of Sheet


Examples of org.jmol.modelsetbio.Sheet

  private final Vector3f lengthVector = new Vector3f();
  private final Point3f pointCorner = new Point3f();

  void drawBox(Point3f pointA, Point3f pointB) {
    Sheet sheet = (Sheet)proteinstructurePending;
    float scale = mad / 1000f;
    scaledWidthVector.set(sheet.getWidthUnitVector());
    scaledWidthVector.scale(scale);
    scaledHeightVector.set(sheet.getHeightUnitVector());
    scaledHeightVector.scale(scale / 4);
    pointCorner.add(scaledWidthVector, scaledHeightVector);
    pointCorner.scaleAdd(-0.5f, pointA);
    lengthVector.sub(pointB, pointA);
    buildBox(pointCorner, scaledWidthVector,
View Full Code Here

Examples of org.jopendocument.dom.spreadsheet.Sheet

   
    File file = new File(metadataPath);
    SpreadSheet metadata = SpreadSheet.createFromFile(file);
   
    // App
    Sheet sheet = metadata.getSheet("App");
    App app = new App();
    app.setGroupId(getText(sheet, "A2"));
    app.setArtifactId(getText(sheet, "B2"));
    app.setName(getText(sheet, "C2"));
    app.setRestricted(getBoolean(sheet, "D2"));
    app.setDatePattern(getText(sheet, "E2"));
    app.setDateTimePattern(getText(sheet, "F2"));
    app.setTimePattern(getText(sheet, "G2"));
    app.setDb(getText(sheet, "H2"));
    app.setDbUser(getText(sheet, "I2"));
    app.setDbPassword(getText(sheet, "J2"));
    app.setEmailHost(getText(sheet, "K2"));
    app.setEmailId(getText(sheet, "L2"));
    app.setEmailPassword(getText(sheet, "M2"));
    app.setMaxUploadSize(Integer.parseInt(sheet.getCellAt("N2").getTextValue().trim()));
    app.setPageSize(getByte(sheet, "O2"));

    // Properties
    sheet = metadata.getSheet("Properties");
    Property property;
    for (int i = 2; !getText(sheet, "A" + i).equals(""); i++) {
      property = new Property();
      property.setName(sheet.getCellAt("A" + i).getTextValue().trim());
      property.setValue(sheet.getCellAt("B" + i).getTextValue().trim());
      property.setDataType(sheet.getCellAt("C" + i).getTextValue().trim());
      app.addProperty(property);
    }
   
    // Messages
    sheet = metadata.getSheet("Messages");
    Message message;
    for (int i = 2; !getText(sheet, "A" + i).equals(""); i++) {
      message = new Message();
      message.setName(sheet.getCellAt("A" + i).getTextValue().trim());
      message.setMessage(sheet.getCellAt("B" + i).getTextValue().trim());
      app.addMessage(message);
    }

    // Entities
    sheet = metadata.getSheet("Entities");
    BizEntity entity;
    for (int i = 2; !getText(sheet, "A" + i).equals(""); i++) {
      entity = new BizEntity();
      entity.setName(sheet.getCellAt("A" + i).getTextValue().trim());
      entity.setPlural(sheet.getCellAt("B" + i).getTextValue().trim());
      entity.setTableName(sheet.getCellAt("C" + i).getTextValue().trim());
      entity.setTitle(sheet.getCellAt("D" + i).getTextValue().trim());
      // Identifier column is set later
      entity.setOrderBy(sheet.getCellAt("F" + i).getTextValue().trim());
      entity.setCustomView(getBoolean(sheet, "G" + i));
      entity.setCustomEdit(getBoolean(sheet, "H" + i));
      entity.setCustomList(getBoolean(sheet, "I" + i));
      entity.setModule(sheet.getCellAt("J" + i).getTextValue().trim());
      app.addModule(entity.getModule()); // Adds distinct module names
     
      app.addEntity(entity);
    }
   
    // Unique Keys
    sheet = metadata.getSheet("UniqueKeys");
    UniqueKey uniqueKey;
    for (int i = 2; !getText(sheet, "A" + i).equals(""); i++) {
     
      uniqueKey = new UniqueKey();
      entity = app.getEntity(sheet.getCellAt("A" + i).getTextValue().trim());
      entity.addUniqueKey(uniqueKey);
     
      uniqueKey.setColumns(getText(sheet, "B" + i));
    }

    // Operations
    sheet = metadata.getSheet("Operations");
    Operation operation;
    for (int i = 2; !getText(sheet, "A" + i).equals(""); i++) {
     
      operation = new Operation();
      entity = app.getEntity(sheet.getCellAt("A" + i).getTextValue().trim());
      entity.addOperation(operation);
     
      operation.setName(sheet.getCellAt("B" + i).getTextValue().trim());
      operation.setLabel(sheet.getCellAt("C" + i).getTextValue().trim());
      operation.setVisibleInList(getBoolean(sheet, "D" + i));
    }

    // Attributes
    sheet = metadata.getSheet("Attributes");
    Attribute attribute;
    for (int i = 2; !getText(sheet, "A" + i).equals(""); i++) {
     
      attribute = new Attribute();
      entity = app.getEntity(sheet.getCellAt("A" + i).getTextValue().trim());
      entity.addAttribute(attribute);
     
      attribute.setName(sheet.getCellAt("B" + i).getTextValue().trim());
      attribute.setDataType(sheet.getCellAt("C" + i).getTextValue().trim());
      attribute.setDefaultValue(getText(sheet, "D" + i));
      attribute.setNullable(getBoolean(sheet, "E" + i));
      attribute.setUnigue(getBoolean(sheet, "F" + i));
      attribute.setPattern(sheet.getCellAt("G" + i).getTextValue().trim());
      attribute.setMin(getBigInteger(sheet, "H" + i));
      attribute.setMax(getBigInteger(sheet, "I" + i));
      attribute.setRelatedEntity(app.getEntity(sheet.getCellAt("J" + i).getTextValue().trim()));
      attribute.setFetchType(sheet.getCellAt("K" + i).getTextValue().trim());
      attribute.setCascadeType(sheet.getCellAt("L" + i).getTextValue().trim());
      attribute.setMappedBy(sheet.getCellAt("M" + i).getTextValue().trim());
      attribute.setOrderBy(sheet.getCellAt("N" + i).getTextValue().trim());
      attribute.setVisible(getBoolean(sheet, "O" + i));
      attribute.setSensitive(getBoolean(sheet, "P" + i));
      attribute.setVisibleInList(getBoolean(sheet, "Q" + i));
      attribute.setSearchable(getBoolean(sheet, "R" + i));
      attribute.setEditable(getBoolean(sheet, "S" + i));
      attribute.setBlankNull(getBoolean(sheet, "T" + i));
      attribute.setComputed(getBoolean(sheet, "U" + i));
      attribute.setLabel(sheet.getCellAt("V" + i).getTextValue().trim());
      attribute.setListLabel(sheet.getCellAt("W" + i).getTextValue());
      attribute.setHelpText(sheet.getCellAt("X" + i).getTextValue().trim());
      attribute.setYearRange(sheet.getCellAt("Y" + i).getTextValue().trim());
      attribute.setRows(getByte(sheet, "Z" + i));
      attribute.setCols(getByte(sheet, "AA" + i));
      attribute.setColumnName(sheet.getCellAt("AB" + i).getTextValue().trim());
     
      if (attribute.getRelatedEntity() != null &&
        attribute.getDataType().equals("ManyToOneSelect") &&
         (attribute.getEditable() || attribute.getSearchable())) {
        entity.addSelectableEntity(attribute.getRelatedEntity());
        if (attribute.getEditable())
          entity.addSelectableEditableEntity(attribute.getRelatedEntity());
        if (attribute.getSearchable())
          entity.addSelectableSearchableEntity(attribute.getRelatedEntity());
      }
       
    }
   
    // Set identifier column of entities
    sheet = metadata.getSheet("Entities");
    for (int i = 2; !getText(sheet, "A" + i).equals(""); i++) {
      String identifierColumn = sheet.getCellAt("E" + i).getTextValue().trim();
      if (!identifierColumn.equals("")) {
        entity = app.getEntity(sheet.getCellAt("A" + i).getTextValue().trim());
        attribute = entity.getAttribute(identifierColumn);
        entity.setIdentifierColumn(attribute);
      }
    }
   
    // Set select options of entities
    sheet = metadata.getSheet("SelOptions");
    SelOption selOption;
    for (int i = 2; !getText(sheet, "A" + i).equals(""); i++) {
     
      selOption = new SelOption();
      entity = app.getEntity(sheet.getCellAt("A" + i).getTextValue().trim());
      attribute = entity.getAttribute(sheet.getCellAt("B" + i).getTextValue().trim());
      attribute.addSelOption(selOption);

      selOption.setValue(sheet.getCellAt("C" + i).getTextValue().trim());
      selOption.setLabel(sheet.getCellAt("D" + i).getTextValue().trim());
    }
   
    App.setApp(app);
  }
View Full Code Here

Examples of org.netbeans.server.uihandler.statistics.CoProjects.Sheet

    protected Sheet process(LogRecord rec) {
        ProjectOp op = ProjectOp.valueOf(rec);
        if (op != null) {
            ProjectChange ch = new ProjectChange(op, rec.getMillis());
            List<ProjectChange> list = Collections.singletonList(ch);
            return new Sheet(list);
        }
        return Sheet.EMPTY;
    }
View Full Code Here

Examples of org.netbeans.server.uihandler.statistics.Technology.Sheet

    protected Sheet process(LogRecord rec) {
        ProjectOp projectOp = ProjectOp.valueOf(rec);
        if (projectOp != null) {
            Union2<ProjectOp, TechOp> union = Union2.createFirst(projectOp);
            List<Union2<ProjectOp, TechOp>> list = Collections.singletonList(union);
            return new Sheet(list);
        }
       
        TechOp techOp = TechOp.valueOf(rec);
        if (techOp != null) {
            Union2<ProjectOp, TechOp> union = Union2.createSecond(techOp);
            List<Union2<ProjectOp, TechOp>> list = Collections.singletonList(union);
            return new Sheet(list);
           
        }
       
        return Sheet.EMPTY;
    }
View Full Code Here

Examples of org.openide.nodes.Sheet

        setDisplayName(NbBundle.getMessage(PreviewNode.class, "PreviewNode.displayName"));
    }

    @Override
    protected Sheet createSheet() {
        Sheet sheet = Sheet.createDefault();
        PreviewController controller = Lookup.getDefault().lookup(PreviewController.class);
        PreviewModel model = controller.getModel();
        if (model != null) {
            NodeSupervisor ns = model.getNodeSupervisor();
            GlobalEdgeSupervisor ges = model.getGlobalEdgeSupervisor();
            SelfLoopSupervisor sls = model.getSelfLoopSupervisor();
            EdgeSupervisor unes = model.getUndirectedEdgeSupervisor();
            EdgeSupervisor ues = model.getUniEdgeSupervisor();
            EdgeSupervisor bes = model.getBiEdgeSupervisor();

            Sheet.Set nodeSet = Sheet.createPropertiesSet();
            nodeSet.setDisplayName(NbBundle.getMessage(PreviewNode.class, "PreviewNode.Node.displayName"));
            nodeSet.setName("nodes");

            Sheet.Set edgeSet = Sheet.createPropertiesSet();
            edgeSet.setDisplayName(NbBundle.getMessage(PreviewNode.class, "PreviewNode.Edge.displayName"));
            edgeSet.setName("edges");

            Sheet.Set selfLoopSet = Sheet.createPropertiesSet();
            selfLoopSet.setDisplayName(NbBundle.getMessage(PreviewNode.class, "PreviewNode.SelfLoop.displayName"));
            selfLoopSet.setName("selfLoops");

            Sheet.Set undirectedEdgeSet = Sheet.createPropertiesSet();
            undirectedEdgeSet.setDisplayName(NbBundle.getMessage(PreviewNode.class, "PreviewNode.Undirected.displayName"));
            undirectedEdgeSet.setName("undirectedEdges");

            Sheet.Set uniEdgeSet = Sheet.createPropertiesSet();
            uniEdgeSet.setDisplayName(NbBundle.getMessage(PreviewNode.class, "PreviewNode.Directed.displayName"));
            uniEdgeSet.setName("uniEdges");

            Sheet.Set biEdgeSet = Sheet.createPropertiesSet();
            biEdgeSet.setDisplayName(NbBundle.getMessage(PreviewNode.class, "PreviewNode.Mutual.displayName"));
            biEdgeSet.setName("biEdges");

            for (SupervisorPropery p : ns.getProperties()) {
                nodeSet.put(p.getProperty());
            }

            for (SupervisorPropery p : ges.getProperties()) {
                edgeSet.put(p.getProperty());
            }

            for (SupervisorPropery p : sls.getProperties()) {
                selfLoopSet.put(p.getProperty());
            }

            for (SupervisorPropery p : unes.getProperties()) {
                undirectedEdgeSet.put(p.getProperty());
            }

            for (SupervisorPropery p : ues.getProperties()) {
                uniEdgeSet.put(p.getProperty());
            }

            for (SupervisorPropery p : bes.getProperties()) {
                biEdgeSet.put(p.getProperty());
            }

            sheet.put(nodeSet);
            sheet.put(edgeSet);
            sheet.put(selfLoopSet);
            sheet.put(undirectedEdgeSet);
            sheet.put(uniEdgeSet);
            sheet.put(biEdgeSet);
        }
        return sheet;
    }
View Full Code Here

Examples of org.openide.nodes.Sheet

        for (String key : entity.keySet()) {
            if (key.equals("eai:acl") || key.equals("eai:attributes"))
                continue;
            props.put(new StanzaProperty(entity, key));
        }
        Sheet sheet = Sheet.createDefault();
        sheet.put(props);
        return sheet;
    }
View Full Code Here

Examples of org.openide.nodes.Sheet

    public void add(Class datatype, String getter, String setter) {
        add(new PropertyInfo(datatype, getter, setter));
    }

    public Sheet createSheet(Object object) {
        Sheet sheet = Sheet.createDefault();
        Sheet.Set props = Sheet.createPropertiesSet();
        try {
            for (PropertyInfo info : this) {
                props.put(new PropertySupport.Reflection(
                    object, info.datatype, info.getter, info.setter));
            }
        }
        catch (NoSuchMethodException e) {
            throw new RuntimeException(e.getMessage(), e);
        }
        sheet.put(props);
        return sheet;
    }
View Full Code Here

Examples of org.uguess.birt.report.engine.spreadsheet.model.Sheet

  public Sheet removeSheet( Object obj )
  {
    int index = getSheetIndex( obj );

    Sheet sheet = null;
    if ( index >= 0 && index < sheets.size( ) )
    {
      sheet = sheets.remove( index );
    }
View Full Code Here

Examples of org.xlsx4j.sml.Sheet

    if (index< 0 || index>zeroBasedCount) {
      throw new Xlsx4jException("No sheet at index " + index + ".  (There are " + sheets.size() + " sheets) ");     
    }

    try {
      Sheet s = sheets.get(index);
      return (WorksheetPart)this.getRelationshipsPart().getPart(s.getId());
    } catch (Exception e) {
      throw new Xlsx4jException("Sheet " + index + " not found", e);
    }
   
  }
View Full Code Here

Examples of org.zkoss.poi.ss.usermodel.Sheet

    _workbook = null;
  }
 
  @Test
  public void testCellNumberFormatter() {
    Sheet sheet1 = _workbook.getSheet("Sheet1");
    Row row2 = sheet1.getRow(1);
    Row row3 = sheet1.getRow(2);
    Row row4 = sheet1.getRow(3);
    Row row5 = sheet1.getRow(4);
    Row row6 = sheet1.getRow(5);
    Row row7 = sheet1.getRow(6);
    Row row8 = sheet1.getRow(7);
    Row row9 = sheet1.getRow(8);
    Row row10 = sheet1.getRow(9);
 
    testOneRow(row2); // 1/4
    testOneRow(row3); // 21/25
    testOneRow(row4); // 312/943
    testOneRow(row5); // 1/2
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.