[jboss-svn-commits] JBL Code SVN: r13706 - labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Sun Jul 22 07:31:23 EDT 2007


Author: arhan
Date: 2007-07-22 07:31:22 -0400 (Sun, 22 Jul 2007)
New Revision: 13706

Modified:
   labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/RuleModeller.java
Log:
title font changed

Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/RuleModeller.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/RuleModeller.java	2007-07-22 10:50:37 UTC (rev 13705)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/RuleModeller.java	2007-07-22 11:31:22 UTC (rev 13706)
@@ -14,6 +14,8 @@
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.window.Window;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
@@ -76,7 +78,7 @@
         this.model = model;
         this.editor = editor;
 
-        form.setText( "Rule Builder" );
+        setTitleAndFont(form);
 
         ColumnLayout colLayout = new ColumnLayout();
         colLayout.minNumColumns = 1;
@@ -126,6 +128,21 @@
 
     }
 
+	private void setTitleAndFont(ScrolledForm form) {
+		form.setText( "Guided rule editor" );
+        
+		Font systemFont = form.getDisplay().getSystemFont();
+		FontData[] exfds = systemFont.getFontData();
+        if ( exfds.length > 0 ) {
+            FontData fd = exfds[0];
+            fd.setHeight( fd.getHeight() + 2 );
+            fd.setStyle(SWT.BOLD);
+            Font f = new Font( systemFont.getDevice(),
+                               fd );
+            form.setFont(f);
+        }
+	}
+
     public SuggestionCompletionEngine getSuggestionCompletionEngine() {
         return editor.getCompletionEngine();
     }




More information about the jboss-svn-commits mailing list