@Override
        public void widgetSelected(SelectionEvent e) {
          if (attribute.isFocusControl() && attribute.getSelectionIndex() != -1) {
            String selectedAttribute = attribute.getText();
            text.insert(selectedAttribute);

            attribute.clearSelection();
            changed();
            text.setFocus();
            return;
          }

          if (operation.isFocusControl() && operation.getSelectionIndex() != -1) {
            String selectedOperation = operation.getText();
            text.insert(selectedOperation);

            operation.clearSelection();

            changed();
            text.setFocus();
            return;
          }

          if (value.isFocusControl() && value.getSelectionIndex() != -1) {
            String selectedValue = value.getText();
            text.insert(selectedValue);

            value.clearSelection();

            changed();
            text.setFocus();
            return;
          }
        }
Пример #2
0
 public void mouseDown(MouseEvent e) {
   if (combo_font_size.isFocusControl()) {
     fontSizeNumberInputConfim();
   }
 }