Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.hwpf.usermodel
Class PictureRunMapper

    java.lang.Object
      org.apache.poi.hwpf.usermodel.PictureRunMapper

    public class PictureRunMapper

extends java.lang.Object

Helper class for mapping Pictures to Runs within a document. This allows for easy access to Pictures by Run, as well as a way to find "Escher Floating" Pictures which don't have the regular references in the main text. Provides access to the pictures by offset, iteration over the un-claimed, and peeking forward.

Constructor Summary
`PictureRunMapper(HWPFDocument doc)`

Method Summary
`Picture` | `getFor(CharacterRun cr)` Get the Picture for this run, if any
`boolean` | `hasBeenClaimed(Picture picture)` Has the given Picture been claimed by a non-Run yet?
`boolean` | `hasPicture(CharacterRun cr)` Does this run have a Picture in it?
`void` | `markAsClaimed(Picture picture)` Mark a Picture as claimed.
`Picture` | `nextUnclaimed()` Return the next unclaimed one, used towards the end
`int` | `pictureNumber(Picture picture)` Which Picture is this one of all the Pictures in the Document? Useful when trying to extract all Pictures with unique numbers or references

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PictureRunMapper

    public PictureRunMapper(HWPFDocument doc)

Method Detail

### hasPicture

    public boolean hasPicture(CharacterRun cr)

  Does this run have a Picture in it?

  See Also:
    `getFor(CharacterRun)`

### getFor

    public Picture getFor(CharacterRun cr)

  Get the Picture for this run, if any

### markAsClaimed

    public void markAsClaimed(Picture picture)

  Mark a Picture as claimed. Used when trying to match up non-Run based pictures

### hasBeenClaimed

    public boolean hasBeenClaimed(Picture picture)

  Has the given Picture been claimed by a non-Run yet?

### pictureNumber

    public int pictureNumber(Picture picture)

  Which Picture is this one of all the Pictures in the Document? Useful when trying to extract all Pictures with unique numbers or references

### nextUnclaimed

    public Picture nextUnclaimed()

  Return the next unclaimed one, used towards the end

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2017 The Apache Software Foundation or its licensors, as applicable.