setButtonLayoutData(upButton); downButton = new Button(composite, SWT.PUSH); downButton.setText(JFaceResources setButtonLayoutData(downButton); createLabel(composite, ""); //$NON-NLS-1$ createLabel(widthComposite, JFaceResources .getString("ConfigureColumnsDialog_WidthOfSelectedColumn")); //$NON-NLS-1$
public void create() { super.create(); getShell().setText(JFaceResources.getString("ConfigureColumnsDialog_Title")); //$NON-NLS-1$ }
upButton = new Button(composite, SWT.PUSH); upButton.setText(JFaceResources.getString("ConfigureColumnsDialog_up")); //$NON-NLS-1$ upButton.addListener(SWT.Selection, event -> handleMove(table, true)); setButtonLayoutData(upButton); downButton = new Button(composite, SWT.PUSH); downButton.setText(JFaceResources .getString("ConfigureColumnsDialog_down")); //$NON-NLS-1$ downButton.addListener(SWT.Selection, event -> handleMove(table, false)); setButtonLayoutData(downButton); createLabel(composite, ""); //$NON-NLS-1$ createLabel(widthComposite, JFaceResources .getString("ConfigureColumnsDialog_WidthOfSelectedColumn")); //$NON-NLS-1$ table.addListener(SWT.Selection, event -> handleSelectionChanged(table.indexOf((TableItem) event.item))); text.addListener(SWT.Modify, event -> { ColumnObject columnObject = columnObjects[table.getSelectionIndex()];
upButton = new Button(composite, SWT.PUSH); upButton.setText(JFaceResources.getString("ConfigureColumnsDialog_up")); //$NON-NLS-1$ upButton.addListener(SWT.Selection, event -> handleMove(table, true)); setButtonLayoutData(upButton); downButton = new Button(composite, SWT.PUSH); downButton.setText(JFaceResources .getString("ConfigureColumnsDialog_down")); //$NON-NLS-1$ downButton.addListener(SWT.Selection, event -> handleMove(table, false)); setButtonLayoutData(downButton); createLabel(composite, ""); //$NON-NLS-1$ createLabel(widthComposite, JFaceResources .getString("ConfigureColumnsDialog_WidthOfSelectedColumn")); //$NON-NLS-1$ table.addListener(SWT.Selection, event -> handleSelectionChanged(table.indexOf((TableItem) event.item))); text.addListener(SWT.Modify, event -> { ColumnObject columnObject = columnObjects[table.getSelectionIndex()];
/** * Returns true if any of the columns is moveable (can be reordered). */ private boolean createColumnObjects() { boolean result = true; Item[] columns = getViewerColumns(); ColumnObject[] cObjects = new ColumnObject[columns.length]; for (int i = 0; i < columns.length; i++) { Item c = columns[i]; boolean moveable = getMoveable(c); result = result && moveable; cObjects[i] = new ColumnObject(c, i, getColumnName(c), getColumnImage(c), getColumnWidth(c), moveable, getResizable(c), true); } int[] columnOrder = getColumnOrder(); columnObjects = new ColumnObject[columns.length]; for (int i = 0; i < columnOrder.length; i++) { columnObjects[i] = cObjects[columnOrder[i]]; } return result; }
/** * Returns true if any of the columns is moveable (can be reordered). */ private boolean createColumnObjects() { boolean result = true; Item[] columns = getViewerColumns(); ColumnObject[] cObjects = new ColumnObject[columns.length]; for (int i = 0; i < columns.length; i++) { Item c = columns[i]; boolean moveable = getMoveable(c); result = result && moveable; cObjects[i] = new ColumnObject(c, i, getColumnName(c), getColumnImage(c), getColumnWidth(c), moveable, getResizable(c), true); } int[] columnOrder = getColumnOrder(); columnObjects = new ColumnObject[columns.length]; for (int i = 0; i < columnOrder.length; i++) { columnObjects[i] = cObjects[columnOrder[i]]; } return result; }
/** * Returns true if any of the columns is moveable (can be reordered). */ private boolean createColumnObjects() { boolean result = true; Item[] columns = getViewerColumns(); ColumnObject[] cObjects = new ColumnObject[columns.length]; for (int i = 0; i < columns.length; i++) { Item c = columns[i]; boolean moveable = getMoveable(c); result = result && moveable; cObjects[i] = new ColumnObject(c, i, getColumnName(c), getColumnImage(c), getColumnWidth(c), moveable, getResizable(c), true); } int[] columnOrder = getColumnOrder(); columnObjects = new ColumnObject[columns.length]; for (int i = 0; i < columnOrder.length; i++) { columnObjects[i] = cObjects[columnOrder[i]]; } return result; }
@Override public void create() { super.create(); getShell().setText(JFaceResources.getString("ConfigureColumnsDialog_Title")); //$NON-NLS-1$ }
/** * Configure the columns of the given tree in a keyboard-accessible way, * using the given shell provider to parent dialogs. * * @param tree the tree * @param shellProvider a shell provider * @return <code>false</code> if the user canceled, <code>true</code> * otherwise */ public static boolean forTree(Tree tree, IShellProvider shellProvider) { return new ConfigureColumnsDialog(shellProvider, tree).open() == Window.OK; }
/** * Configure the columns of the given tree in a keyboard-accessible way, * using the given shell provider to parent dialogs. * * @param table the table * @param shellProvider a shell provider * @return <code>false</code> if the user canceled, <code>true</code> * otherwise */ public static boolean forTable(Table table, IShellProvider shellProvider) { return new ConfigureColumnsDialog(shellProvider, table).open() == Window.OK; }
/** * Configure the columns of the given tree in a keyboard-accessible way, * using the given shell provider to parent dialogs. * * @param tree the tree * @param shellProvider a shell provider * @return <code>false</code> if the user canceled, <code>true</code> * otherwise */ public static boolean forTree(Tree tree, IShellProvider shellProvider) { return new ConfigureColumnsDialog(shellProvider, tree).open() == Window.OK; }
/** * @param shellProvider * @param control */ private ConfigureColumnsDialog(IShellProvider shellProvider, Control control) { super(shellProvider); this.targetControl = control; this.moveableColumnsFound = createColumnObjects(); }
/** * Configure the columns of the given tree in a keyboard-accessible way, * using the given shell provider to parent dialogs. * * @param table the table * @param shellProvider a shell provider * @return <code>false</code> if the user canceled, <code>true</code> * otherwise */ public static boolean forTable(Table table, IShellProvider shellProvider) { return new ConfigureColumnsDialog(shellProvider, table).open() == Window.OK; }
/** * Configure the columns of the given tree in a keyboard-accessible way, * using the given shell provider to parent dialogs. * * @param tree the tree * @param shellProvider a shell provider * @return <code>false</code> if the user canceled, <code>true</code> * otherwise */ public static boolean forTree(Tree tree, IShellProvider shellProvider) { return new ConfigureColumnsDialog(shellProvider, tree).open() == Window.OK; }
/** * @param shellProvider * @param control */ private ConfigureColumnsDialog(IShellProvider shellProvider, Control control) { super(shellProvider); this.targetControl = control; this.moveableColumnsFound = createColumnObjects(); }
/** * @param shellProvider * @param control */ private ConfigureColumnsDialog(IShellProvider shellProvider, Control control) { super(shellProvider); this.targetControl = control; this.moveableColumnsFound = createColumnObjects(); }
/** * Configure the columns of the given tree in a keyboard-accessible way, * using the given shell provider to parent dialogs. * * @param table the table * @param shellProvider a shell provider * @return <code>false</code> if the user canceled, <code>true</code> * otherwise */ public static boolean forTable(Table table, IShellProvider shellProvider) { return new ConfigureColumnsDialog(shellProvider, table).open() == Window.OK; }
@Override public void create() { super.create(); getShell().setText(JFaceResources.getString("ConfigureColumnsDialog_Title")); //$NON-NLS-1$ }