private RepresentationElement element_Representation;
- // private TermComboElement<DefinedTerm> comboStructuralModifier;
-
private CheckboxElement supportsQuantitativeData;
private CheckboxElement supportsCategoricalData;
private Text text_property;
private RemovableTextElement ratioTo;
-// private Label labelText_ratioTo;
-// private Text text_ratioTo;
-// private Button button_remove;
-
-
-// private TextWithLabelElement text_structure;
-// private TextWithLabelElement text_property;
-
public CharacterDetailElement(CdmFormFactory formFactory,
ICdmFormElement formElement) {
text_property.setLayoutData(LayoutConstants.FILL());
text_property.setForeground(ColorResources.getColor(Resources.BLACK));
- // comboStructuralModifier = formFactory.createDefinedTermComboElement(TermType.StructureModifier, formElement, "Structural Modifier", entity.getStructureModifier(), style);
-
- ratioTo = formFactory.createRemovableTextField(formElement, "Ratio to", CharacterNodeDetailElement.getRatioToText(entity), style);
+ ratioTo = formFactory.createRemovableTextField(formElement, "Ratio to", CharacterNodeDetailElement.getRatioToText(entity), style);
supportsQuantitativeData = formFactory.createCheckbox(formElement, "Supports Quantitative Data", entity.isSupportsQuantitativeData(), style);
supportsCategoricalData = formFactory.createCheckbox(formElement, "Supports Categorical Data", entity.isSupportsCategoricalData(), style);
}
-// public void createText(ICdmFormElement formElement, String label, String path) {
-// labelText = new Label(formElement.getLayoutComposite(), SWT.NONE);
-// labelText.setText(label);
-// Text text = new Text(formElement.getLayoutComposite(), SWT.WRAP);
-// text.setText(path);
-// text.setEditable(false);
-// text.setLayoutData(LayoutConstants.FILL());
-// text.setForeground(ColorResources.getColor(Resources.BLACK));
-// }
@Override
public void setEntity(Character entity) {
@Override
public void handleEvent(Object eventSource) {
-// if(eventSource == comboStructuralModifier){
-// getEntity().setStructureModifier(comboStructuralModifier.getSelection());
-// }
if(eventSource == ratioTo){
if (!ratioTo.isState()){
getEntity().setRatioToStructure(null);
}
}
-// if(eventSource == supportsQuantitativeData || eventSource == supportsCategoricalData){
-// //if any type is selected disable supportsTextData
-// getEntity().setSupportsTextData(false);
-// }
if(eventSource == supportsQuantitativeData){
getEntity().setSupportsQuantitativeData(supportsQuantitativeData.getSelection());
if(supportsQuantitativeData.getSelection()){
public void fillFields() {
if (getEntity()!= null) {
element_Representation.setTerm(getEntity(), isEnabled());
-// comboStructuralModifier.setSelection(getEntity().getStructureModifier());
supportsQuantitativeData.setSelection(getEntity().isSupportsQuantitativeData());
supportsCategoricalData.setSelection(getEntity().isSupportsCategoricalData());;
availableForTaxon.setSelection(getEntity().isAvailableForTaxon());