public void run() { if(!column.isDisposed()) { // if it is executed inside the event method, // the horizontal scrollbar does not appear or disappear correctly columnResized(column); } } });
public void run() { if(!column.isDisposed()) { // if it is executed inside the event method, // the horizontal scrollbar does not appear or disappear correctly columnResized(column); } } });
/** * Is this Column currently visible in the table? * * @return true if the Column is currently visible, false otherwise */ @SuppressWarnings("SimplifiableIfStatement") public boolean isVisible() { if (swtColumn.isDisposed()) { return false; } return (swtColumn.getWidth() > 0); }
@Override void updateImages () { if (sortColumn != null && !sortColumn.isDisposed ()) { if (OS.COMCTL32_MAJOR < 6) { switch (sortDirection) { case SWT.UP: case SWT.DOWN: sortColumn.setImage (display.getSortImage (sortDirection), true, true); break; } } } }
/** * Sets the direction of the sort indicator for the receiver. The value * can be one of <code>UP</code>, <code>DOWN</code> or <code>NONE</code>. * * @param direction the direction of the sort indicator * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @since 3.2 */ public void setSortDirection (int direction) { checkWidget (); if ((direction & (SWT.UP | SWT.DOWN)) == 0 && direction != SWT.NONE) return; sortDirection = direction; if (sortColumn != null && !sortColumn.isDisposed ()) { sortColumn.setSortDirection (direction); } }
/** * Sets the column used by the sort indicator for the receiver. A null * value will clear the sort indicator. The current sort column is cleared * before the new column is set. * * @param column the column used by the sort indicator or <code>null</code> * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the column is disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public void setSortColumn( TableColumn column ) { checkWidget(); if( column != null && column.isDisposed() ) { error( SWT.ERROR_INVALID_ARGUMENT ); } sortColumn = column; }
void reskinChildren (int flags) { if (items != null) { for (int i=0; i<itemCount; i++) { TableItem item = items [i]; if (item != null) item.reskin (flags); } } if (columns != null) { for (int i=0; i<columnCount; i++) { TableColumn column = columns [i]; if (!column.isDisposed ()) column.reskin (flags); } } super.reskinChildren (flags); }
@Override void reskinChildren (int flags) { if (items != null) { for (int i=0; i<itemCount; i++) { TableItem item = items [i]; if (item != null) item.reskin (flags); } } if (columns != null) { for (int i=0; i<columnCount; i++) { TableColumn column = columns [i]; if (!column.isDisposed ()) column.reskin (flags); } } super.reskinChildren (flags); }
@Override void reskinChildren (int flags) { if (items != null) { for (int i=0; i<itemCount; i++) { TableItem item = items [i]; if (item != null) item.reskin (flags); } } if (columns != null) { for (int i=0; i<columnCount; i++) { TableColumn column = columns [i]; if (!column.isDisposed ()) column.reskin (flags); } } super.reskinChildren (flags); }
@Override void reskinChildren (int flags) { if (items != null) { for (int i=0; i<itemCount; i++) { TableItem item = items [i]; if (item != null) item.reskin (flags); } } if (columns != null) { for (int i=0; i<columnCount; i++) { TableColumn column = columns [i]; if (!column.isDisposed ()) column.reskin (flags); } } super.reskinChildren (flags); }
/** * Sets the column used by the sort indicator for the receiver. A null * value will clear the sort indicator. The current sort column is cleared * before the new column is set. * * @param column the column used by the sort indicator or <code>null</code> * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the column is disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @since 3.2 */ public void setSortColumn (TableColumn column) { checkWidget (); if (column != null && column.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (column == sortColumn) return; setSort(column, sortDirection); }
void releaseChildren (boolean destroy) { if (items != null) { for (int i=0; i<itemCount; i++) { TableItem item = items [i]; if (item != null && !item.isDisposed ()) { item.release (false); } } items = null; } if (columns != null) { for (int i=0; i<columnCount; i++) { TableColumn column = columns [i]; if (column != null && !column.isDisposed ()) { column.release (false); } } columns = null; } super.releaseChildren (destroy); }
@Override void releaseChildren (boolean destroy) { if (items != null) { for (int i=0; i<itemCount; i++) { TableItem item = items [i]; if (item != null && !item.isDisposed ()) { item.release (false); } } items = null; } if (columns != null) { for (int i=0; i<columnCount; i++) { TableColumn column = columns [i]; if (column != null && !column.isDisposed ()) { column.release (false); } } columns = null; } super.releaseChildren (destroy); }
@Override void reskinChildren( int flags ) { if( items != null ) { for( int i = 0; i < items.length; i++ ) { TableItem item = items[ i ]; if( item != null ) { item.reskin( flags ); } } } TableColumn[] columns = getColumns(); if( columns != null ) { for( int i = 0; i < columns.length; i++ ) { TableColumn column = columns[ i ]; if( !column.isDisposed() ) { column.reskin( flags ); } } } super.reskinChildren( flags ); } }
@Override void releaseChildren (boolean destroy) { if (items != null) { for (int i=0; i<itemCount; i++) { TableItem item = items [i]; if (item != null && !item.isDisposed ()) { item.release (false); } } items = null; } if (columns != null) { for (int i=0; i<columnCount; i++) { TableColumn column = columns [i]; if (column != null && !column.isDisposed ()) { column.release (false); } } columns = null; } super.releaseChildren (destroy); }
@Override void releaseChildren (boolean destroy) { if (items != null) { for (int i=0; i<itemCount; i++) { TableItem item = items [i]; if (item != null && !item.isDisposed ()) { item.release (false); } } items = null; } if (columns != null) { for (int i=0; i<columnCount; i++) { TableColumn column = columns [i]; if (column != null && !column.isDisposed ()) { column.release (false); } } columns = null; } super.releaseChildren (destroy); }
/** * Shows the column. If the column is already showing in the receiver, * this method simply returns. Otherwise, the columns are scrolled until * the column is visible. * * @param column the column to be shown * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the column is null</li> * <li>ERROR_INVALID_ARGUMENT - if the column has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @since 3.0 */ public void showColumn (TableColumn column) { checkWidget (); if (column == null) error (SWT.ERROR_NULL_ARGUMENT); if (column.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT); if (column.parent != this) return; OS.gtk_tree_view_scroll_to_cell (handle, 0, column.handle, false, 0, 0); }
/** * Sets the direction of the sort indicator for the receiver. The value * can be one of <code>UP</code>, <code>DOWN</code> or <code>NONE</code>. * * @param direction the direction of the sort indicator * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @since 3.2 */ public void setSortDirection (int direction) { checkWidget (); if (direction != SWT.UP && direction != SWT.DOWN && direction != SWT.NONE) return; sortDirection = direction; if (sortColumn == null || sortColumn.isDisposed ()) return; if (sortDirection == SWT.NONE) { OS.gtk_tree_view_column_set_sort_indicator (sortColumn.handle, false); } else { OS.gtk_tree_view_column_set_sort_indicator (sortColumn.handle, true); OS.gtk_tree_view_column_set_sort_order (sortColumn.handle, sortDirection == SWT.DOWN ? 0 : 1); } }
/** * Sets the direction of the sort indicator for the receiver. The value * can be one of <code>UP</code>, <code>DOWN</code> or <code>NONE</code>. * * @param direction the direction of the sort indicator * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @since 3.2 */ public void setSortDirection (int direction) { checkWidget (); if (direction != SWT.UP && direction != SWT.DOWN && direction != SWT.NONE) return; sortDirection = direction; if (sortColumn == null || sortColumn.isDisposed ()) return; if (sortDirection == SWT.NONE) { OS.gtk_tree_view_column_set_sort_indicator (sortColumn.handle, false); } else { OS.gtk_tree_view_column_set_sort_indicator (sortColumn.handle, true); OS.gtk_tree_view_column_set_sort_order (sortColumn.handle, sortDirection == SWT.DOWN ? 0 : 1); } }
@Override void reskinChildren (int flags) { if (_hasItems ()) { int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0); for (int i=0; i<itemCount; i++) { TableItem item = _getItem (i, false); if (item != null) item.reskin (flags); } } if (columns != null) { for (int i=0; i<columnCount; i++) { TableColumn column = columns [i]; if (!column.isDisposed ()) column.reskin (flags); } } super.reskinChildren (flags); }