01: /*
02: * de.jwic.controls.AnchorLinkControl
03: * $Id: AnchorLinkControl.java,v 1.2 2006/08/09 14:52:40 lordsam Exp $
04: */
05: package de.jwic.controls;
06:
07: import de.jwic.base.IControlContainer;
08:
09: /**
10: * Displays an anchor (<a href="...">) link.
11: * @author Florian Lippisch
12: * @version $Revision: 1.2 $
13: */
14: public class AnchorLinkControl extends SelectableControl {
15:
16: private static final long serialVersionUID = 1L;
17:
18: private String title = null;
19: private String infoMessage = null;
20:
21: /**
22: * @param container
23: */
24: public AnchorLinkControl(IControlContainer container) {
25: super (container);
26: title = getName();
27: }
28:
29: /**
30: * @param container
31: * @param name
32: */
33: public AnchorLinkControl(IControlContainer container, String name) {
34: super (container, name);
35: title = name;
36: }
37:
38: /* (non-Javadoc)
39: * @see de.jwic.base.Control#actionPerformed(java.lang.String, java.lang.String)
40: */
41: public void actionPerformed(String actionId, String parameter) {
42:
43: click();
44:
45: }
46:
47: /**
48: * @return Returns the title.
49: */
50: public String getTitle() {
51: return title;
52: }
53:
54: /**
55: * @param title The title to set.
56: */
57: public void setTitle(String title) {
58: this .title = title;
59: setRequireRedraw(true);
60: }
61:
62: /**
63: * @return Returns the infoMessage.
64: */
65: public String getInfoMessage() {
66: return infoMessage;
67: }
68:
69: /**
70: * This text is displayed in the infobar of the browser during mouseover and as the
71: * title of the anchor tag, wich results in a little popup info.
72: * @param infoMessage The infoMessage to set.
73: */
74: public void setInfoMessage(String infoMessage) {
75: this .infoMessage = infoMessage;
76: setRequireRedraw(true);
77: }
78: }
|