*/
public class BasicLinkLayoutManager extends InlineStackingLayoutManager {
- private String link;
- private boolean isExternalLink = false;
+ private String externalLink;
+ private String internalLink;
/**
* Create an fo:basic-link layout manager.
*/
public BasicLinkLayoutManager(BasicLink node) {
super(node);
- link = node.getLink();
- isExternalLink = node.isExternalLink();
+ externalLink = node.getExternalDestination();
+ internalLink = node.getInternalDestination();
}
protected InlineParent createArea() {
private void setupBasicLinkArea(LayoutManager parentLM,
InlineParent area) {
- if (isExternalLink) {
- area.addTrait(Trait.EXTERNAL_LINK, link);
+ if (externalLink != null) {
+ area.addTrait(Trait.EXTERNAL_LINK, externalLink);
} else {
+ String link = internalLink;
PageViewport page = parentLM.resolveRefID(link);
if (page != null) {
area.addTrait(Trait.INTERNAL_LINK, page.getKey());