Examples of Row


Examples of gherkin.formatter.model.Row

        }

        cellLengths = new int[rows.size()][columnCount];
        maxLengths = new int[columnCount];
        for (int rowIndex = 0; rowIndex < rows.size(); rowIndex++) {
            Row row = rows.get(rowIndex);
            final List<String> cells = row.getCells();
            for (int colIndex = 0; colIndex < columnCount; colIndex++) {
                final String cell = getCellSafely(cells, colIndex);
                final int length = escapeCell(cell).length();
                cellLengths[rowIndex][colIndex] = length;
                maxLengths[colIndex] = Math.max(maxLengths[colIndex], length);
View Full Code Here

Examples of gr.bluevibe.fire.components.Row

  {
    Panel main= new Panel();
    main.setCommandListener(this);
    main.addCommand(exitCommand);
   
    Row sep = new Row();
    sep.setFilled(new Integer(FireScreen.defaultFilledRowColor));
    main.add(sep);
   
    sep = new Row("Highest Score: "+highestScore);
    sep.setFilled(new Integer(FireScreen.defaultFilledRowColor));
    main.add(sep);
   
    sep = new Row();
    sep.setFilled(new Integer(FireScreen.defaultFilledRowColor));
    main.add(sep);
   
   
    Row start = new Row(FireIO.getLocalImage("lightbulb"), Lang.get("Start new game"));
    int strWidth = start.getFont().stringWidth(start.getText())+10;
    start.setFullSizeHighlight(true);
    start.setCommandListener(this);
    start.addCommand(startCommand);
    start.setAlignment(FireScreen.CENTRE);
    start.setForcedTextWidth(new Integer(strWidth));
    main.add(start);
    return main;

  }
View Full Code Here

Examples of io.druid.data.input.Row

    Assert.assertEquals(Arrays.asList("dim1", "dim2"), index.getDimensions());
    Assert.assertEquals(2, index.size());

    final Iterator<Row> rows = index.iterator();
    Row row = rows.next();
    Assert.assertEquals(timestamp, row.getTimestampFromEpoch());
    Assert.assertEquals(Arrays.asList("1"), row.getDimension("dim1"));
    Assert.assertEquals(Arrays.asList("2"), row.getDimension("dim2"));

    row = rows.next();
    Assert.assertEquals(timestamp, row.getTimestampFromEpoch());
    Assert.assertEquals(Arrays.asList("3"), row.getDimension("dim1"));
    Assert.assertEquals(Arrays.asList("4"), row.getDimension("dim2"));
  }
View Full Code Here

Examples of it.eng.spagobi.engines.qbe.crosstable.CrosstabDefinition.Row

 
  private JSONArray serializeRows(CrosstabDefinition crosstabDefinition) throws JSONException {
    List<Row> rows = crosstabDefinition.getRows();
    JSONArray toReturn = new JSONArray();
    for (int i = 0; i < rows.size(); i++) {
      Row row = rows.get(i);
      JSONObject obj = new JSONObject();
      obj.put(CrosstabSerializationConstants.ID, row.getEntityId());
      obj.put(CrosstabSerializationConstants.ALIAS, row.getAlias());
      obj.put(CrosstabSerializationConstants.ICON_CLS, row.getIconCls());
      obj.put(CrosstabSerializationConstants.NATURE, row.getNature());
      toReturn.put(obj);
    }
    return toReturn;
  }
View Full Code Here

Examples of javax.jcr.query.Row

            super(collection);
            this.size = size;
        }

        public Row nextRow() {
            Row next = super.nextRow();
            if (commonPathPrefix != null) {
                next = new RowAdapter(next, commonPathPrefix);
            } else {
                next = new RowAdapter(next, ".");
            }
View Full Code Here

Examples of jfix.zk.Row

import org.apache.commons.io.FileUtils;

public class NodeViews {

  public static View asType(Node node) {
    return new View(node.getType(), new Row(new Image(JeaseSession
        .getConfig().getIcon(node)), new Label(node.getType())));
  }
View Full Code Here

Examples of kameleon.document.Row

      if (p instanceof Array) {
        Array array = (Array) p ;
        if (array.getCount() <= 0) {
          continue ;
        }// if
        Row firstRow = array.iterator().next() ;
        boolean isHeaderRow = true ;
        for(Iterator<Cell> iter = firstRow.iterator(); iter.hasNext() && isHeaderRow; ) {
          Cell cell = iter.next() ;
          for(Iterator<Paragraph> cellIter = cell.iterator(); cellIter.hasNext() && isHeaderRow; ) {
            Paragraph paragraph = cellIter.next() ;
            if (paragraph instanceof TextParagraph) {
              TextParagraph tp = (TextParagraph) paragraph ;
              for(Iterator<TextParagraphElement> tpIter = tp.iterator(); tpIter.hasNext() && isHeaderRow; ) {
                TextParagraphElement element = tpIter.next() ;
                try {
                  isHeaderRow = Boolean.TRUE.equals(element.getProperty(ElementPropertiesDefaultNames.FORMAT_BOLD)) ;
                } catch (InvalidPropertyException e) {
                  /* This should not happen. */
                }// try
              }// for
            } else {
              try {
                isHeaderRow = Boolean.TRUE.equals(p.getProperty(ElementPropertiesDefaultNames.FORMAT_BOLD)) ;
              } catch (InvalidPropertyException e) {
                /* This should not happen. */
              }// try
            }// if
          }// for
        }// for
        if (isHeaderRow) {
          int nCells = firstRow.getCount() ;
          for(int cellIndex=0; cellIndex < nCells; ++cellIndex) {

            CellHeader header = new CellHeader(firstRow.getCell(cellIndex)) ;
            try {
              firstRow.add(header, cellIndex) ;
              firstRow.remove(cellIndex+1) ;
            } catch (KameleonException e) {/* Never called. */}
          }// for
        }// if
      }// if
    }// for
View Full Code Here

Examples of me.prettyprint.hector.api.beans.Row

    CqlQuery<byte[], String, byte[]> query = new CqlQuery<byte[], String, byte[]>(cassandraUnit.keyspace,
        BytesArraySerializer.get(), StringSerializer.get(), BytesArraySerializer.get());
    query.setQuery("SELECT * FROM MyColumnFamily");
    QueryResult<CqlRows<byte[], String, byte[]>> result = query.execute();
    List<Row<byte[], String, byte[]>> rows = result.get().getList();
    Row row = rows.get(0);
    assertThat(row, notNullValue());
    assertThat((byte[]) row.getKey(), is(decodeHex("369ff963196dc2e5fe174dad2c0c6e9149b1acd9")));
  }
View Full Code Here

Examples of net.projecteuler.model.Tree.Row

    }
  }

  private void writeSolution(Index index, long sum) {
    if (index != null) {
      Row row = tree.getRow(index.getRow());
      for(int i = 100 - index.getRow(); i > 0; i-- )
        solution.print("   ");
      for (int col = 0; col < row.size(); col++) {
        if (col == index.getCol())
          solution.print(String.format("(%02d)", row.valueAt(col)));
        else
        solution.print(String.format(" %02d ", row.valueAt(col)));
        if (col < row.size() - 1)
          solution.print(" ");
      }
      solution.println(" => " + sum);
    }
  }
View Full Code Here

Examples of net.rim.device.api.database.Row

                    _db.createStatement("SELECT category_id FROM Category WHERE category_name = ?");
            statement.prepare();
            statement.bind(1, name);
            final Cursor cursor = statement.getCursor();
            if (cursor.next()) {
                final Row row = cursor.getRow();
                final int id = row.getInteger(0);
                category = new Category(id, name);
            }
            cursor.close();
            statement.close();
        } catch (final DatabaseException dbe) {
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.