Examples of translate()


Examples of org.exist.util.Base64Encoder.translate()

      return toDateTime((Date) o).toString();
    } else if (o instanceof Calendar) {
      return toDateTime(((Calendar) o).getTimeInMillis()).toString();
    } else if (o instanceof byte[]) {
      Base64Encoder encoder = new Base64Encoder();
      encoder.translate((byte[]) o);
      return String.valueOf(encoder.getCharArray());
    } else {
      return o;
    }
  }
View Full Code Here

Examples of org.exolab.castor.util.MimeBase64Decoder.translate()

                    state.object = new byte[0];
                else {
                    //-- Base64 decoding
                    char[] chars = str.toCharArray();
                    MimeBase64Decoder decoder = new MimeBase64Decoder();
                    decoder.translate(chars, 0, chars.length);
                    state.object = decoder.getByteArray();
                }
            }
            else if (state.args != null) {
              state.object = createInstance(state.type, state.args);
View Full Code Here

Examples of org.exolab.castor.util.MimeBase64Encoder.translate()

                    Class objType = obj.getClass();
                    if (objType.isArray() &&
                       (objType.getComponentType() == Byte.TYPE))
                    {
                        MimeBase64Encoder encoder = new MimeBase64Encoder();
                        encoder.translate((byte[])obj);
                        chars = encoder.getCharArray();
                    }
                    //-- all other types
                    else {
                        String str = obj.toString();
View Full Code Here

Examples of org.fao.geonet.kernel.search.CodeListTranslator.translate()

            try {
                final GeonetContext gc = (GeonetContext) ServiceContext.get().getHandlerContext(Geonet.CONTEXT_NAME);
                Translator t = new CodeListTranslator(gc.getBean(SchemaManager.class),
                        (String) langCode,
                        (String) codelist);
                translation = t.translate(codeListValue);
            } catch (Exception e) {
                Log.error(Geonet.GEONETWORK, "Failed to translate codelist " + e.getMessage());
            }
            return translation;
        } else {
View Full Code Here

Examples of org.fao.geonet.kernel.search.Translator.translate()

            try {
                final GeonetContext gc = (GeonetContext) ServiceContext.get().getHandlerContext(Geonet.CONTEXT_NAME);
                Translator t = new CodeListTranslator(gc.getBean(SchemaManager.class),
                        (String) langCode,
                        (String) codelist);
                translation = t.translate(codeListValue);
            } catch (Exception e) {
                Log.error(Geonet.GEONETWORK, "Failed to translate codelist " + e.getMessage());
            }
            return translation;
        } else {
View Full Code Here

Examples of org.fonteditor.elements.points.FEPointList.translate()

      public void execute(FEPath p, Object o)
      {
        Point r = (Point) o;
        FEPointList fepl = p.getFEPointList();

        fepl.translate(r.x, r.y);
      }
    }, new Point(dx, dy));
    //instruction_stream.fepointlist.translate(dx, dy);
    //getSliders().translate(dx, dy);
  }
View Full Code Here

Examples of org.freehep.graphics2d.VectorGraphics.translate()

        } catch (IOException e) {
            handleException(e);
        }
        // The correct graphics context should be created.
        VectorGraphics graphics = new EMFGraphics2D(this, true);
        graphics.translate(x, y);
        graphics.clipRect(0, 0, width, height);
        return graphics;
    }

    protected void writeGraphicsSave() throws IOException {
View Full Code Here

Examples of org.freehep.graphicsio.svg.SVGGraphics2D.translate()

              ? planComponent.home.getName()
              : "" );
      properties.setProperty(SVGGraphics2D.FOR, System.getProperty("user.name", ""));
      exportG2D.setProperties(properties);
      exportG2D.startExport();
      exportG2D.translate(-svgItemBounds.getMinX() + extraMargin,
          -svgItemBounds.getMinY() + extraMargin);
     
      planComponent.checkCurrentThreadIsntInterrupted(PaintMode.EXPORT);
      planComponent.paintContent(exportG2D, svgScale, Color.WHITE, Color.BLACK, PaintMode.EXPORT);  
      exportG2D.endExport();
View Full Code Here

Examples of org.geomajas.gwt.client.spatial.Bbox.translate()

    // this gives the difference between integer positions and floating positions
    dx = dx  - (tile.getCache().getLayerBounds().getX() - panOrigin.getX());
    dy = dy  - (tile.getCache().getLayerBounds().getY() - panOrigin.getY());
    // now apply to our bounds
    Bbox  worldBounds = new Bbox(tile.getBounds());
    worldBounds.translate(-dx, -dy);
    // transform to pan space and round
    Bbox panBounds = mapView.getWorldViewTransformer().worldToPan(worldBounds);
    return new Bbox(Math.round(panBounds.getX()), Math.round(panBounds.getY()), Math.round(panBounds.getWidth()),
        Math.round(panBounds.getHeight()));
  }
View Full Code Here

Examples of org.geomajas.puregwt.client.spatial.Bbox.translate()

      double dX = (rescalePoint.getX() - position.getX()) * (1 - 1 / factor);
      double dY = (rescalePoint.getY() - position.getY()) * (1 - 1 / factor);

      // Apply translation to set the BBOX on the correct location:
      newBbox.setCenterPoint(new Coordinate(position.getX(), position.getY()));
      newBbox.translate(dX, dY);

      // Now apply on this view port:
      scale = limitedScale;
      position = newBbox.getCenterPoint();
      if (eventBus != null) {
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.