/** * FIXME * {@inheritDoc} */ protected void setLayoutData(LayoutData layoutData) { gridEditor.grabHorizontal = layoutData.grabHorizontal; gridEditor.horizontalAlignment = layoutData.horizontalAlignment; gridEditor.minimumWidth = layoutData.minimumWidth; gridEditor.verticalAlignment = layoutData.verticalAlignment; if (layoutData.minimumHeight != SWT.DEFAULT) { gridEditor.minimumHeight = layoutData.minimumHeight; } else { gridEditor.minimumHeight = SWT.DEFAULT; } }
protected void setLayoutData(LayoutData layoutData) { treeEditor.grabHorizontal = layoutData.grabHorizontal; treeEditor.horizontalAlignment = layoutData.horizontalAlignment; treeEditor.minimumWidth = layoutData.minimumWidth; treeEditor.verticalAlignment = layoutData.verticalAlignment; if( layoutData.minimumHeight != SWT.DEFAULT ) { treeEditor.minimumHeight = layoutData.minimumHeight; } }
protected void setLayoutData(LayoutData layoutData) { tableEditor.grabHorizontal = layoutData.grabHorizontal; tableEditor.horizontalAlignment = layoutData.horizontalAlignment; tableEditor.minimumWidth = layoutData.minimumWidth; tableEditor.verticalAlignment = layoutData.verticalAlignment; if (layoutData.minimumHeight != SWT.DEFAULT) { tableEditor.minimumHeight = layoutData.minimumHeight; } }
private void activateCellEditor(TreeItem item, Object element, Object facet, int columnIndex, ITreeTableColumn column) { trace.debug("activateCellEditor : " + facet); boolean edited = column.editOnActivate(facet, model.getUndoContext(), item, columnIndex); if (edited) { return; } CellEditor cellEditor = column.getCellEditor(getTree(), facet); if (cellEditorActionHandler != null) { cellEditorActionHandler.addCellEditor(cellEditor); } if (cellEditor == null) { return; // no editor } if (currentCellEditorHelper != null) { currentCellEditorHelper.applyEditorValue(); currentCellEditorHelper = null; } CellEditorHelper helper = new CellEditorHelper(facet, column, cellEditor, element); cellEditor.addListener(helper); @SuppressWarnings("unchecked") Font font = column.getFont(facet); if (font == null) { font = getTreeTableLabelProvider().getFont(element); } cellEditor.activate(); LayoutData layoutData = cellEditor.getLayoutData(); treeEditor.grabHorizontal = layoutData.grabHorizontal; treeEditor.horizontalAlignment = layoutData.horizontalAlignment; treeEditor.minimumWidth = layoutData.minimumWidth; Control control = cellEditor.getControl(); if (control != null) { control.setFont(font); control.addFocusListener(helper); control.forceFocus(); int[] order = getTree().getColumnOrder(); int editorIndex = order[columnIndex]; treeEditor.setEditor(control, item, editorIndex); } cellEditor.setFocus(); currentCellEditorHelper = helper; }