Examples of Image


Examples of org.eclipse.sapphire.modeling.annotations.Image

   
    public ImageData image()
    {
        if( ! this.imageInitialized )
        {
            final Image imageAnnotation = getAnnotation( Image.class );
           
            if( imageAnnotation != null )
            {
                try
                {
                    this.image = ImageData.readFromClassLoader( findAnnotationHostClass( imageAnnotation ), imageAnnotation.path() ).optional();
                }
                catch( Exception e )
                {
                    Sapphire.service( LoggingService.class ).log( e );
                }
View Full Code Here

Examples of org.eclipse.swt.graphics.Image

                if (imageDescriptor == null) {
                    return null;
                }

                Image icon = (Image) images.get(imageDescriptor);
                return icon;
            }

            public String getText(Object object) {
                Assert.isTrue(object instanceof IWorkingSet);
View Full Code Here

Examples of org.eclipse.uml2.uml.Image

   *
   * @generated NOT
   */
  public Image getIcon() {

    Image ImageNotFound = null;

    if(getBase_Property() != null) {
      Stereotype st = UMLUtil.getStereotype(this);

      Image image = st.getIcons().get(0);

      if(getDirection() == FlowDirection.IN) {
        image = st.getIcons().get(1);
      } else if(getDirection() == FlowDirection.OUT) {
        image = st.getIcons().get(2);
View Full Code Here

Examples of org.eurekastreams.server.domain.Image

     */
    public void write(final RenderedImage image, final String identifier) throws Exception
    {
        try
        {
            Image imageInDb = getMapper.execute(identifier);
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            ImageIO.write(image, "png", baos);

            if (imageInDb == null)
            {
                insertMapper.execute(new PersistenceRequest<Image>(new Image(identifier, baos.toByteArray())));
            }
            else
            {
                imageInDb.setImageBlob(baos.toByteArray());
                updateMapper.execute(new PersistenceRequest<Image>(imageInDb));
            }
        }
        catch (Exception ex)
        {
View Full Code Here

Examples of org.fluxtream.core.images.Image

        testCreateThumbnailHelper(IMAGE_6, 100, new Dimension(85, 100));
        testCreateThumbnailHelper(IMAGE_6, (int)Math.max(IMAGE_6_EXPECTED_SIZE.getHeight(), IMAGE_6_EXPECTED_SIZE.getWidth()), IMAGE_6_EXPECTED_SIZE);
    }

    private void testCreateThumbnailHelper(@NotNull final byte[] imageBytes, final int lengthOfLongestSideInPixels, @NotNull final Dimension expectedDimension) throws IOException {
        final Image thumbnail = ImageUtils.createJpegThumbnail(imageBytes, lengthOfLongestSideInPixels);
        Assert.assertNotNull(thumbnail);
        Assert.assertEquals(expectedDimension, new Dimension(thumbnail.getWidth(), thumbnail.getHeight()));
    }
View Full Code Here

Examples of org.geomajas.gwt.client.gfx.paintable.Image

    buttonLayout.setHeight(25);
    buttonLayout.setMembersMargin(10);
    IButton button1 = new IButton(I18nProvider.getSampleMessages().screenWorldBTNScreen());
    button1.setWidth("50%");

    final Image screenImage = new Image("imageInScreenSpace");
    screenImage.setHref(Geomajas.getIsomorphicDir() + "geomajas/example/images/smile.png");
    screenImage.setBounds(new Bbox(60, 60, 48, 48)); // Pixel coordinates
    screenImage.setStyle(new PictureStyle(0.6));

    button1.addClickHandler(new ClickHandler() {

      // Draw an image in screen space:
      public void onClick(ClickEvent event) {
        map.render(screenImage, RenderGroup.SCREEN, RenderStatus.ALL);
      }
    });
    buttonLayout.addMember(button1);

    IButton button2 = new IButton(I18nProvider.getSampleMessages().screenWorldBTNWorld());
    button2.setWidth("50%");

    // An image
    final Image worldImage = new Image("imageInWorldSpace");
    worldImage.setHref(Geomajas.getIsomorphicDir() + "geomajas/example/images/smile.png");
    worldImage.setBounds(new Bbox(-2000000, -2000000, 4000000, 4000000)); // Mercator coordinates
    worldImage.setStyle(new PictureStyle(0.8));

    // And some geometries
    final GfxGeometry worldGeometry = new GfxGeometry("MultiPolygonInWorldSpace");
    final GeometryFactory gf = new GeometryFactory(map.getMapModel().getSrid(), map.getMapModel().getPrecision());
    Polygon p1 = gf.createPolygon(gf.createLinearRing(new Bbox(10000000d, 1000d, 1000000d, 1000000d)), null);
View Full Code Here

Examples of org.ifmo.clgp.model.Image

            popup.show(tree, p.x, p.y);
        }
    }

    public Image getSelectedImage() {
        Image image = new Image();
        image.setCapacity(capacityTextField.getText());
        if (creationDateTextField.getText() != null && !creationDateTextField.getText().isEmpty()) {
            try {
                image.setCreationDate(df.parse(creationDateTextField.getText()));
            } catch (ParseException ex) {
                ex.printStackTrace();
            }
        } else {
            image.setCreationDate(null);
        }
        image.setDescription(descriptionArea.getText());
        image.setOperationSystem(operationSystemTextField.getText());
        return image;
    }
View Full Code Here

Examples of org.internna.iwebmvc.model.core.Image

        this.decipherer = decipherer;
    }

    @SuppressWarnings("unchecked")
    public Image getImage(String text) throws IllegalArgumentException {
        Image doc = new Image();
        Properties properties = new Properties();
        try {
            properties.load(IOUtils.toInputStream(text));
            String uri = properties.getProperty("uri");
            Assert.isEncrypted(decipherer, uri);
            if (doc == null) doc = new Image();
            doc.setUri(decipherer.decrypt(uri));
            doc.setMimeType(properties.getProperty("mimeType"));
            doc.setIdentifier(properties.getProperty("identifier"));
            doc.setCreated(dateFormat.parse(properties.getProperty("created")));
            doc.setSizeInBytes(Long.parseLong(properties.getProperty("sizeInBytes")));
            doc.setWidth(Integer.parseInt(properties.getProperty("width")));
            doc.setHeight(Integer.parseInt(properties.getProperty("height")));
            return doc;
        } catch (Exception ex) {
            if (log.isDebugEnabled()) log.debug("Could not completely bind [" + text + "] as an Image: " + ex.getMessage());
        }
        return null;
View Full Code Here

Examples of org.jahia.services.image.Image

            if (contentManager
                    .checkExistence(node.getPath().replace(node.getName(), target), session) &&
                    !forceReplace) {
                throw new ExistingFileException("The file " + target + " already exists.");
            }
            Image image = imageService.getImage(node);
            File f = File.createTempFile("image", null);
            imageService.cropImage(image, f, top, left, width, height);

            InputStream fis = new BufferedInputStream(new FileInputStream(f));
            try {
View Full Code Here

Examples of org.javalite.activejdbc.test_models.Image

*/
public class BlobTest extends ActiveJDBCTest {

    @Test
    public void shouldWriteAndReadBytesToDb() throws SQLException, IOException {
        Image image = new Image();
        byte[] igorBytes = Util.readResourceBytes("/igor.jpg");
        image.set("name", "igor's head");
        image.set("content", igorBytes);
        image.saveIt();

        Image igor1 = (Image) Image.findAll().get(0);
        byte[] igor1Bytes = igor1.getBytes("content");
        assertEqual(igorBytes, igor1Bytes);
    }
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.