Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris McLaren2004-02-25 06:34:36 +0000
committerChris McLaren2004-02-25 06:34:36 +0000
commit8977332c6c0fcf49ecb91d80ddc2d25c89f43cf0 (patch)
tree2c84a7687972227827b2702a2e0c99b17beaa60d /bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveBarManager.java
parentb4ed121de3cbc712f242d62eaa829d20214f012f (diff)
downloadeclipse.platform.ui-8977332c6c0fcf49ecb91d80ddc2d25c89f43cf0.tar.gz
eclipse.platform.ui-8977332c6c0fcf49ecb91d80ddc2d25c89f43cf0.tar.xz
eclipse.platform.ui-8977332c6c0fcf49ecb91d80ddc2d25c89f43cf0.zip
*** empty log message ***
Diffstat (limited to 'bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveBarManager.java')
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveBarManager.java83
1 files changed, 42 insertions, 41 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveBarManager.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveBarManager.java
index 1a00f524c16..3bfa4c45812 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveBarManager.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveBarManager.java
@@ -18,45 +18,46 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.ToolBar;
public class PerspectiveBarManager extends ToolBarManager {
-
- /**
- * The symbolic font name for the small font (value <code>"org.eclipse.jface.smallfont"</code>).
- */
- public static final String SMALL_FONT = "org.eclipse.ui.smallFont"; //$NON-NLS-1$
-
- public PerspectiveBarManager(int style) {
- super(style);
- }
-
- public ToolBar createControl(Composite parent) {
- ToolBar control = super.createControl(parent);
- control.setFont(getFont());
- return control;
- }
-
- public PerspectiveBarManager(ToolBar toolbar) {
- super(toolbar);
- toolbar.setFont(getFont());
- }
-
- // TODO begin refactor this out?
- private CBanner banner;
-
- void layout(boolean b) {
- if (banner != null)
- banner.layout(b);
- }
-
- void setBanner(CBanner banner) {
- this.banner = banner;
- }
- // TODO end refactor this out?
-
- public void updateFont(){
- getControl().setFont(getFont());
- }
-
- private Font getFont(){
- return JFaceResources.getFont(SMALL_FONT);
- }
+
+ /**
+ * The symbolic font name for the small font (value <code>"org.eclipse.jface.smallfont"</code>).
+ */
+ public static final String SMALL_FONT = "org.eclipse.ui.smallFont"; //$NON-NLS-1$
+
+ public PerspectiveBarManager(int style) {
+ super(style);
+ }
+
+ public ToolBar createControl(Composite parent) {
+ ToolBar control = super.createControl(parent);
+
+ if (control != null && !control.isDisposed())
+ control.setFont(getFont());
+
+ return control;
+ }
+
+ public PerspectiveBarManager(ToolBar toolbar) {
+ super(toolbar);
+
+ if (toolbar != null && !toolbar.isDisposed())
+ toolbar.setFont(getFont());
+ }
+
+ // TODO begin refactor this out?
+ private CBanner banner;
+
+ void layout(boolean b) {
+ if (banner != null && !banner.isDisposed()) banner.layout(b);
+ }
+
+ void setBanner(CBanner banner) {
+ this.banner = banner;
+ }
+
+ // TODO end refactor this out?
+
+ private Font getFont() {
+ return JFaceResources.getFont(SMALL_FONT);
+ }
}

Back to the top