Class APTImageHRef

  extended by
      extended by

public class APTImageHRef
extends APT

This represents an image href for an image in a APT document. The href occurs as a separate tag in the content.xml file of the .odt document therefore there is a separate model to represent it to make life easier. The APTImage model will become a parent and receive this model as a child, and when it gets it, it will use it as a href.

The setValue() methods in the APT base class is called for each element value in the content.xml file when it is parsed. The href is however not an element value, but an attribute. The value field in the APT base class is not intended to only be a reflection of xml element values. It is really only a value and the origins of the value is irrelevant. That said, my personal emotions and feelings didn't like putting the attribute href in the value, for some reason I cannot explain, so it is stored as a private field in this class instead.

Field Summary
private  String href
          The image href.
Constructor Summary
APTImageHRef(String href)
          Creates a new APTImageHRef instance.
Method Summary
 String getValue()
          Returns the href.
Methods inherited from class
done, formatText, getParent, getUnformattedValue, hasValue, isAllowFormat, isLink, setAllowFormat, setLink, setParent, setValue, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail


private String href
The image href.

Constructor Detail


public APTImageHRef(String href)
Creates a new APTImageHRef instance.

href - The image href.
Method Detail


public String getValue()
Returns the href.

getValue in class APT

Copyright © 2009-2010 Biltmore Group AB. All Rights Reserved.