Examples of Column


Examples of henplus.view.Column

                PROP_META[1].resetWidth();
                final TableRenderer table = new TableRenderer(PROP_META, HenPlus.out());
                for (Map.Entry<String, PropertyHolder> entry : getRegistry().getPropertyMap().entrySet()) {
                    final Column[] row = new Column[3];
                    final PropertyHolder holder = entry.getValue();
                    row[0] = new Column(entry.getKey());
                    row[1] = new Column(holder.getValue());
                    row[2] = new Column(holder.getShortDescription());
                    table.addRow(row);
                }
                table.closeTable();
                return SUCCESS;
            } else if (argc == 1) {
View Full Code Here

Examples of htm.Column

    g.setColor(Color.WHITE);
    g.fillRect(0, 0, size.width, size.height);
   
    for(int cx=0; cx<_region.getWidth(); ++cx) {
      for(int cy=0; cy<_region.getHeight(); ++cy) {
        Column col = _region.getColumn(cx, cy);
        Point circle = getColumnPos(col);
       
        int gray = 255 - Math.round(col.getOverlapPercentage()*255.0f);
        if(gray<255)
          gray = gray;
        g.setColor(new Color(gray,gray,gray));
        g.fillOval(circle.x-rad, circle.y-rad, diam, diam);
       
        boolean wasDrawn = false;
        if(col.isActive()) {
          wasDrawn = true;
          g.setColor(Color.BLUE);
        }
        else
          g.setColor(new Color(192,192,192));
       
        g.drawOval(circle.x-rad, circle.y-rad, diam, diam);
       
        //Now draw individual column cells inside the column's circle
        int radCell = rad2sqrt+1;
        int rad2C = rad2-1;
        if(_region.getCellsPerCol()==1) {
          radCell = rad-(rad/3);
          rad2C = 0;
        }
       
        Point[] clocs = new Point[] {
          new Point(circle.x-rad2C, circle.y-rad2C),
          new Point(circle.x+rad2C, circle.y-rad2C),
          new Point(circle.x-rad2C, circle.y+rad2C),
          new Point(circle.x+rad2C, circle.y+rad2C)
        };
       
        for(int i=0; i<col.numCells(); ++i)
          wasDrawn |= drawCell(g, clocs[i], radCell, col.getCell(i));
       
        //Draw small black circle to indicate input bit origin locations
        if(_showInput && _data!=null && _data[col.ix()][col.iy()]==1) {
          wasDrawn = true;
          int r = Math.max(2, rad/6);
          g.setColor(new Color(128,0,128));
          g.fillOval(circle.x-r, circle.y-r, r*2, r*2);
          g.setColor(Color.BLACK);
View Full Code Here

Examples of info.archinnov.achilles.annotations.Column

    }

    public String inferCQLColumnName(Field field, NamingStrategy namingStrategy) {
        final String columnName = field.getName();
        log.trace("Inferring property columnName for property {}", columnName);
        final Column column = field.getAnnotation(Column.class);
        final Id id = field.getAnnotation(Id.class);

        if (column != null) {
            return determineColumnNameUsingStrategy(column.name(), columnName, namingStrategy);
        } else if (id != null) {
            return determineColumnNameUsingStrategy(id.name(), columnName, namingStrategy);
        } else {
            return applyNamingStrategy(columnName, namingStrategy);
        }
View Full Code Here

Examples of info.jtrac.domain.ExcelFile.Column

        public List getObjectList() {
            return excelFile.getColumns();
        }
       
        protected void populateItem(Item item) {           
            final Column column = (Column) item.getModelObject();
            if(column.getColumnHeading() != null) {
                item.add(CLASS_SELECTED);
            }
            Label label = new Label("cell", new PropertyModel(column, "label"));
            label.setRenderBodyOnly(true);           
            item.add(label);           
View Full Code Here

Examples of infovis.Column

                String value = (String) visual.get(key);
                visualization.setVisualColumn(
                    key,
                    tree.getColumn(value));
            }
            final Column order = visualization.getVisualColumn("sort");
            final Column size = visualization.getVisualColumn(Visualization.VISUAL_SIZE);
            Permutation perm = visualization.getPermutation();
            perm.sort(new RowComparator() {
                public int compare(int row1, int row2) {
                    if (tree.isLeaf(row1) && tree.isLeaf(row2)) {
                        return size.compare(row1, row2);
                    }
                    else {
                        return order.compare(row1, row2);
                    }
                }
View Full Code Here

Examples of io.druid.segment.column.Column

                    public DimensionSelector makeDimensionSelector(String dimension)
                    {
                      final String dimensionName = dimension.toLowerCase();

                      DictionaryEncodedColumn cachedColumn = dictionaryColumnCache.get(dimensionName);
                      final Column columnDesc = index.getColumn(dimensionName);

                      if (cachedColumn == null && columnDesc != null) {
                        cachedColumn = columnDesc.getDictionaryEncoding();
                        dictionaryColumnCache.put(dimensionName, cachedColumn);
                      }

                      final DictionaryEncodedColumn column = cachedColumn;

                      if (column == null) {
                        return null;
                      } else if (columnDesc.getCapabilities().hasMultipleValues()) {
                        return new DimensionSelector()
                        {
                          @Override
                          public IndexedInts getRow()
                          {
                            return column.getMultiValueRow(cursorOffset.getOffset());
                          }

                          @Override
                          public int getValueCardinality()
                          {
                            return column.getCardinality();
                          }

                          @Override
                          public String lookupName(int id)
                          {
                            final String retVal = column.lookupName(id);
                            return retVal == null ? "" : retVal;
                          }

                          @Override
                          public int lookupId(String name)
                          {
                            return column.lookupId(name);
                          }
                        };
                      } else {
                        return new DimensionSelector()
                        {
                          @Override
                          public IndexedInts getRow()
                          {
                            // using an anonymous class is faster than creating a class that stores a copy of the value
                            return new IndexedInts()
                            {
                              @Override
                              public int size()
                              {
                                return 1;
                              }

                              @Override
                              public int get(int index)
                              {
                                return column.getSingleValueRow(cursorOffset.getOffset());
                              }

                              @Override
                              public Iterator<Integer> iterator()
                              {
                                return Iterators.singletonIterator(column.getSingleValueRow(cursorOffset.getOffset()));
                              }
                            };
                          }

                          @Override
                          public int getValueCardinality()
                          {
                            return column.getCardinality();
                          }

                          @Override
                          public String lookupName(int id)
                          {
                            return column.lookupName(id);
                          }

                          @Override
                          public int lookupId(String name)
                          {
                            return column.lookupId(name);
                          }
                        };
                      }
                    }

                    @Override
                    public FloatColumnSelector makeFloatColumnSelector(String columnName)
                    {
                      final String metricName = columnName.toLowerCase();
                      GenericColumn cachedMetricVals = genericColumnCache.get(metricName);

                      if (cachedMetricVals == null) {
                        Column holder = index.getColumn(metricName);
                        if (holder != null && (holder.getCapabilities().getType() == ValueType.FLOAT
                                               || holder.getCapabilities().getType() == ValueType.LONG)) {
                          cachedMetricVals = holder.getGenericColumn();
                          genericColumnCache.put(metricName, cachedMetricVals);
                        }
                      }

                      if (cachedMetricVals == null) {
                        return new FloatColumnSelector()
                        {
                          @Override
                          public float get()
                          {
                            return 0.0f;
                          }
                        };
                      }

                      final GenericColumn metricVals = cachedMetricVals;
                      return new FloatColumnSelector()
                      {
                        @Override
                        public float get()
                        {
                          return metricVals.getFloatSingleValueRow(cursorOffset.getOffset());
                        }
                      };
                    }

                    @Override
                    public LongColumnSelector makeLongColumnSelector(String columnName)
                    {
                      final String metricName = columnName.toLowerCase();
                      GenericColumn cachedMetricVals = genericColumnCache.get(metricName);

                      if (cachedMetricVals == null) {
                        Column holder = index.getColumn(metricName);
                        if (holder != null && (holder.getCapabilities().getType() == ValueType.LONG
                                               || holder.getCapabilities().getType() == ValueType.FLOAT)) {
                          cachedMetricVals = holder.getGenericColumn();
                          genericColumnCache.put(metricName, cachedMetricVals);
                        }
                      }

                      if (cachedMetricVals == null) {
                        return new LongColumnSelector()
                        {
                          @Override
                          public long get()
                          {
                            return 0L;
                          }
                        };
                      }

                      final GenericColumn metricVals = cachedMetricVals;
                      return new LongColumnSelector()
                      {
                        @Override
                        public long get()
                        {
                          return metricVals.getLongSingleValueRow(cursorOffset.getOffset());
                        }
                      };
                    }

                    @Override
                    public ObjectColumnSelector makeObjectColumnSelector(String column)
                    {
                      final String columnName = column.toLowerCase();

                      Object cachedColumnVals = objectColumnCache.get(columnName);

                      if (cachedColumnVals == null) {
                        Column holder = index.getColumn(columnName);

                        if (holder != null) {
                          final ColumnCapabilities capabilities = holder.getCapabilities();

                          if (capabilities.isDictionaryEncoded()) {
                            cachedColumnVals = holder.getDictionaryEncoding();
                          } else if (capabilities.getType() == ValueType.COMPLEX) {
                            cachedColumnVals = holder.getComplexColumn();
                          } else {
                            cachedColumnVals = holder.getGenericColumn();
                          }
                        }

                        if (cachedColumnVals != null) {
                          objectColumnCache.put(columnName, cachedColumnVals);
View Full Code Here

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

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

Examples of javax.jcr.query.qom.Column

    /**
     * Test case for {@link QueryObjectModelFactory#column(String, String, String)}
     */
    public void testColumn() throws RepositoryException {
        Column col = qf.column(SELECTOR_NAME1, propertyName1, propertyName1);
        assertEquals("Wrong selector name", SELECTOR_NAME1, col.getSelectorName());
        assertEquals("Wrong property name", propertyName1, col.getPropertyName());
        assertEquals("Wrong column name", propertyName1, col.getColumnName());
    }
View Full Code Here

Examples of javax.jdo.annotations.Column

    }

    @Override
    public void process(final ProcessMethodContext processMethodContext) {

        final Column annotation = Annotations.getAnnotation(processMethodContext.getMethod(), Column.class);

        if(String.class != processMethodContext.getMethod().getReturnType()) {
            return;
        }

        if (annotation == null || annotation.length() == -1) {
            return;
        }
       
        final FacetedMethod holder = processMethodContext.getFacetHolder();
       
        MaxLengthFacet existingFacet = holder.getFacet(MaxLengthFacet.class);
       
        final MaxLengthFacet facet = new MaxLengthFacetDerivedFromJdoColumn(annotation.length(), holder);
       
        if(!existingFacet.isNoop()) {
            // will raise violation later
            facet.setUnderlyingFacet(existingFacet);
        }
View Full Code Here

Examples of javax.persistence.Column

                            {
                                AbstractMemberMetaData fmd = mgr.getMetaDataFactory().newFieldObject(cmd,
                                    "#UNKNOWN." + overrides[j].name(),
                                    null, "persistent", null, null, null, null, null, null, null, null, null, null, null, null,
                                    null, null, null, null, null, null);
                                Column col = overrides[j].column();
                                // TODO Make inferrals about jdbctype, length etc if the field is 1 char etc
                                fmd.addColumn(new ColumnMetaData(fmd, col.name(), null, null, null, null,
                                    "" + col.length(), "" + col.scale(), "" + col.nullable(), null, null,
                                    "" + col.insertable(), "" + col.updatable(), "" + col.unique()));
                                overriddenFields.add(fmd);
                            }
                        }
                    }
                    else if (annName.equals(JPAAnnotationUtils.ATTRIBUTE_OVERRIDE))
                    {
                        if (overriddenFields == null)
                        {
                            overriddenFields = new HashSet<AbstractMemberMetaData>();
                        }

                        AbstractMemberMetaData fmd = mgr.getMetaDataFactory().newFieldObject(cmd,
                            "#UNKNOWN." + (String)annotationValues.get("name"),
                            null, null, null, null, null, null, null, null, null, null, null, null, null, null,
                            null, null, null, null, null, null);
                        Column col = (Column)annotationValues.get("column");
                        // TODO Make inferrals about jdbctype, length etc if the field is 1 char etc
                        fmd.addColumn(new ColumnMetaData(fmd, col.name(), null, null, null, null,
                            "" + col.length(), "" + col.scale(), "" + col.nullable(), null, null,
                            "" + col.insertable(), "" + col.updatable(), "" + col.unique()));
                        overriddenFields.add(fmd);
                    }
                    else if (annName.equals(JPAAnnotationUtils.ASSOCIATION_OVERRIDES))
                    {
                        AssociationOverride[] overrides = (AssociationOverride[])annotationValues.get("value");
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.