Project

General

Profile

« Previous | Next » 

Revision 7aacfa71

Added by Patrick Plitzner over 10 years ago

  • fixed initial setting of parameters of GatheringEventDescription
    • finished FieldObservation details view (except Date-field)

View differences:

.gitattributes
1228 1228
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/TermStore.java -text
1229 1229
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/internal/TaxeditorStorePlugin.java -text
1230 1230
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/bar/AuthenticatedUserBar.java -text
1231
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/basicFields/EntityCollectionElement.java -text
1231 1232
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/basicFields/EntitySelectionField.java -text
1232 1233
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/basicFields/EntitySelectionFieldController.java -text
1233 1234
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/basicFields/LanguageTextFieldController.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/basicFields/EntityCollectionElement.java
1
// $Id$
2
/**
3
* Copyright (C) 2013 EDIT
4
* European Distributed Institute of Taxonomy
5
* http://www.e-taxonomy.eu
6
*
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10
package eu.etaxonomy.taxeditor.ui.campanula.basicFields;
11

  
12
import org.eclipse.jface.action.Action;
13
import org.eclipse.jface.action.IAction;
14
import org.eclipse.jface.action.ToolBarManager;
15
import org.eclipse.swt.SWT;
16
import org.eclipse.swt.widgets.Composite;
17
import org.eclipse.swt.widgets.Display;
18
import org.eclipse.swt.widgets.Label;
19
import org.eclipse.swt.widgets.ToolBar;
20
import org.eclipse.ui.forms.widgets.ExpandableComposite;
21
import org.eclipse.ui.forms.widgets.FormToolkit;
22
import org.eclipse.wb.swt.ResourceManager;
23
import org.eclipse.wb.swt.SWTResourceManager;
24

  
25
/**
26
 * @author pplitzner
27
 * @date 16.08.2013
28
 *
29
 */
30
public class EntityCollectionElement extends ExpandableComposite {
31
    private final FormToolkit formToolkit = new FormToolkit(Display.getDefault());
32

  
33
    /**
34
     * Create the composite.
35
     * @param parent
36
     * @param style
37
     */
38
    public EntityCollectionElement(Composite parent, int style) {
39
        super(parent, style);
40
        setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
41
        setExpanded(true);
42

  
43
        ToolBar toolBar = new ToolBar(this, SWT.FLAT | SWT.RIGHT);
44
        setTextClient(toolBar);
45

  
46
        Label label = formToolkit.createLabel(this, "", SWT.NONE);
47
        setClient(label);
48

  
49
        ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
50

  
51
        Action addAction = new Action("add", IAction.AS_PUSH_BUTTON){
52
            /* (non-Javadoc)
53
             * @see org.eclipse.jface.action.Action#run()
54
             */
55
            @Override
56
            public void run() {
57
//                ELEMENT element = createNewElement();
58
//                if(element != null){
59
//                    addElement(element);
60
//                    if(! getSection().isExpanded()) {
61
//                        getSection().setExpanded(true);
62
//                    }
63
//                    internalUpdateSection(true);
64
//                }
65
            }
66
        };
67
        addAction.setImageDescriptor(ResourceManager.getPluginImageDescriptor("eu.etaxonomy.taxeditor.store", "icons/add_no_bg2.gif"));
68
//        addAction.setToolTipText(getTooltipString());
69

  
70
        toolBarManager.add(addAction);
71

  
72
    }
73

  
74
    @Override
75
    protected void checkSubclass() {
76
        // Disable the check that prevents subclassing of SWT components
77
    }
78

  
79
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/detailViews/fieldObservation/GatheringEventDetailsElement.java
14 14
import org.eclipse.swt.widgets.Display;
15 15
import org.eclipse.swt.widgets.Label;
16 16
import org.eclipse.swt.widgets.Text;
17
import org.eclipse.ui.forms.widgets.ExpandableComposite;
18 17
import org.eclipse.ui.forms.widgets.FormToolkit;
19 18
import org.eclipse.ui.forms.widgets.TableWrapData;
20 19
import org.eclipse.ui.forms.widgets.TableWrapLayout;
......
34 33
    private Text text_DistanceToGround;
35 34
    private Text text_DistanceToWaterSurface;
36 35
    private Text text_GatheringEventDescription;
37
    private ExpandableComposite section_collectingAreas;
38
    private Composite composite;
39 36

  
40 37
    /**
41 38
     * Create the composite.
......
99 96
        text_GatheringEventDescription.setText("");
100 97
        text_GatheringEventDescription.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
101 98

  
102
        section_collectingAreas = formToolkit.createExpandableComposite(this, ExpandableComposite.TWISTIE);
103
        section_collectingAreas.setLayoutData(new TableWrapData(TableWrapData.LEFT, TableWrapData.TOP, 1, 2));
104
        formToolkit.paintBordersFor(section_collectingAreas);
105
        section_collectingAreas.setText("Collecting Areas");
106
        section_collectingAreas.setExpanded(true);
107

  
108
        composite = formToolkit.createComposite(section_collectingAreas, SWT.NONE);
109
        formToolkit.paintBordersFor(composite);
110
        section_collectingAreas.setClient(composite);
111

  
112 99
    }
113 100

  
114 101
    @Override
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/detailViews/fieldObservation/GatheringEventDetailsElementController.java
68 68
    @Override
69 69
    protected void createControls(ICdmFormElement formElement, DerivedUnitFacade entity, int style) {
70 70

  
71
        number_absoluteElevationError = new NumberFieldController(gatheringEventDetailsElement.getTextElevationError(), formFactory, this, (Integer)null);
72
        number_absoluteElevationMinimum = new NumberFieldController(gatheringEventDetailsElement.getText_ElevationMinimum(), formFactory, this, (Integer)null);
73
        number_absoluteElevationMaximum = new NumberFieldController(gatheringEventDetailsElement.getText_ElevationMaximum(), formFactory, this, (Integer)null);
74
        text_collectingMethod = new TextFieldController(gatheringEventDetailsElement.getText_CollectingMethod(), formFactory, this, null, null);
75
        number_distanceToGround = new NumberFieldController(gatheringEventDetailsElement.getText_DistanceToGround(), formFactory, this, (Integer)null);
76
        number_distanceToWaterSurface = new NumberFieldController(gatheringEventDetailsElement.getText_DistanceToWaterSurface(), formFactory, this, (Integer)null);
77
        text_gatheringEventDescription = new TextFieldController(gatheringEventDetailsElement.getText_GatheringEventDescription(), formFactory, this, null, null);
71
        number_absoluteElevationError = new NumberFieldController(gatheringEventDetailsElement.getTextElevationError(), formFactory, this, entity.getAbsoluteElevation());
72
        number_absoluteElevationMinimum = new NumberFieldController(gatheringEventDetailsElement.getText_ElevationMinimum(), formFactory, this, entity.getAbsoluteElevationMinimum());
73
        number_absoluteElevationMaximum = new NumberFieldController(gatheringEventDetailsElement.getText_ElevationMaximum(), formFactory, this, entity.getAbsoluteElevationMaximum());
74
        text_collectingMethod = new TextFieldController(gatheringEventDetailsElement.getText_CollectingMethod(), formFactory, this, entity.getCollectingMethod(), null);
75
        number_distanceToGround = new NumberFieldController(gatheringEventDetailsElement.getText_DistanceToGround(), formFactory, this, entity.getDistanceToGround());
76
        number_distanceToWaterSurface = new NumberFieldController(gatheringEventDetailsElement.getText_DistanceToWaterSurface(), formFactory, this, entity.getDistanceToWaterSurface());
77
        text_gatheringEventDescription = new TextFieldController(gatheringEventDetailsElement.getText_GatheringEventDescription(), formFactory, this, entity.getGatheringEventDescription(), null);
78 78
        section_collectingAreas = formFactory.createCollectingAreasDetailSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE);
79 79
        section_collectingAreas.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
80 80
        section_collectingAreas.setEntity(entity);
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java
74 74
import eu.etaxonomy.taxeditor.ui.section.name.NonViralNameDetailSection;
75 75
import eu.etaxonomy.taxeditor.ui.section.name.ProtologueSection;
76 76
import eu.etaxonomy.taxeditor.ui.section.name.TypeDesignationSection;
77
import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitBaseDetailSection;
78
import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationDetailSection;
79 77
import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldObservationDetailSection;
80 78
import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailSection;
81 79
import eu.etaxonomy.taxeditor.ui.section.occurrence.GeneralDetailSection;
......
553 551

  
554 552
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
555 553

  
556
        DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
557

  
558
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
559

  
560
        DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
554
//        DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
555
//
556
//        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
557
//
558
//        DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
561 559

  
562 560
        addPart(generalDetailSection);
563 561
        addPart(gatheringEventDetailSection);
564 562
        addPart(fieldObservationDetailSection);
565
        addPart(derivedUnitBaseDetailSection);
566
        addPart(determinationDetailSection);
563
//        addPart(derivedUnitBaseDetailSection);
564
//        addPart(determinationDetailSection);
567 565
    }
568 566

  
569 567
    /**

Also available in: Unified diff