+/*
+ * 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;
*/
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
// 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);
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) {
//
// 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(); } }
+ */
}