Commit fb864f90 authored by Andrey Filippov's avatar Andrey Filippov

Moved enum-type parameter labels to tooltips

parent 05faded9
...@@ -43,7 +43,22 @@ public class ComboComponent extends GeneralComponent { ...@@ -43,7 +43,22 @@ public class ComboComponent extends GeneralComponent {
comboField = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY); comboField = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY);
comboField.setLayoutData(gridData); comboField.setLayoutData(gridData);
comboField.setItems(type.getLabels()); // comboField.setItems(type.getLabels());
comboField.setItems(type.getValues());
StringBuilder sb= new StringBuilder();
String [] values=type.getValues();
String [] labels=type.getLabels();
for (int i=0;i<type.getValues().length;i++){
sb.append("\"");
sb.append(values[i]);
sb.append("\" - ");
sb.append(labels[i]);
if (i<(values.length-1)){
sb.append("\n\n");
}
}
comboField.setToolTipText(sb.toString());
comboField.setMenu(createPopupMenu(comboField.getShell())); comboField.setMenu(createPopupMenu(comboField.getShell()));
endCreateControl(); endCreateControl();
......
...@@ -43,7 +43,7 @@ public class ListOption implements IOption { ...@@ -43,7 +43,7 @@ public class ListOption implements IOption {
} }
/** /**
* Return core option (optiuon without UI elements) * Return core option (option without UI elements)
*/ */
public Option getOption() { public Option getOption() {
return option; return option;
......
...@@ -35,10 +35,12 @@ public class ListTabComponent extends AbstractTabComponent { ...@@ -35,10 +35,12 @@ public class ListTabComponent extends AbstractTabComponent {
, Parameter toolParameter ) , Parameter toolParameter )
{ {
super(tab, new ComboComponent(toolParameter)); super(tab, new ComboComponent(toolParameter));
System.out.println("Created ListTabComponent, label= "+toolParameter.getLabel());
} }
public void createControl(Composite parent) { public void createControl(Composite parent) {
super.createControl(parent); super.createControl(parent);
System.out.println("createControl(), parent= "+parent);
WidgetListener listener = new WidgetListener(); WidgetListener listener = new WidgetListener();
getComboField().addSelectionListener(listener); getComboField().addSelectionListener(listener);
getComboField().addModifyListener(listener); getComboField().addModifyListener(listener);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment