/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
*/
public interface IContainerConstants {
/**
- *
+ *
*/
public static final int SELECTED_FOCUS = 1;
/** Constant <code>SELECTED_NO_FOCUS=2</code> */
public static final int SELECTED_NO_FOCUS = 2;
/** Constant <code>NOT_SELECTED=3</code> */
public static final int NOT_SELECTED = 3;
-
+
/**
* ************ COMPOSITE TYPES ************
*/
/** Constant <code>CONCEPT_INDENT=40</code> */
public static final int CONCEPT_INDENT = 40;
-
+
/**
* ************ ICONS ************
*/
ImageResources.HETEROTYPIC_SYN_ORIGINAL_ICON);
/** Constant <code>MISAPPLIEDNAME_ICON</code> */
public static final Image MISAPPLIEDNAME_ICON = ImageResources.getImage(ImageResources.MISAPPLIED_NAME_ICON);
+ /** Constant <code>PROPARTE_ICON</code> */
+ public static final Image PRO_PARTE_SYNONYM_ICON = ImageResources.getImage(ImageResources.PRO_PARTE_SYNONYM_ICON);
/** Constant <code>CONCEPT_ICON</code> */
public static final Image CONCEPT_ICON = ImageResources.getImage(ImageResources.CONCEPT_ICON);
/** Constant <code>AUTONYM_ICON</code> */
if (isMisapplication){
setIcon(MISAPPLIEDNAME_ICON);
}else{
- setIcon(CONCEPT_ICON);
+ setIcon(PRO_PARTE_SYNONYM_ICON);
}
}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg3336"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="proparte.svg">
+ <defs
+ id="defs3338" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="22.4"
+ inkscape:cx="8.0127419"
+ inkscape:cy="8.769355"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ units="px"
+ inkscape:snap-nodes="true"
+ inkscape:snap-page="true"
+ inkscape:snap-text-baseline="true"
+ inkscape:window-width="2560"
+ inkscape:window-height="1403"
+ inkscape:window-x="1920"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata3341">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#005f2a;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ id="path4150"
+ sodipodi:type="arc"
+ sodipodi:cx="8"
+ sodipodi:cy="1044.3622"
+ sodipodi:rx="8"
+ sodipodi:ry="8"
+ sodipodi:start="0"
+ sodipodi:end="6.2776003"
+ d="m 16,1044.3622 a 8,8 0 0 1 -7.98883,8 8,8 0 0 1 -8.011138807715,-7.9777 8,8 0 0 1 7.966458907715,-8.0222 8,8 0 0 1 8.0333849,7.9552 L 8,1044.3622 Z" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="Layer 2"
+ style="display:none">
+ <path
+ style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#00a85d;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ id="path4150-5"
+ sodipodi:type="arc"
+ sodipodi:cx="8.0803566"
+ sodipodi:cy="8.0089293"
+ sodipodi:rx="8"
+ sodipodi:ry="8"
+ sodipodi:start="0"
+ sodipodi:end="6.2776003"
+ d="M 16.080357,8.0089293 A 8,8 0 0 1 8.0915266,16.008921 8,8 0 0 1 0.08038779,8.0312693 8,8 0 0 1 8.0468467,0.00899944 8,8 0 0 1 16.080232,7.9642494 l -7.9998754,0.04468 z" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer3"
+ inkscape:label="font"
+ style="display:inline">
+ <text
+ transform="translate(0,-1036.3622)"
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:11.37982178px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ x="1.213961"
+ y="1048.4347"
+ id="text4152"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan4154"
+ x="1.213961"
+ y="1048.4347">PP</tspan></text>
+ </g>
+</svg>
import eu.etaxonomy.cdm.model.common.TermVocabulary;
import eu.etaxonomy.cdm.model.common.TimePeriod;
import eu.etaxonomy.cdm.model.common.User;
+import eu.etaxonomy.cdm.model.common.VerbatimTimePeriod;
import eu.etaxonomy.cdm.model.common.VersionableEntity;
import eu.etaxonomy.cdm.model.description.CategoricalData;
import eu.etaxonomy.cdm.model.description.CommonTaxonName;
return element;
}
+ /**
+ * <p>
+ * createVerbatimTimePeriodElement
+ * </p>
+ *
+ * @param parentElement
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+ * object.
+ * @param labelString
+ * a {@link java.lang.String} object.
+ * @param timePeriod
+ * a {@link eu.etaxonomy.cdm.model.common.VerbatimTimePeriod} object.
+ * @param style
+ * a int.
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.VerbatimTimePeriodElement}
+ * object.
+ */
+ public VerbatimTimePeriodElement createVerbatimTimePeriodElement(ICdmFormElement parentElement, String labelString,
+ VerbatimTimePeriod timePeriod, int style) {
+ VerbatimTimePeriodElement element = new VerbatimTimePeriodElement(this, parentElement, labelString, timePeriod, style);
+ adapt(element);
+ parentElement.addElement(element);
+ return element;
+ }
+
/**
* <p>
* createGatheringEventUnitElement
return section;
}
+ /**
+ * <p>
+ * createVerbatimDateDetailSection
+ * </p>
+ *
+ * @param parentElement
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+ * object.
+ * @param style
+ * a int.
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.VerbatimDateDetailSection}
+ * object.
+ */
+ public VerbatimDateDetailSection createVerbatimDateDetailSection(ICdmFormElement parentElement, int style) {
+ VerbatimDateDetailSection section = new VerbatimDateDetailSection(this, parentElement, style);
+ parentElement.addElement(section);
+ adapt(section);
+ return section;
+ }
+
/**
* <p>
* createDateDetailSection
*/
public class DateDetailSection extends AbstractFormSection<TimePeriod> {
- private final TextWithLabelElement text_freeText;
- private final PartialElement partialElement_start;
- private final PartialElement partialElement_end;
- private final TextWithLabelElement text_parseText;
+ protected TextWithLabelElement text_freeText;
+ private PartialElement partialElement_start;
+ private PartialElement partialElement_end;
+ private TextWithLabelElement text_parseText;
private int cursorPosition;
/**
partialElement_end = formFactory.createPartialElement(this, "End ",
null, style);
- text_parseText = formFactory.createTextWithLabelElement(this, "Parse",
- null, style);
- text_parseText.getMainControl().setLayoutData(
+ setText_parseText(formFactory.createTextWithLabelElement(this, "Parse",
+ null, style));
+ getText_parseText().getMainControl().setLayoutData(
LayoutConstants.FILL_HORIZONTALLY(6, 1));
text_freeText = formFactory.createTextWithLabelElement(this,
text_freeText.getMainControl().setLayoutData(
LayoutConstants.FILL_HORIZONTALLY(6, 1));
+
formFactory.addPropertyChangeListener(this);
}
public void setEntity(TimePeriod timePeriod) {
setEntityInternally(timePeriod);
updateTitle();
- text_parseText.setText(timePeriod.toString());
+ getText_parseText().setText(timePeriod.toString());
}
/**
Partial end = timePeriod.getEnd();
partialElement_end.setPartial(end);
- ((Text) text_parseText.getMainControl()).setSelection(cursorPosition);
+ ((Text) getText_parseText().getMainControl()).setSelection(cursorPosition);
text_freeText.setText(timePeriod.getFreeText());
super.setEntity(timePeriod);
event.getException()));
}
- private void handleEvent(Object eventSource) {
+ protected void handleEvent(Object eventSource) {
if (eventSource == partialElement_start) {
Partial start = partialElement_start.getPartial();
getEntity().setStart(start);
} else if (eventSource == partialElement_end) {
Partial end = partialElement_end.getPartial();
getEntity().setEnd(end);
- } else if (eventSource == text_parseText) {
- cursorPosition = ((Text) text_parseText.getMainControl())
+ } else if (eventSource == getText_parseText()) {
+ cursorPosition = ((Text) getText_parseText().getMainControl())
.getCaretPosition();
- setEntityInternally(TimePeriodParser.parseString(text_parseText.getText()));
+ setEntityInternally(TimePeriodParser.parseString(getText_parseText().getText()));
} else if (eventSource == text_freeText) {
getEntity().setFreeText(text_freeText.getText());
}
super.dispose();
}
+ public TextWithLabelElement getText_parseText() {
+ return text_parseText;
+ }
+
+ public void setText_parseText(TextWithLabelElement text_parseText) {
+ this.text_parseText = text_parseText;
+ }
+
}
LanguageString languageString = ((LanguageStringWithLabelElement) eventSource)
.getLanguageString();
multilanguageText.put(languageString.getLanguage(), languageString);
- firePropertyChangeEvent(new CdmPropertyChangeEvent(this, event));
+ //firePropertyChangeEvent(new CdmPropertyChangeEvent(this, event));
}
}
setNumber(initialNumber);
}
+ /**
+ * <p>Constructor for NumberWithLabelElement.</p>
+ *
+ * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
+ * @param labelString a {@link java.lang.String} object.
+ * @param initialNumber a {@link java.lang.Number} object.
+ * @param style a int.
+ */
+ public NumberWithLabelElement(CdmFormFactory toolkit,
+ ICdmFormElement parentElement, String labelString,
+ Number initialNumber, Integer height, Integer length, int style) {
+ super(toolkit, parentElement, labelString, null, null, style);
+ setNumber(initialNumber);
+ }
+
/**
* <p>setNumber</p>
/**
* Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
+ * European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
- *
+ *
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
* <p>
* TimePeriodElement class.
* </p>
- *
+ *
* @author n.hoffmann
* @created Nov 17, 2009
* @version 1.0
*/
public class TimePeriodElement extends AbstractCdmFormElement implements ISelectable {
- private TimePeriod timePeriod;
- private final Label label;
- private final DateDetailSection section_dateDetails;
+ protected TimePeriod timePeriod;
+ protected Label label;
+ protected DateDetailSection section_dateDetails;
/**
* <p>
* Constructor for TimePeriodElement.
* </p>
- *
+ *
* @param style
* a int.
* @param formFactory
super(formFactory, parentElement);
label = formFactory.createLabel(getLayoutComposite(), labelString);
+
addControl(label);
section_dateDetails = formFactory.createDateDetailSection(this,
formFactory.addPropertyChangeListener(this);
}
+ /**
+ * <p>
+ * Constructor for TimePeriodElement.
+ * </p>
+ *
+ * @param formFactory
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
+ * object.
+ * @param parentElement
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+ * object.
+ */
+ public TimePeriodElement(CdmFormFactory formFactory,
+ ICdmFormElement parentElement) {
+ super(formFactory, parentElement);
+ }
+
+
+
+
/**
* <p>
* setEntity
* </p>
- *
+ *
* @param timePeriod
* a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
*/
* <p>
* Setter for the field <code>timePeriod</code>.
* </p>
- *
+ *
* @param timePeriod
* the timePeriod to set
*/
* <p>
* Getter for the field <code>timePeriod</code>.
* </p>
- *
+ *
* @return the timePeriod
*/
public TimePeriod getTimePeriod() {
label.setBackground(color);
section_dateDetails.setBackground(color);
}
-
+
@Override
public void setSelected(boolean selected) {
setBackground(selected ? SELECTED : getPersistentBackground());
--- /dev/null
+/**
+* Copyright (C) 2018 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.element;
+
+import eu.etaxonomy.cdm.model.common.TimePeriod;
+import eu.etaxonomy.cdm.model.common.VerbatimTimePeriod;
+
+/**
+ * @author k.luther
+ * @since 15.05.2018
+ *
+ */
+public class VerbatimDateDetailSection extends DateDetailSection {
+
+
+ private final TextWithLabelElement text_VerbatimDate;
+
+ /**
+ * <p>
+ * Constructor for DateDetailSection.
+ * </p>
+ *
+ * @param formFactory
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
+ * object.
+ * @param parentElement
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+ * object.
+ * @param style
+ * a int.
+ */
+ protected VerbatimDateDetailSection(CdmFormFactory formFactory,
+ ICdmFormElement parentElement, int style) {
+ super(formFactory, parentElement, style);
+
+ text_VerbatimDate = formFactory.createTextWithLabelElement(this,
+ "Verbatim Date", null, style);
+
+ text_VerbatimDate.getMainControl().setLayoutData(
+ LayoutConstants.FILL_HORIZONTALLY(6, 1));
+
+
+ formFactory.addPropertyChangeListener(this);
+ }
+
+
+ /**
+ * <p>
+ * Setter for the field <code>timePeriod</code>.
+ * </p>
+ *
+ * @param timePeriod
+ * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
+ */
+ @Override
+ public void setEntity(TimePeriod timePeriod) {
+ if (timePeriod instanceof VerbatimTimePeriod){
+ text_VerbatimDate.setText(((VerbatimTimePeriod)timePeriod).getVerbatimDate());
+ }
+ }
+ @Override
+ protected void handleEvent(Object eventSource) {
+
+ if (eventSource == text_VerbatimDate) {
+
+ ((VerbatimTimePeriod)getEntity()).setVerbatimDate(text_VerbatimDate.getText());
+ }
+ super.handleEvent(eventSource);
+
+ }
+
+}
--- /dev/null
+/**
+* Copyright (C) 2018 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.element;
+
+import org.eclipse.ui.forms.widgets.Section;
+
+import eu.etaxonomy.cdm.model.common.TimePeriod;
+import eu.etaxonomy.cdm.model.common.VerbatimTimePeriod;
+
+/**
+ * @author k.luther
+ * @since 15.05.2018
+ *
+ */
+public class VerbatimTimePeriodElement extends TimePeriodElement {
+
+
+
+ /**
+ * <p>
+ * Constructor for TimePeriodElement.
+ * </p>
+ *
+ * @param style
+ * a int.
+ * @param formFactory
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
+ * object.
+ * @param parentElement
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+ * object.
+ * @param labelString
+ * a {@link java.lang.String} object.
+ * @param timePeriod
+ * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
+ */
+ public VerbatimTimePeriodElement(CdmFormFactory formFactory,
+ ICdmFormElement parentElement, String labelString,
+ VerbatimTimePeriod timePeriod, final int style) {
+ super(formFactory, parentElement);
+
+ label = formFactory.createLabel(getLayoutComposite(), labelString);
+
+ addControl(label);
+
+ section_dateDetails = formFactory.createVerbatimDateDetailSection(this,
+ Section.TWISTIE);
+ addControl(section_dateDetails);
+
+ setTimePeriod(timePeriod);
+
+ formFactory.addPropertyChangeListener(this);
+
+
+
+ }
+
+ /**
+ * <p>
+ * Setter for the field <code>timePeriod</code>.
+ * </p>
+ *
+ * @param timePeriod
+ * the timePeriod to set
+ */
+ @Override
+ public void setTimePeriod(TimePeriod timePeriod) {
+ super.setTimePeriod(timePeriod);
+
+ }
+
+
+
+
+}