@Override public void controlResized(ControlEvent e) { column.removeControlListener(this); column.setWidth(0); } });
/** * Removes all associations between the TableEditor and the cell in the table. The * Table and the editor Control are <b>not</b> disposed. */ public void dispose () { if (table != null && !table.isDisposed()) { if (this.column > -1 && this.column < table.getColumnCount()){ TableColumn tableColumn = table.getColumn(this.column); tableColumn.removeControlListener(columnListener); } } columnListener = null; table = null; item = null; column = -1; timer = null; super.dispose(); } /**
/** * Removes all associations between the TableEditor and the cell in the table. The * Table and the editor Control are <b>not</b> disposed. */ public void dispose () { if (table != null && !table.isDisposed()) { if (this.column > -1 && this.column < table.getColumnCount()){ TableColumn tableColumn = table.getColumn(this.column); tableColumn.removeControlListener(columnListener); } } columnListener = null; table = null; item = null; column = -1; timer = null; super.dispose(); } /**
/** * Removes all associations between the TableEditor and the cell in the table. The * Table and the editor Control are <b>not</b> disposed. */ @Override public void dispose () { if (table != null && !table.isDisposed()) { if (this.column > -1 && this.column < table.getColumnCount()){ TableColumn tableColumn = table.getColumn(this.column); tableColumn.removeControlListener(columnListener); } } columnListener = null; table = null; item = null; column = -1; timer = null; super.dispose(); } /**
/** * Removes all associations between the TableEditor and the cell in the table. The * Table and the editor Control are <b>not</b> disposed. */ @Override public void dispose () { if (table != null && !table.isDisposed()) { if (this.column > -1 && this.column < table.getColumnCount()){ TableColumn tableColumn = table.getColumn(this.column); tableColumn.removeControlListener(columnListener); } } columnListener = null; table = null; item = null; column = -1; timer = null; super.dispose(); } /**
/** * Removes all associations between the TableEditor and the cell in the table. The * Table and the editor Control are <b>not</b> disposed. */ @Override public void dispose () { if (table != null && !table.isDisposed()) { if (this.column > -1 && this.column < table.getColumnCount()){ TableColumn tableColumn = table.getColumn(this.column); tableColumn.removeControlListener(columnListener); } } columnListener = null; table = null; item = null; column = -1; timer = null; super.dispose(); } /**
/** * Removes all associations between the TableEditor and the cell in the table. The * Table and the editor Control are <b>not</b> disposed. */ @Override public void dispose () { if (table != null && !table.isDisposed()) { if (this.column > -1 && this.column < table.getColumnCount()){ TableColumn tableColumn = table.getColumn(this.column); tableColumn.removeControlListener(columnListener); } } columnListener = null; table = null; item = null; column = -1; timer = null; super.dispose(); } /**
/** * Removes all associations between the TableTreeEditor and the cell in the table tree. The * TableTree and the editor Control are <b>not</b> disposed. */ public void dispose () { if (tableTree != null && !tableTree.isDisposed()) { Table table = tableTree.getTable(); if (table != null && !table.isDisposed()) { if (this.column > -1 && this.column < table.getColumnCount()){ TableColumn tableColumn = table.getColumn(this.column); tableColumn.removeControlListener(columnListener); } } if (treeListener != null) tableTree.removeTreeListener(treeListener); } treeListener = null; columnListener = null; tableTree = null; item = null; column = -1; super.dispose(); } /**
/** * Sets the zero based index of the column of the cell being tracked by this editor. * * @param column the zero based index of the column of the cell being tracked by this editor */ public void setColumn(int column) { int columnCount = table.getColumnCount(); // Separately handle the case where the table has no TableColumns. // In this situation, there is a single default column. if (columnCount == 0) { this.column = (column == 0) ? 0 : -1; resize(); return; } if (this.column > -1 && this.column < columnCount){ TableColumn tableColumn = table.getColumn(this.column); tableColumn.removeControlListener(columnListener); this.column = -1; } if (column < 0 || column >= table.getColumnCount()) return; this.column = column; TableColumn tableColumn = table.getColumn(this.column); tableColumn.addControlListener(columnListener); resize(); } /**
/** * Removes all associations between the TableTreeEditor and the cell in the table tree. The * TableTree and the editor Control are <b>not</b> disposed. */ @Override public void dispose () { if (tableTree != null && !tableTree.isDisposed()) { Table table = tableTree.getTable(); if (table != null && !table.isDisposed()) { if (this.column > -1 && this.column < table.getColumnCount()){ TableColumn tableColumn = table.getColumn(this.column); tableColumn.removeControlListener(columnListener); } } if (treeListener != null) tableTree.removeTreeListener(treeListener); } treeListener = null; columnListener = null; tableTree = null; item = null; column = -1; super.dispose(); } /**
/** * Removes all associations between the TableTreeEditor and the cell in the table tree. The * TableTree and the editor Control are <b>not</b> disposed. */ @Override public void dispose () { if (tableTree != null && !tableTree.isDisposed()) { Table table = tableTree.getTable(); if (table != null && !table.isDisposed()) { if (this.column > -1 && this.column < table.getColumnCount()){ TableColumn tableColumn = table.getColumn(this.column); tableColumn.removeControlListener(columnListener); } } if (treeListener != null) tableTree.removeTreeListener(treeListener); } treeListener = null; columnListener = null; tableTree = null; item = null; column = -1; super.dispose(); } /**
/** * Removes all associations between the TableTreeEditor and the cell in the table tree. The * TableTree and the editor Control are <b>not</b> disposed. */ @Override public void dispose () { if (tableTree != null && !tableTree.isDisposed()) { Table table = tableTree.getTable(); if (table != null && !table.isDisposed()) { if (this.column > -1 && this.column < table.getColumnCount()){ TableColumn tableColumn = table.getColumn(this.column); tableColumn.removeControlListener(columnListener); } } if (treeListener != null) tableTree.removeTreeListener(treeListener); } treeListener = null; columnListener = null; tableTree = null; item = null; column = -1; super.dispose(); } /**
/** * Sets the zero based index of the column of the cell being tracked by this editor. * * @param column the zero based index of the column of the cell being tracked by this editor */ public void setColumn(int column) { int columnCount = table.getColumnCount(); // Separately handle the case where the table has no TableColumns. // In this situation, there is a single default column. if (columnCount == 0) { this.column = (column == 0) ? 0 : -1; resize(); return; } if (this.column > -1 && this.column < columnCount){ TableColumn tableColumn = table.getColumn(this.column); tableColumn.removeControlListener(columnListener); this.column = -1; } if (column < 0 || column >= table.getColumnCount()) return; this.column = column; TableColumn tableColumn = table.getColumn(this.column); tableColumn.addControlListener(columnListener); resize(); } /**
public void setColumn(int column) { Table table = tableTree.getTable(); int columnCount = table.getColumnCount(); // Separately handle the case where the table has no TableColumns. // In this situation, there is a single default column. if (columnCount == 0) { this.column = (column == 0) ? 0 : -1; layout(); return; } if (this.column > -1 && this.column < columnCount){ TableColumn tableColumn = table.getColumn(this.column); tableColumn.removeControlListener(columnListener); this.column = -1; } if (column < 0 || column >= table.getColumnCount()) return; this.column = column; TableColumn tableColumn = table.getColumn(this.column); tableColumn.addControlListener(columnListener); layout(); } public void setItem (TableTreeItem item) {
/** * Attaches the TableLayoutManager to an SWT-Table. From this time on, the column widths are controled by * the TableLayoutManager. * @param table to manage * @param take defines which layout information should be calculated from the current width of the columns. * possible values: {@link #PERCENT}, {@link #SCALEDPERCENT}, {@link #MIN}, {@link #MAX}, {@link #ABSOLUT}. These value may be ored * together to take more information. */ public void manageTable(Table table,int take) { if(this.table!=null) { // remove from old table if any this.table.removeControlListener(this); for(int i=0,size=this.table.getColumnCount();i<size;i++) { this.table.getColumn(i).removeControlListener(this); } } this.table=table; this.table.addControlListener(this); for(int i=0,size=this.table.getColumnCount();i<size;i++) { this.table.getColumn(i).addControlListener(this); } recalcLayoutInfoFromTable(take); }
public void setColumn(int column) { Table table = tableTree.getTable(); int columnCount = table.getColumnCount(); // Separately handle the case where the table has no TableColumns. // In this situation, there is a single default column. if (columnCount == 0) { this.column = (column == 0) ? 0 : -1; layout(); return; } if (this.column > -1 && this.column < columnCount){ TableColumn tableColumn = table.getColumn(this.column); tableColumn.removeControlListener(columnListener); this.column = -1; } if (column < 0 || column >= table.getColumnCount()) return; this.column = column; TableColumn tableColumn = table.getColumn(this.column); tableColumn.addControlListener(columnListener); layout(); } public void setItem (TableTreeItem item) {
/** * Attaches the TableLayoutManager to an SWT-Table. From this time on, the column widths are controled by * the TableLayoutManager. * @param table to manage * @param take defines which layout information should be calculated from the current width of the columns. * possible values: {@link #PERCENT}, {@link #SCALEDPERCENT}, {@link #MIN}, {@link #MAX}, {@link #ABSOLUT}. These value may be ored * together to take more information. */ public void manageTable(Table table,int take) { if(this.table!=null) { // remove from old table if any this.table.removeControlListener(this); for(int i=0,size=this.table.getColumnCount();i<size;i++) { this.table.getColumn(i).removeControlListener(this); } } this.table=table; this.table.addControlListener(this); for(int i=0,size=this.table.getColumnCount();i<size;i++) { this.table.getColumn(i).addControlListener(this); } recalcLayoutInfoFromTable(take); }
public void setColumn(int column) { Table table = tableTree.getTable(); int columnCount = table.getColumnCount(); // Separately handle the case where the table has no TableColumns. // In this situation, there is a single default column. if (columnCount == 0) { this.column = (column == 0) ? 0 : -1; layout(); return; } if (this.column > -1 && this.column < columnCount){ TableColumn tableColumn = table.getColumn(this.column); tableColumn.removeControlListener(columnListener); this.column = -1; } if (column < 0 || column >= table.getColumnCount()) return; this.column = column; TableColumn tableColumn = table.getColumn(this.column); tableColumn.addControlListener(columnListener); layout(); } public void setItem (TableTreeItem item) {
public void setColumn(int column) { Table table = tableTree.getTable(); int columnCount = table.getColumnCount(); // Separately handle the case where the table has no TableColumns. // In this situation, there is a single default column. if (columnCount == 0) { this.column = (column == 0) ? 0 : -1; layout(); return; } if (this.column > -1 && this.column < columnCount){ TableColumn tableColumn = table.getColumn(this.column); tableColumn.removeControlListener(columnListener); this.column = -1; } if (column < 0 || column >= table.getColumnCount()) return; this.column = column; TableColumn tableColumn = table.getColumn(this.column); tableColumn.addControlListener(columnListener); layout(); } public void setItem (TableTreeItem item) {
public void setColumn(int column) { Table table = tableTree.getTable(); int columnCount = table.getColumnCount(); // Separately handle the case where the table has no TableColumns. // In this situation, there is a single default column. if (columnCount == 0) { this.column = (column == 0) ? 0 : -1; layout(); return; } if (this.column > -1 && this.column < columnCount){ TableColumn tableColumn = table.getColumn(this.column); tableColumn.removeControlListener(columnListener); this.column = -1; } if (column < 0 || column >= table.getColumnCount()) return; this.column = column; TableColumn tableColumn = table.getColumn(this.column); tableColumn.addControlListener(columnListener); layout(); } public void setItem (TableTreeItem item) {