Commit 72d3beef authored by Vincent Aravantinos's avatar Vincent Aravantinos
Browse files

commits Hernan's changes

refs 2556
parent 68867c2f
......@@ -19,11 +19,16 @@ import org.eclipse.jface.layout.TableColumnLayout;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.ColumnLabelProvider;
import org.eclipse.jface.viewers.ColumnViewer;
import org.eclipse.jface.viewers.ColumnViewerEditor;
import org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy;
import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.EditingSupport;
import org.eclipse.jface.viewers.FocusCellOwnerDrawHighlighter;
import org.eclipse.jface.viewers.ICellEditorValidator;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TableViewerColumn;
import org.eclipse.jface.viewers.TableViewerEditor;
import org.eclipse.jface.viewers.TableViewerFocusCellManager;
import org.eclipse.jface.viewers.TextCellEditor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
......@@ -240,4 +245,19 @@ public class TableViewerUtils {
return null;
}
}
/** Allows to move between the columns of the table by pressing TAB. */
public static void allowTabing(TableViewer table) {
TableViewerFocusCellManager focusCellManager =
new TableViewerFocusCellManager(table, new FocusCellOwnerDrawHighlighter(table));
ColumnViewerEditorActivationStrategy activationSupport =
new ColumnViewerEditorActivationStrategy(table);
TableViewerEditor.create(table, focusCellManager, activationSupport,
ColumnViewerEditor.TABBING_HORIZONTAL |
ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR |
ColumnViewerEditor.TABBING_VERTICAL |
ColumnViewerEditor.KEYBOARD_ACTIVATION);
}
}
/*-------------------------------------------------------------------------+
| Copyright 2011 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.base.ui.utils;
import org.eclipse.jface.viewers.ColumnViewerEditor;
import org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy;
import org.eclipse.jface.viewers.FocusCellOwnerDrawHighlighter;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.TreeViewerEditor;
import org.eclipse.jface.viewers.TreeViewerFocusCellManager;
/**
* Utility methods for JFace {@link TreeViewer}s.
*
* @author ponce
*/
public class TreeViewerUtils {
/**
* Allows to move between the columns of the table by pressing TAB.
*
* @param tree
*/
public static void allowTabing(TreeViewer tree) {
TreeViewerFocusCellManager focusCellManager =
new TreeViewerFocusCellManager(tree, new FocusCellOwnerDrawHighlighter(tree));
ColumnViewerEditorActivationStrategy activationSupport =
new ColumnViewerEditorActivationStrategy(tree);
TreeViewerEditor.create(tree, focusCellManager, activationSupport,
ColumnViewerEditor.TABBING_HORIZONTAL |
ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR |
ColumnViewerEditor.TABBING_VERTICAL |
ColumnViewerEditor.KEYBOARD_ACTIVATION);
}
}
Supports Markdown
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