Add a cursor image. Once there are no more images to add, a call to {@link #load()} will be necessary.

@param id The cursor id.
@param media The cursor media.
@throws LionEngineException If invalid media.
338489
public void addImage(int id, Media media)
    {
        final Integer key = Integer.valueOf(id);
        surfaces.put(key, Drawable.loadImage(media));
        if (surfaceId == null)
        {
            surfaceId = key;
        }
    }
23319
public static ImageHeader get(Media media)
    {
        Check.notNull(media);

        for (final ImageHeaderReader reader : FORMATS)
        {
            if (reader.is(media))
            {
                return read(media, reader);
            }
        }
        throw new LionEngineException(media, ERROR_READ);
    }
1099990
public static void add(Id id, Map<String, Object> data){
        DDSCluster.call(new MessageBean(MongoDBDDS.class,
                id.getDatabase(),id.getCollection(),id.getEntity(),
                "add",data));
    }
394283
public void addTagID(String tagID, String name)
    {
        if (_focusMap == null) {
            _focusMap = new HashMap();
        }
        _focusMap.put(tagID, name);
    }
1100728
public void addInstance(String src,String id,String text) 
    {
        Instance inst = new Instance(src,id,text);
        ArrayList list = (ArrayList)sourceLists.get(src);
        if (list==null) {
            list = new ArrayList();
            sourceLists.put(src,list);
            sourceNames.add(src);
        }
        list.add(inst);
    }
239755
public ImageHelper load(ImageView v, Request request) {
        loadInternal(v, request, listener, null);

        return this;
    }
1125452
@Override
    public void add(int index, Object element) {
        rewrite |= index < delegate.size();

        delegate.add(index, element);
    }
631574
public void save(Media media)
    {
        Check.notNull(media);

        try (OutputStream output = media.getOutputStream())
        {
            final Transformer transformer = DocumentFactory.createTransformer();
            normalize(NORMALIZE);
            writeString(Constant.XML_HEADER, Constant.ENGINE_WEBSITE);
            final DOMSource source = new DOMSource(root);
            final StreamResult result = new StreamResult(output);
            final String yes = "yes";
            transformer.setOutputProperty(OutputKeys.INDENT, yes);
            transformer.setOutputProperty(OutputKeys.STANDALONE, yes);
            transformer.setOutputProperty(PROPERTY_INDENT, "4");
            transformer.transform(source, result);
        }
        catch (final TransformerException | IOException exception)
        {
            throw new LionEngineException(exception, media, ERROR_WRITING);
        }
    }
917588
public void add(T style)
    {
        Integer cnt = styles.get(style);
        if (cnt == null)
            styles.put(style, 1);
        else
            styles.put(style, cnt+1);
    }
589599
public void addRequire(final String id, final String importance) {
        final PluginRequirement requirement = new PluginRequirement();
        requirement.addPlugins(id);
        if (importance != null) {
            requirement.setRequired(importance.equals("required"));
        }
        requireList.add(requirement);
    }
1118932
void load(Cursor cursor) {
        assetRoot = new GVRSceneObject(cursor.getGVRContext());
        assetRoot.attachComponent(new GVRSwitch(cursor.getGVRContext()));
        for (CursorAsset asset : assets.values()) {
            asset.load(cursor);
        }
    }
121035
public void addScannerId(final int query_index, final int id, 
      final String string_id) {
    Map<Integer, String> scanners = scanner_ids.get(query_index);
    if (scanners == null) {
      scanners = new ConcurrentHashMap<Integer, String>();
      scanner_ids.put(query_index, scanners);
    }
    scanners.put(id, string_id);
  }
1314182
protected function addMediaToEntity($entityName, $id, $mediaId)
    {
        try {
            $em = $this->getDoctrine()->getManager();
            $entity = $em->getRepository($entityName)->find($id);
            $media = $this->container->get('sulu.repository.media')->find($mediaId);

            if (!$entity) {
                throw new EntityNotFoundException($entityName, $id);
            }

            if (!$media) {
                throw new EntityNotFoundException($this->getParameter('sulu.model.media.class'), $mediaId);
            }

            if ($entity->getMedias()->contains($media)) {
                throw new RestException('Relation already exists');
            }

            $entity->addMedia($media);
            $em->flush();

            $view = $this->view(
                new Media(
                    $media,
                    $this->getUser()->getLocale(),
                    null
                ),
                200
            );
        } catch (EntityNotFoundException $enfe) {
            $view = $this->view($enfe->toArray(), 404);
        } catch (RestException $exc) {
            $view = $this->view($exc->toArray(), 400);
        } catch (\Exception $e) {
            $view = $this->view($e->getMessage(), 400);
        }

        return $this->handleView($view);
    }
393170
protected BufferedImage loadImage (ImageKey key)
    {
//         if (EventQueue.isDispatchThread()) {
//             Log.info("Loading image on AWT thread " + key + ".");
//         }

        BufferedImage image = null;
        try {
            log.debug("Loading image " + key + ".");
            image = key.daprov.loadImage(key.path);
            if (image == null) {
                log.warning("ImageDataProvider.loadImage(" + key + ") returned null.");
            }

        } catch (Exception e) {
            log.warning("Unable to load image '" + key + "'.", e);

            // create a blank image in its stead
            image = createImage(1, 1, Transparency.OPAQUE);
        }

        return image;
    }
17327
private void setId(String id) {
        requireArgument(id != null && !id.trim().isEmpty(), "ID cannot be null or empty.");
        _id = id;
    }
1246656
static synchronized <T extends Model> void load(T entity, Cursor cursor) {
		sAdapterHolder.getModelAdapter(entity.getClass()).load(entity, cursor);
	}
272738
public void setBufferedImage(BufferedImage img) {
        image = img;
        width = img.getWidth();
        height = img.getHeight();
        updateColorArray();
    }