@Override
          public boolean editCellAt(int row, int column, EventObject e) {
            if (isCellEditable(row, column) && e instanceof MouseEvent) {
              var pair = (Pair<?, ?>)getValueAt(row, 0);
              Object key = pair.first;
              Object value = pair.second;
              final Ref<Boolean> changed = Ref.create(false);

              if (value instanceof Color) {
                ColorChooserService.getInstance().showPopup(null, (Color)value, new ColorListener() {
                  @Override
                  public void colorChanged(Color color, Object source) {
                    if (color != null) {
                      final ColorUIResource colorUIResource = new ColorUIResource(color);

                      // MultiUIDefaults overrides remove but does not override put.
                      // So to avoid duplications we should first remove the value and then put it again.
                      updateValue(pair, colorUIResource, row, column);
                      changed.set(true);
                    }
                  }
                });
              }
              else if (value instanceof Boolean) {
                updateValue(pair, !((Boolean)value), row, column);
                changed.set(true);
              }
              else if (value instanceof Integer) {
                Integer newValue = editNumber(key.toString(), value.toString(), Integer::parseInt);
                if (newValue != null) {
                  updateValue(pair, newValue, row, column);
                  changed.set(true);
                }
              }
              else if (value instanceof Float) {
                Float newValue = editNumber(key.toString(), value.toString(), Float::parseFloat);
                if (newValue != null) {
                  updateValue(pair, newValue, row, column);
                  changed.set(true);
                }
              }
              else if (value instanceof EmptyBorder) {
                Insets i = ((Border)value).getBorderInsets(null);

                String oldInsets = String.format("%d,%d,%d,%d", i.top, i.left, i.bottom, i.right);
                Insets newInsets = editInsets(key.toString(), oldInsets);
                if (newInsets != null) {
                  updateValue(pair, new JBEmptyBorder(newInsets), row, column);
                  changed.set(true);
                }
              }
              else if (value instanceof Insets i) {
                String oldInsets = String.format("%d,%d,%d,%d", i.top, i.left, i.bottom, i.right);
                Insets newInsets = editInsets(key.toString(), oldInsets);
                if (newInsets != null) {
                  updateValue(pair, newInsets, row, column);
                  changed.set(true);
                }
              }
              else if (value instanceof GrayFilter f) {
                String oldFilter = String.format("%d,%d,%d", f.getBrightness(), f.getContrast(), f.getAlpha());
                GrayFilter newValue = editGrayFilter(key.toString(), oldFilter);
                if (newValue != null) {
                  updateValue(pair, newValue, row, column);
                  changed.set(true);
                }
              }
              else if (value instanceof Font) {
                Font newValue = editFontSize(key.toString(), (Font)value);
                if (newValue != null) {
                  UIManager.getDefaults().remove(key);
                  UIManager.getDefaults().put(key, newValue);
                  setValueAt(newValue, row, column);
                  changed.set(true);
                }
              }
              else if (value instanceof Dimension d) {
                String oldDimension = String.format("%d,%d", d.width, d.height);
                Dimension newDimension = editDimension(key.toString(), oldDimension);
                if (newDimension != null) {
                  updateValue(pair, newDimension, row, column);
                  changed.set(true);
                }
              }

              if (changed.get()) {
                ApplicationManager.getApplication().invokeLater(() -> {
                  LafManager.getInstance().repaintUI();
                });
              }
              PropertiesComponent.getInstance().setValue(ShowUIDefaultsContent.LAST_SELECTED_KEY, key.toString());
            }
            return false;
          }
@Override
          public boolean editCellAt(int row, int column, EventObject e)