1 |
/* JTabbedPane.java -- |
/* JTabbedPane.java -- |
2 |
Copyright (C) 2002, 2004 Free Software Foundation, Inc. |
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
56 |
import javax.swing.plaf.UIResource; |
import javax.swing.plaf.UIResource; |
57 |
|
|
58 |
/** |
/** |
|
* <p> |
|
59 |
* This is a container for components. One component is displayed at a time. |
* This is a container for components. One component is displayed at a time. |
60 |
* Users can switch between components by clicking on tabs. |
* Users can switch between components by clicking on tabs. |
|
* </p> |
|
61 |
* |
* |
62 |
* <p> |
* <p> |
63 |
* Tabs can be oriented in several ways. They can be above, below, left and |
* Tabs can be oriented in several ways. They can be above, below, left and |
530 |
} |
} |
531 |
} |
} |
532 |
|
|
|
/** Fired in a PropertyChangeEvent when the "model" property changes. */ |
|
|
public static final String MODEL_CHANGED_PROPERTY = "model"; |
|
|
|
|
|
/** |
|
|
* Fired in a PropertyChangeEvent when the "tabPlacement" property changes. |
|
|
*/ |
|
|
public static final String TAB_PLACEMENT_CHANGED_PROPERTY = "tabPlacement"; |
|
|
|
|
|
/** |
|
|
* Fired in a PropertyChangeEvent when the "tabLayoutPolicy" property |
|
|
* changes. |
|
|
*/ |
|
|
public static final String TAB_LAYOUT_POLICY_CHANGED_PROPERTY = "tabLayoutPolicy"; |
|
|
|
|
533 |
/** The changeEvent used to fire changes to listeners. */ |
/** The changeEvent used to fire changes to listeners. */ |
534 |
protected ChangeEvent changeEvent; |
protected ChangeEvent changeEvent; |
535 |
|
|
723 |
this.model.removeChangeListener(changeListener); |
this.model.removeChangeListener(changeListener); |
724 |
this.model = model; |
this.model = model; |
725 |
this.model.addChangeListener(changeListener); |
this.model.addChangeListener(changeListener); |
726 |
firePropertyChange(MODEL_CHANGED_PROPERTY, oldModel, this.model); |
firePropertyChange("model", oldModel, this.model); |
727 |
} |
} |
728 |
} |
} |
729 |
|
|
754 |
{ |
{ |
755 |
int oldPlacement = this.tabPlacement; |
int oldPlacement = this.tabPlacement; |
756 |
this.tabPlacement = tabPlacement; |
this.tabPlacement = tabPlacement; |
757 |
firePropertyChange(TAB_PLACEMENT_CHANGED_PROPERTY, oldPlacement, |
firePropertyChange("tabPlacement", oldPlacement, this.tabPlacement); |
|
this.tabPlacement); |
|
758 |
} |
} |
759 |
} |
} |
760 |
|
|
785 |
{ |
{ |
786 |
int oldPolicy = layoutPolicy; |
int oldPolicy = layoutPolicy; |
787 |
layoutPolicy = tabLayoutPolicy; |
layoutPolicy = tabLayoutPolicy; |
788 |
firePropertyChange(TAB_LAYOUT_POLICY_CHANGED_PROPERTY, oldPolicy, |
firePropertyChange("tabLayoutPolicy", oldPolicy, layoutPolicy); |
|
layoutPolicy); |
|
789 |
} |
} |
790 |
} |
} |
791 |
|
|