01: /*
02: * de.jwic.controls.TabControl
03: * $Id: TabControl.java,v 1.2 2006/01/19 14:57:23 lordsam Exp $
04: */
05: package de.jwic.controls;
06:
07: import de.jwic.base.ControlContainer;
08: import de.jwic.base.IControlContainer;
09:
10: /**
11: * A Tab element is displayed in a TabStrip by modules.
12: *
13: * @author Florian Lippisch
14: */
15: public class TabControl extends ControlContainer {
16:
17: private static final long serialVersionUID = 1L;
18: private String strTitle = null;
19:
20: /**
21: * @param container
22: */
23: public TabControl(IControlContainer container) {
24: super (container);
25: }
26:
27: /**
28: * @param container
29: * @param name
30: */
31: public TabControl(IControlContainer container, String name) {
32: super (container, name);
33: }
34:
35: /**
36: * Returns the title of the tab.
37: * @return java.lang.String
38: */
39: public String getTitle() {
40: return strTitle;
41: }
42:
43: /**
44: * Sets the title of the tab.
45: * @param newTitle java.lang.String
46: */
47: public void setTitle(String newTitle) {
48: strTitle = newTitle;
49: getContainer().setRequireRedraw(true);
50: }
51:
52: /* (non-Javadoc)
53: * @see de.jwic.base.Control#setVisible(boolean)
54: */
55: public void setVisible(boolean newVisible) {
56: super .setVisible(newVisible);
57: // must notify the TabStripControl...
58: TabStripControl tsc = (TabStripControl) getContainer();
59: tsc.setRequireRedraw(true);
60: }
61: }
|