/*
 * @(#)PDFLink.java  1.0  2011-07-17
 * 
 * Copyright (c) 2011 Werner Randelshofer, Immensee, Switzerland.
 * All rights reserved.
 * 
 * You may not use, copy or modify this file, except in compliance with the
 * license agreement you entered into with Werner Randelshofer.
 * For details see accompanying license terms.
 */
package com.sun.pdfview;

import com.sun.pdfview.action.PDFAction;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;

    // BEGIN PATCH W. Randelshofer
/**
 * {@code PDFLink}.
 *
 * @author Werner Randelshofer
 * @version 1.0 2011-07-17 Created.
 */
public class PDFLink {
    /** The action associated with the link.*/
   private PDFAction action;
    /** The bounds of the link.*/
   private Rectangle2D.Float bounds;
   
   public PDFLink(PDFAction action, Rectangle2D.Float bounds) {
       this.action=action;
       this.bounds=bounds;
   }
   
   public PDFAction getAction() {
       return action;
   }
   public boolean contains(Point2D p) {
       return bounds.contains(p);
   }
   
   public String toString() {
       return "PDFLink{"+bounds+","+action+"}";
   }
}
    // END PATCH W. Randelshofer
