浏览代码

Merge pull request #654 from Yakindu/issue_603

fixed  Reconsider element documentation UI #603
Andreas Mülder 9 年之前
父节点
当前提交
51d1abf774

+ 2 - 3
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/propertysheets/AbstractTwoColumnEditorPropertySection.java

@@ -10,7 +10,6 @@
  */
 package org.yakindu.sct.ui.editor.propertysheets;
 
-import org.eclipse.draw2d.ColorConstants;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.SashForm;
 import org.eclipse.swt.layout.FillLayout;
@@ -33,8 +32,8 @@ public abstract class AbstractTwoColumnEditorPropertySection extends
 	public void createControls(Composite parent) {
 		parent.setLayout(new FillLayout());
 		SashForm sashForm = new SashForm(parent, SWT.HORIZONTAL | SWT.SMOOTH);
-		sashForm.setSashWidth(5);
-		sashForm.setBackground(ColorConstants.white);
+		sashForm.setSashWidth(2);
+		sashForm.setBackground(sashForm.getDisplay().getSystemColor( SWT.COLOR_GRAY));
 		sashForm.setLayout(new FillLayout());
 		Composite leftColumn = getToolkit().createComposite(sashForm);
 		leftColumn.setLayout(createLeftColumnLayout());

+ 4 - 4
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/propertysheets/StatePropertySection.java

@@ -84,11 +84,11 @@ public class StatePropertySection extends AbstractTwoColumnEditorPropertySection
 		GridDataFactory.fillDefaults().grab(true, false).applyTo(txtName);
 	}
 
-	protected void createDocumentationControl(Composite rightColumn) {
-		Label lblDocumentation = getToolkit().createLabel(rightColumn, "Documentation: ");
-		txtDoc = getToolkit().createText(rightColumn, "", SWT.MULTI);
+	protected void createDocumentationControl(Composite parent) {
+		Label lblDocumentation = getToolkit().createLabel(parent, "Documentation: ");
+		txtDoc = getToolkit().createText(parent, "", SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.WRAP);
 		GridDataFactory.fillDefaults().applyTo(lblDocumentation);
-		GridDataFactory.fillDefaults().grab(true, true).applyTo(txtDoc);
+		GridDataFactory.fillDefaults().grab(true, true).hint(parent.getSize()).applyTo(txtDoc);
 	}
 
 	protected void createSpecificationControl(final Composite parent) {

+ 4 - 5
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/propertysheets/StatechartPropertySection.java

@@ -120,12 +120,11 @@ public class StatechartPropertySection extends AbstractTwoColumnEditorPropertySe
 		GridDataFactory.fillDefaults().span(2, 0).grab(true, false).applyTo(orderElementControl);
 	}
 
-	protected void createDocumentationControl(Composite rightColumn) {
-		Label lblDocumentation = getToolkit().createLabel(rightColumn, "Documentation: ");
-		documentation = getToolkit().createText(rightColumn, "", SWT.MULTI);
+	protected void createDocumentationControl(Composite parent) {
+		Label lblDocumentation = getToolkit().createLabel(parent, "Documentation: ");
+		documentation = getToolkit().createText(parent, "", SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.WRAP);
 		GridDataFactory.fillDefaults().applyTo(lblDocumentation);
-		GridDataFactory.fillDefaults().grab(true, true).applyTo(documentation);
-
+		GridDataFactory.fillDefaults().grab(true, true).hint(parent.getSize()).applyTo(documentation);
 	}
 
 	protected void createSpecificationControl(final Composite parent) {

+ 2 - 2
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/propertysheets/TransitionPropertySection.java

@@ -70,9 +70,9 @@ public class TransitionPropertySection extends AbstractTwoColumnEditorPropertySe
 	@Override
 	protected void createRightColumnControls(Composite parent) {
 		Label lblDocumentation = getToolkit().createLabel(parent, "Documentation: ");
-		txtDoc = getToolkit().createText(parent, "", SWT.MULTI);
+		txtDoc = getToolkit().createText(parent, "", SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.WRAP);
 		GridDataFactory.fillDefaults().span(2, 1).applyTo(lblDocumentation);
-		GridDataFactory.fillDefaults().grab(true, true).applyTo(txtDoc);
+		GridDataFactory.fillDefaults().grab(true, true).hint(parent.getSize()).applyTo(txtDoc);
 	}
 
 	@Override