]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - demo/plugins/org.argeo.demo.i18n/src/main/java/org/argeo/demo/i18n/editors/SimplePage.java
Introduce check-osgi profile
[lgpl/argeo-commons.git] / demo / plugins / org.argeo.demo.i18n / src / main / java / org / argeo / demo / i18n / editors / SimplePage.java
index b19056fbd2c77022901e4bc2589f17427589a4a5..127e11f1fc2056419e50266179373dc78f7177d7 100644 (file)
@@ -1,15 +1,23 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.argeo.demo.i18n.editors;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
+import org.argeo.demo.i18n.I18nDemoMessages;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
 import org.eclipse.ui.forms.AbstractFormPart;
 import org.eclipse.ui.forms.IManagedForm;
 import org.eclipse.ui.forms.editor.FormEditor;
@@ -23,7 +31,7 @@ import org.eclipse.ui.forms.widgets.ScrolledForm;
  */
 
 public class SimplePage extends FormPage {
-       private final static Log log = LogFactory.getLog(SimplePage.class);
+       // private final static Log log = LogFactory.getLog(SimplePage.class);
 
        // Utils
        // protected DateFormat timeFormatter = new
@@ -31,7 +39,8 @@ public class SimplePage extends FormPage {
 
        // This page widgets
        private FormToolkit tk;
-       private List<Control> modifyableProperties = new ArrayList<Control>();
+
+       // private List<Control> modifyableProperties = new ArrayList<Control>();
 
        public SimplePage(FormEditor editor, String title) {
                super(editor, "id", title);
@@ -49,7 +58,7 @@ public class SimplePage extends FormPage {
 
        private void createPropertiesPart(Composite parent) {
                // Initializes form part
-               tk.createLabel(parent, "Implement something");
+               tk.createLabel(parent, I18nDemoMessages.get().SimplePage_DescriptionTxt);
                AbstractFormPart part = new AbstractFormPart() {
                        public void commit(boolean onSave) {
                                if (onSave) {
@@ -69,18 +78,15 @@ public class SimplePage extends FormPage {
        //
        // LISTENERS
        //
-
-       private class ModifiedFieldListener implements ModifyListener {
-
-               private AbstractFormPart formPart;
-
-               public ModifiedFieldListener(AbstractFormPart generalPart) {
-                       this.formPart = generalPart;
-               }
-
-               public void modifyText(ModifyEvent e) {
-                       formPart.markDirty();
-               }
-       }
-
+       /*
+        * UNUSED FOR THE TIME BEING private class ModifiedFieldListener implements
+        * ModifyListener {
+        * 
+        * private AbstractFormPart formPart;
+        * 
+        * public ModifiedFieldListener(AbstractFormPart generalPart) {
+        * this.formPart = generalPart; }
+        * 
+        * public void modifyText(ModifyEvent e) { formPart.markDirty(); } }
+        */
 }