X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.eclipse.ui%2Fsrc%2Forg%2Fargeo%2Feclipse%2Fui%2Futils%2FViewerUtils.java;h=3c029d35040cb3cfb9733f11396920df071837e5;hb=e54c6091d38b6859dec42f36e7334da19e2a0227;hp=4a53e40313d92ec3c2f4fe0e528507f110073f8a;hpb=c149774fa220fe69f430f7b230ac4c442ea6d0fe;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/utils/ViewerUtils.java b/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/utils/ViewerUtils.java index 4a53e4031..3c029d350 100644 --- a/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/utils/ViewerUtils.java +++ b/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/utils/ViewerUtils.java @@ -24,8 +24,7 @@ import org.eclipse.swt.widgets.TableColumn; import org.eclipse.swt.widgets.TreeColumn; /** - * Centralizes useful methods to manage Jface Table, Tree and TreeColumn - * viewers. + * Centralise useful methods to manage JFace Table, Tree and TreeColumn viewers. */ public class ViewerUtils { @@ -33,8 +32,7 @@ public class ViewerUtils { * Creates a basic column for the given table. For the time being, we do not * support movable columns. */ - public static TableColumn createColumn(Table parent, String name, - int style, int width) { + public static TableColumn createColumn(Table parent, String name, int style, int width) { TableColumn result = new TableColumn(parent, style); result.setText(name); result.setWidth(width); @@ -43,11 +41,10 @@ public class ViewerUtils { } /** - * Creates a TableViewerColumn for the given viewer. For the time being, we - * do not support movable columns. + * Creates a TableViewerColumn for the given viewer. For the time being, we do + * not support movable columns. */ - public static TableViewerColumn createTableViewerColumn(TableViewer parent, - String name, int style, int width) { + public static TableViewerColumn createTableViewerColumn(TableViewer parent, String name, int style, int width) { TableViewerColumn tvc = new TableViewerColumn(parent, style); TableColumn column = tvc.getColumn(); column.setText(name); @@ -56,12 +53,16 @@ public class ViewerUtils { return tvc; } + // public static TableViewerColumn createTableViewerColumn(TableViewer parent, + // Localized name, int style, int width) { + // return createTableViewerColumn(parent, name.lead(), style, width); + // } + /** - * Creates a TreeViewerColumn for the given viewer. For the time being, we - * do not support movable columns. + * Creates a TreeViewerColumn for the given viewer. For the time being, we do + * not support movable columns. */ - public static TreeViewerColumn createTreeViewerColumn(TreeViewer parent, - String name, int style, int width) { + public static TreeViewerColumn createTreeViewerColumn(TreeViewer parent, String name, int style, int width) { TreeViewerColumn tvc = new TreeViewerColumn(parent, style); TreeColumn column = tvc.getColumn(); column.setText(name);