]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.spreadsheet.ui/src/org/simantics/spreadsheet/ui/editor/TextCellTab.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.spreadsheet.ui / src / org / simantics / spreadsheet / ui / editor / TextCellTab.java
index 2330497ae042f569a97ff8c0f1bceb34c925aea9..caceb1e9e586fc8e33e4e768506c6ff2c5957c72 100644 (file)
@@ -1,59 +1,59 @@
-package org.simantics.spreadsheet.ui.editor;\r
-\r
-import org.eclipse.jface.layout.GridDataFactory;\r
-import org.eclipse.jface.layout.GridLayoutFactory;\r
-import org.eclipse.swt.SWT;\r
-import org.eclipse.swt.graphics.Font;\r
-import org.eclipse.swt.widgets.Composite;\r
-import org.eclipse.swt.widgets.Display;\r
-import org.eclipse.ui.IWorkbenchSite;\r
-import org.simantics.browsing.ui.swt.widgets.Label;\r
-import org.simantics.browsing.ui.swt.widgets.TrackedText;\r
-import org.simantics.browsing.ui.swt.widgets.VariableStringPropertyFactory;\r
-import org.simantics.browsing.ui.swt.widgets.VariableStringPropertyTextModifier;\r
-import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport;\r
-import org.simantics.db.management.ISessionContext;\r
-import org.simantics.selectionview.PropertyTabContributorImpl;\r
-\r
-public class TextCellTab extends PropertyTabContributorImpl {\r
-\r
-    public void createControls(Composite body, IWorkbenchSite site, final ISessionContext context, WidgetSupport support) {\r
-\r
-        Display display = body.getDisplay();\r
-        Font font = new Font(display, "Arial", 12, SWT.NONE); \r
-\r
-       Composite composite = new Composite(body, SWT.NONE);\r
-        composite.setBackground(display.getSystemColor(SWT.COLOR_WHITE));\r
-        GridDataFactory.fillDefaults().grab(true, true).applyTo(composite);\r
-        GridLayoutFactory.fillDefaults().equalWidth(false).numColumns(2).applyTo(composite);\r
-       \r
-        Composite headerComposite = new Composite(composite, 0);\r
-        headerComposite.setBackground(display.getSystemColor(SWT.COLOR_BLACK));\r
-        GridDataFactory.fillDefaults().span(2, 1).grab(true, false).applyTo(headerComposite);\r
-        GridLayoutFactory.fillDefaults().equalWidth(false).numColumns(1).extendedMargins(2,2,2,2).applyTo(headerComposite);\r
-\r
-        Composite headerComposite2 = new Composite(headerComposite, 0);\r
-        headerComposite2.setBackground(display.getSystemColor(SWT.COLOR_WHITE));\r
-        GridDataFactory.fillDefaults().span(2, 1).grab(true, false).applyTo(headerComposite2);\r
-        GridLayoutFactory.fillDefaults().equalWidth(false).numColumns(1).extendedMargins(3,3,3,3).applyTo(headerComposite2);\r
-\r
-        Label header = new Label(headerComposite2, support, 0);\r
-        //header.setTextFactory(new VariableStringPropertyFactory(" Variable - %1", "#URI"));\r
-        header.setText("Text");\r
-        header.setFont(font);\r
-        header.setBackground(display.getSystemColor(SWT.COLOR_WHITE));\r
-        GridDataFactory.fillDefaults().grab(true, false).span(2, 1).align(SWT.CENTER, SWT.CENTER).applyTo(header.getWidget());\r
-        \r
-       Label label = new Label(composite, support, SWT.NONE);\r
-       label.setText("Text: ");\r
-        label.setBackground(display.getSystemColor(SWT.COLOR_WHITE));\r
-        GridDataFactory.fillDefaults().grab(false, false).applyTo(label.getWidget());\r
-       \r
-        TrackedText name = new TrackedText(composite, support, SWT.BORDER);\r
-        name.setTextFactory(new VariableStringPropertyFactory("#Label"));\r
-        name.addModifyListener(new VariableStringPropertyTextModifier("Label"));\r
-        GridDataFactory.fillDefaults().grab(true, false).applyTo(name.getWidget());\r
-        \r
-    }\r
-   \r
-}\r
+package org.simantics.spreadsheet.ui.editor;
+
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchSite;
+import org.simantics.browsing.ui.swt.widgets.Label;
+import org.simantics.browsing.ui.swt.widgets.TrackedText;
+import org.simantics.browsing.ui.swt.widgets.VariableStringPropertyFactory;
+import org.simantics.browsing.ui.swt.widgets.VariableStringPropertyTextModifier;
+import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport;
+import org.simantics.db.management.ISessionContext;
+import org.simantics.selectionview.PropertyTabContributorImpl;
+
+public class TextCellTab extends PropertyTabContributorImpl {
+
+    public void createControls(Composite body, IWorkbenchSite site, final ISessionContext context, WidgetSupport support) {
+
+        Display display = body.getDisplay();
+        Font font = new Font(display, "Arial", 12, SWT.NONE); 
+
+       Composite composite = new Composite(body, SWT.NONE);
+        composite.setBackground(display.getSystemColor(SWT.COLOR_WHITE));
+        GridDataFactory.fillDefaults().grab(true, true).applyTo(composite);
+        GridLayoutFactory.fillDefaults().equalWidth(false).numColumns(2).applyTo(composite);
+       
+        Composite headerComposite = new Composite(composite, 0);
+        headerComposite.setBackground(display.getSystemColor(SWT.COLOR_BLACK));
+        GridDataFactory.fillDefaults().span(2, 1).grab(true, false).applyTo(headerComposite);
+        GridLayoutFactory.fillDefaults().equalWidth(false).numColumns(1).extendedMargins(2,2,2,2).applyTo(headerComposite);
+
+        Composite headerComposite2 = new Composite(headerComposite, 0);
+        headerComposite2.setBackground(display.getSystemColor(SWT.COLOR_WHITE));
+        GridDataFactory.fillDefaults().span(2, 1).grab(true, false).applyTo(headerComposite2);
+        GridLayoutFactory.fillDefaults().equalWidth(false).numColumns(1).extendedMargins(3,3,3,3).applyTo(headerComposite2);
+
+        Label header = new Label(headerComposite2, support, 0);
+        //header.setTextFactory(new VariableStringPropertyFactory(" Variable - %1", "#URI"));
+        header.setText("Text");
+        header.setFont(font);
+        header.setBackground(display.getSystemColor(SWT.COLOR_WHITE));
+        GridDataFactory.fillDefaults().grab(true, false).span(2, 1).align(SWT.CENTER, SWT.CENTER).applyTo(header.getWidget());
+        
+       Label label = new Label(composite, support, SWT.NONE);
+       label.setText("Text: ");
+        label.setBackground(display.getSystemColor(SWT.COLOR_WHITE));
+        GridDataFactory.fillDefaults().grab(false, false).applyTo(label.getWidget());
+       
+        TrackedText name = new TrackedText(composite, support, SWT.BORDER);
+        name.setTextFactory(new VariableStringPropertyFactory("#Label"));
+        name.addModifyListener(new VariableStringPropertyTextModifier("Label"));
+        GridDataFactory.fillDefaults().grab(true, false).applyTo(name.getWidget());
+        
+    }
+   
+}