home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-08-14 | 2.9 KB | 125 lines |
- /*---------------------------------------------------------------------------
-
- Written by the Personal Journal developers of Dow Jones & Company, Inc.
-
- Dow Jones makes no representations or warranties about
- the suitability of this software, either express or
- implied, including but not limited to the implied warranties
- of merchantability, fitness for a particular purpose,
- or non-infringement. Dow Jones will not be liable for
- any damages suffered by a user as a result of using,
- modifying or distributing this software or its derivatives.
-
-
- @(#)PjAdSpec.java 0.00 16-Jan-96
-
- A specification for a Personal Journal advertisement.
-
- Authors:
-
- rphall Rick Hall
- jlee James Lee
-
- Version Ident:
-
- $Header: /PjJavaClient/src/pj/awt/PjAdSpec.java 4 1/24/96 1:33a Rphall $
-
- History:
-
- 16-Jan-1996 rphall Initial Creation
- 21-Mar-1996 jlee Added getLinkTitle() that returns the string title of the link
-
- ---------------------------------------------------------------------------*/
-
- package pj.awt;
-
- import pj.net.RemoteImage;
- import pj.net.RemoteString;
- import pj.net.RemoteURL;
-
- import java.awt.Image;
- import java.net.URL;
-
- /**
- * A specification for a Personal Journal advertisement.
- *
- * @version 0.00 16-Jan-1996
- * @author Rick Hall
- */
- public class PjAdSpec
- {
-
-
- // --- Instance variables
-
- /**
- * A RemoteImage containing an image for the ad
- */
- RemoteImage riAdImage;
-
- /**
- * A RemoteString containing text copy for the ad
- */
- RemoteString rsAdCopy;
-
- /**
- * A RemoteURL containing a home page link for the ad
- */
- RemoteURL ruAdURL;
-
-
- // --- Public constructors
-
- /**
- * Constructs an PjAdSpec
- *
- * @param ri A RemoteImage containing an image for the ad
- * @param rs A RemoteString containing text copy for the ad
- * @param ru A RemoteURL containing a home page link for the ad
- */
- public PjAdSpec( RemoteImage ri, RemoteString rs, RemoteURL ru)
- {
- riAdImage = ri;
- rsAdCopy = rs;
- ruAdURL = ru;
- System.out.println("Debug-PjAdSpec:constructed");
- }
-
- // --- Public operations
-
- /**
- * @return The ad image
- */
- public Image getImage()
- {
- return riAdImage.getImage();
- }
-
- /**
- * @return The ad copy. This operation blocks.
- */
- public String getCopy()
- {
- return rsAdCopy.getString();
- }
-
- /**
- * @return The ad home page link
- */
- public URL getLink()
- {
- return ruAdURL.getURL();
- }
-
- /**
- * @return The link title
- */
- public String getLinkTitle()
- {
- return ruAdURL.getURLTitle();
- }
-
-
-
- } // PjAdSpec
-