table.layout( true, true );
table.layout(); table.pack();
this.sresList.getTable().layout(true); restoreColumnWidths(settings); this.sortColumn = Column.NAME;
/** * Restore table settings from the given dialog store using the * given key. * * @param settings dialog settings store * @param qualifier key to restore settings from */ public void restoreColumnSettings(IDialogSettings settings, String qualifier) { fVMList.getTable().layout(true); restoreColumnWidths(settings, qualifier); try { fSortColumn = settings.getInt(qualifier + ".sortColumn"); //$NON-NLS-1$ } catch (NumberFormatException e) { fSortColumn = 1; } switch (fSortColumn) { case 1: sortByName(); break; case 2: sortByLocation(); break; case 3: sortByType(); break; } }
/** * Sets the font of the Node 1 TreeItems in column 1. */ void setCellFont () { if (!instance.startup) { textNode1.setFont (1, cellFont); imageNode1.setFont (1, cellFont); } /* Set the font item's image to match the font of the item. */ Font ft = cellFont; if (ft == null) ft = textNode1.getFont (1); TableItem item = colorAndFontTable.getItem(CELL_FONT); Image oldImage = item.getImage(); if (oldImage != null) oldImage.dispose(); item.setImage (fontImage(ft)); item.setFont(ft); colorAndFontTable.layout (); }
@Override public void initializePanel(Composite parent) { parent.setLayout(new FillLayout()); table = new Table(parent, SWT.BORDER | SWT.SINGLE); final TableColumn tc1 = new TableColumn(table, 0); tc1.setText("Vehicle"); tc1.setWidth(COLUMN_WIDTH_PX); final TableColumn tc2 = new TableColumn(table, 0); tc2.setText("Route length"); tc2.setWidth(COLUMN_WIDTH_PX); final TableColumn tc3 = new TableColumn(table, 0); tc3.setText("Route"); tc3.setWidth(COLUMN_WIDTH_PX); table.setHeaderVisible(true); for (final RouteFollowingVehicle v : list) { createItem(v); } table.layout(); }
/** * Sets the font of the Node 1 TreeItems. */ void setItemFont () { if (!instance.startup) { textNode1.setFont (itemFont); imageNode1.setFont (itemFont); } /* Set the font item's image to match the font of the item. */ Font ft = itemFont; if (ft == null) ft = textNode1.getFont (); TableItem item = colorAndFontTable.getItem(ITEM_FONT); Image oldImage = item.getImage(); if (oldImage != null) oldImage.dispose(); item.setImage (fontImage(ft)); item.setFont(ft); colorAndFontTable.layout (); }
@Override public void initializePanel(Composite parent) { parent.setLayout(new FillLayout()); table = new Table(parent, SWT.BORDER | SWT.SINGLE); final TableColumn tc1 = new TableColumn(table, 0); tc1.setText("Vehicle"); tc1.setWidth(COLUMN_WIDTH_PX); final TableColumn tc2 = new TableColumn(table, 0); tc2.setText("Route length"); tc2.setWidth(COLUMN_WIDTH_PX); final TableColumn tc3 = new TableColumn(table, 0); tc3.setText("Route"); tc3.setWidth(COLUMN_WIDTH_PX); table.setHeaderVisible(true); for (final RouteFollowingVehicle v : list) { createItem(v); } table.layout(); }
/** * Sets the font of the "Example" widgets. */ void setExampleWidgetFont () { if (colorAndFontTable == null) return; // user cannot change color/font on this tab Control [] controls = getExampleControls (); if (!instance.startup) { for (Control control : controls) { control.setFont(font); } } /* Set the font item's image and font to match the font of the example widget(s). */ Font ft = font; if (controls.length == 0) return; if (ft == null) ft = controls [0].getFont (); TableItem item = colorAndFontTable.getItem(FONT); Image oldImage = item.getImage(); if (oldImage != null) oldImage.dispose(); item.setImage (fontImage (ft)); item.setFont(ft); colorAndFontTable.layout (); }
/** * Sets the font of TableItem 0. */ void setItemFont () { if (!instance.startup) { table1.getItem (0).setFont (itemFont); } /* Set the font item's image to match the font of the item. */ Font ft = itemFont; if (ft == null) ft = table1.getItem (0).getFont (); TableItem item = colorAndFontTable.getItem(ITEM_FONT); Image oldImage = item.getImage(); if (oldImage != null) oldImage.dispose(); item.setImage (fontImage(ft)); item.setFont(ft); colorAndFontTable.layout (); }
/** * Sets the font of the Row 0 TableItem in column 1. */ void setCellFont () { if (!instance.startup) { table1.getItem (0).setFont (1, cellFont); } /* Set the font item's image to match the font of the item. */ Font ft = cellFont; if (ft == null) ft = table1.getItem (0).getFont (1); TableItem item = colorAndFontTable.getItem(CELL_FONT); Image oldImage = item.getImage(); if (oldImage != null) oldImage.dispose(); item.setImage (fontImage(ft)); item.setFont(ft); colorAndFontTable.layout (); }
table.getSelection()[0].setData(selection); table.layout();
/** * Sets the font of CTabItem 0. */ void setItemFont () { if (!instance.startup) { tabFolder1.getItem (0).setFont (itemFont); setExampleWidgetSize(); } /* Set the font item's image to match the font of the item. */ Font ft = itemFont; if (ft == null) ft = tabFolder1.getItem (0).getFont (); TableItem item = colorAndFontTable.getItem(ITEM_FONT); Image oldImage = item.getImage(); if (oldImage != null) oldImage.dispose(); item.setImage (fontImage(ft)); item.setFont(ft); colorAndFontTable.layout (); } }