|
From: <lo...@us...> - 2010-03-25 16:30:30
|
Revision: 2398
http://qtitools.svn.sourceforge.net/qtitools/?rev=2398&view=rev
Author: loccy
Date: 2010-03-25 16:30:23 +0000 (Thu, 25 Mar 2010)
Log Message:
-----------
MQ: A few UI aesthetics in the new MCQ quick creator.
Modified Paths:
--------------
Mathqurate/trunk/mathqurate/src/main/java/org/qtitools/mathqurate/view/SimpleChoiceWizard.java
Modified: Mathqurate/trunk/mathqurate/src/main/java/org/qtitools/mathqurate/view/SimpleChoiceWizard.java
===================================================================
--- Mathqurate/trunk/mathqurate/src/main/java/org/qtitools/mathqurate/view/SimpleChoiceWizard.java 2010-03-25 16:15:27 UTC (rev 2397)
+++ Mathqurate/trunk/mathqurate/src/main/java/org/qtitools/mathqurate/view/SimpleChoiceWizard.java 2010-03-25 16:30:23 UTC (rev 2398)
@@ -40,6 +40,7 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import org.apache.commons.lang.WordUtils;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.layout.LayoutConstants;
@@ -428,19 +429,28 @@
titlelayout.horizontalAlignment = GridData.FILL;
titlelayout.grabExcessHorizontalSpace = true;
title.setLayoutData(titlelayout);
- title.setToolTipText("The question title. This will usually appear at the top of the page when a question is displayed.");
+ title.setToolTipText(toolTipWrap("The question title. This will usually appear at the "+
+ "top of the page when a question is displayed."));
// preamble text
- new Label(parent,SWT.NONE).setText("Question Preamble");
+ new Label(parent,SWT.NONE).setText("Question Text");
preamble = new Text(parent,SWT.WRAP);
preambleLayout = new GridData(1,50);
preambleLayout.horizontalAlignment = GridData.FILL;
preambleLayout.grabExcessHorizontalSpace = true;
preamble.setLayoutData(preambleLayout);
-
+ preamble.setToolTipText(toolTipWrap("The actual test of your question, e.g. \"What is 2+2?\""));
+
tableViewer = createTableViewer(parent);
tableViewer.setInput(values);
tableViewer.refresh();
+ tableViewer.getTable().setToolTipText(toolTipWrap("This table is where you should enter the potential "+
+ "answers to your question. In the first column fill out " +
+ "the text for the possible answer. In the second column, "+
+ "select whether the question is correct, \"almost "+
+ "correct\", or wrong. (The \"almost\" option allows you to "+
+ "give some marks for a good attempt or partially right "+
+ "answer - you don't have to use it if you don't want.)"));
GridData tableLayout = new GridData();
tableLayout.minimumHeight = 200;
@@ -807,7 +817,16 @@
}
+ public static String toolTipWrap(String s)
+ {
+ if (System.getProperty("os.name").contains("Mac"))
+ {
+ return s;
+ }
+ else return WordUtils.wrap (s, 60, "\n", true);
+ }
+
/* (non-Javadoc)
* @see org.eclipse.jface.window.Window#initializeBounds()
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|