pmHelpItem.java revision 2141:8b55f69b9419
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21/* 22 * 23 * ident "%Z%%M% %I% %E% SMI" 24 * 25 * Copyright (c) 1999 by Sun Microsystems, Inc. 26 * All rights reserved. 27 * 28 * pmHelpItem 29 * Abstraction of a help article 30 */ 31 32package com.sun.admin.pm.client; 33 34import java.awt.*; 35import java.awt.event.*; 36import java.util.*; 37 38import com.sun.admin.pm.server.*; 39 40class pmHelpItem extends Object { 41 String title; 42 String tag; 43 Vector keywords; 44 Vector seealso; 45 pmHelpContent content; 46 47 public pmHelpItem(String theTag) { 48 tag = theTag; 49 title = null; 50 keywords = null; 51 seealso = null; 52 content = null; 53 } 54 55 public String toString() { 56 /* 57 * String s = new String("Item: " + tag + "\n"); 58 * s += ("\ttitle: " + title + "\n"); 59 * s += ("\tkeywords: " + keywords + "\n"); 60 * s += ("\tseealso: " + seealso + "\n"); 61 * s += ("\tcontent: " + content + "\n"); 62 */ 63 return title; 64 } 65 66 67 public void setTag(String s) { 68 if (tag != null) 69 tag = new String(s); 70 } 71 72 public void setTitle(String s) { 73 if (s != null) 74 title = new String(s); 75 } 76 77 public void setKeywords(Vector v) { 78 if (v != null) 79 keywords = (Vector) v.clone(); 80 } 81 82 public void setSeeAlso(Vector v) { 83 if (v != null) 84 seealso = (Vector) v.clone(); 85 } 86 87 public void setContent(pmHelpContent c) { 88 if (c != null) 89 content = new pmHelpContent(c); 90 } 91 92} 93