Examples of Asset


Examples of assetmanager.Asset

    }

    private void addFontIfMissing(URL font, String fontName) throws IOException {
        if(assetDatabase.getFontByName(fontName) == null) {
            u.p("installing default font: " + font);
            Asset asset = assetDatabase.copyAndAddFont(font);
            new FontBuilder(asset.getFile()).resolve();
        } else {
            //u.p("the font is already instaleld: " + fontName);
            Asset asset = assetDatabase.getFontByName(fontName);
            new FontBuilder(asset.getFile()).resolve();
        }
    }
View Full Code Here

Examples of assetmanager.Asset

    public void addPattern(PatternPaint pat) {
        patternModel.add(pat);
        try {
            File file = File.createTempFile("foo", "png");
            ImageIO.write(pat.getImage(),"png",file);
            Asset asset = db.copyAndAddPattern(file);
            asset.setName("generated pattern");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of assetmanager.Asset

                        new File(resources, "common.css"));
                Util.copyToFile(this.getClass().getResourceAsStream("resources/cowboy.css"),
                        new File(resources, "cowboy.css"));
                Util.copyToFile(this.getClass().getResourceAsStream("resources/cowboybg.png"),
                        new File(resources, "cowboybg.png"));
                Asset font = Main.getDatabase().getFontByName("ChunkFive");//.getInputStream();
                Util.copyToFile(font.getInputStream(), new File(resources, "ChunkFive.ttf"));
            } catch (IOException e) {
                e.printStackTrace();
            }

        }
View Full Code Here

Examples of com.artemis.ParamArchTest.Asset

      c.y = _velocity_y;
      _velocity = false;
    }
   
    if (_asset) {
      Asset c = assetMapper.get(e);
      c.path =  _asset_path;
      _asset = false;
    }
   
    if (_size) {
View Full Code Here

Examples of com.artemis.component.Asset

      c.x = _velocity_x;
      _id_velocity_x_ = false;
    }
   
    if (_id_asset_path_) {
      Asset c = assetMapper.get(e);
      c.path = _asset_path;
      _id_asset_path_ = false;
    }
   
    if (_id_culled_culled_) {
      Cullible c = cullibleMapper.get(e);
      c.culled = _cullible_culled;
      _id_culled_culled_ = false;
    }
   
    {
      HitPoints c = hitPointsMapper.get(e);
      c.current = _hitPoints_current;
    }
   
    if (_id_pos_x_y_) {
      Complex c = complexMapper.get(e);
      c.pos(_complex_x, _complex_y);
      _id_pos_x_y_ = false;
    }
   
    if (_id_hoho_x_y_) {
      Complex c = complexMapper.get(e);
      c.vel(_complex_x, _complex_y);
      _id_hoho_x_y_ = false;
    }
   
    if (_tag) {
      tagManager.register(_tag_tag, e);
View Full Code Here

Examples of com.cardence.lawshelf.ios.xml.Asset

        // this is probably used more when there isn't too much overlap
        // (i.e. multiple us codes)
        // in the db
        List<Integer> codeIds = uiGetCodeId.getAllCodeIds();
        for (Integer codeId : codeIds) {
          Asset asset = converter.convertCodeWithID(codeId);
          writeAsset(asset, true);
          writeAsset(asset, false);
        }
      } else {
        do {
          // select a collection -> this is the context for the next
          // questions
          int collectionId = uiGetCollectionId.getDesiredCollectionId();
          if (uiShouldProcessAll.getShouldProcessAll()) {
            // process all codes for just this collection
            List<Integer> codeIds = uiGetCodeId.getAllCodeIds(collectionId);
            for (Integer codeId : codeIds) {
              Asset asset = converter.convertCodeWithID(codeId);
              writeAsset(asset, true);
              writeAsset(asset, false);
            }
          } else {
            // process on an individual level
            do {
              int codeId = uiGetCodeId.getDesiredCodeId(collectionId);

              Asset asset = converter.convertCodeWithID(codeId);
              writeAsset(asset, true);
              writeAsset(asset, false);

            } while (uiShouldContinue.getShouldContinue());
          }
View Full Code Here

Examples of com.day.cq.dam.api.Asset

public class DAMFunctionsTest {

    @Test
    public void testGetTitleOrName() {
        Asset assetWithTitle = mock(Asset.class);
        String title = RandomStringUtils.randomAlphanumeric(10);
        when(assetWithTitle.getMetadataValue(DamConstants.DC_TITLE)).thenReturn(title);
        assertEquals(title, DAMFunctions.getTitleOrName(assetWithTitle));

        Asset assetWithoutTitle = mock(Asset.class);
        String name = RandomStringUtils.randomAlphanumeric(10);
        when(assetWithoutTitle.getName()).thenReturn(name);
        assertEquals(name, DAMFunctions.getTitleOrName(assetWithoutTitle));

        verify(assetWithTitle, only()).getMetadataValue(DamConstants.DC_TITLE);
        verify(assetWithoutTitle).getMetadataValue(DamConstants.DC_TITLE);
        verify(assetWithoutTitle).getName();
View Full Code Here

Examples of com.day.cq.dam.api.Asset

        when(workItem.getWorkflowData()).thenReturn(data);
        when(data.getPayloadType()).thenReturn(AbstractAssetWorkflowProcess.TYPE_JCR_PATH);
        when(data.getPayload()).thenReturn(path);

        Resource resource = mock(Resource.class);
        Asset asset = mock(Asset.class);
        when(resource.adaptTo(Asset.class)).thenReturn(asset);
        when(resource.getResourceType()).thenReturn(DamConstants.NT_DAM_ASSET);

        when(resourceResolver.getResource(path)).thenReturn(resource);
View Full Code Here

Examples of com.day.cq.dam.api.Asset

        when(workItem.getWorkflowData()).thenReturn(data);
        when(data.getPayloadType()).thenReturn(AbstractAssetWorkflowProcess.TYPE_JCR_PATH);
        when(data.getPayload()).thenReturn(path);

        Resource resource = mock(Resource.class);
        Asset asset = mock(Asset.class);
        Rendition rendition = mock(Rendition.class);
        when(resource.adaptTo(Asset.class)).thenReturn(asset);
        when(resource.getResourceType()).thenReturn(DamConstants.NT_DAM_ASSET);
        when(resourceResolver.getResource(path)).thenReturn(resource);
        when(asset.getRendition(isA(RenditionPicker.class))).thenReturn(rendition);

        when(rendition.getStream()).then(new Answer<InputStream>() {

            @Override
            public InputStream answer(InvocationOnMock invocation) throws Throwable {
View Full Code Here

Examples of com.day.cq.dam.api.Asset

        if (renditionName == null) {
            log.warn("Rendition name was not configured in arguments. Skipping.");
            return;
        }

        final Asset asset = getAssetFromPayload(workItem, workflowSession.getSession());
        final Rendition rendition = asset.getRendition(new PrefixRenditionPicker(renditionName));

        if (rendition == null) {
            log.warn("Rendition name {} was not available for asset {}. Skipping.", renditionName, asset);
            return;
        }
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.