org.eclipse.swt.widgets.Table.layout()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(220)

本文整理了Java中org.eclipse.swt.widgets.Table.layout()方法的一些代码示例,展示了Table.layout()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.layout()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Table
类名称:Table
方法名:layout

Table.layout介绍

暂无

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

  1. table.layout( true, true );

代码示例来源:origin: pentaho/pentaho-kettle

  1. table.layout();
  2. table.pack();

代码示例来源:origin: io.sarl/io.sarl.eclipse

  1. this.sresList.getTable().layout(true);
  2. restoreColumnWidths(settings);
  3. this.sortColumn = Column.NAME;

代码示例来源:origin: org.eclipse/org.eclipse.jdt.debug.ui

  1. /**
  2. * Restore table settings from the given dialog store using the
  3. * given key.
  4. *
  5. * @param settings dialog settings store
  6. * @param qualifier key to restore settings from
  7. */
  8. public void restoreColumnSettings(IDialogSettings settings, String qualifier) {
  9. fVMList.getTable().layout(true);
  10. restoreColumnWidths(settings, qualifier);
  11. try {
  12. fSortColumn = settings.getInt(qualifier + ".sortColumn"); //$NON-NLS-1$
  13. } catch (NumberFormatException e) {
  14. fSortColumn = 1;
  15. }
  16. switch (fSortColumn) {
  17. case 1:
  18. sortByName();
  19. break;
  20. case 2:
  21. sortByLocation();
  22. break;
  23. case 3:
  24. sortByType();
  25. break;
  26. }
  27. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

  1. /**
  2. * Sets the font of the Node 1 TreeItems in column 1.
  3. */
  4. void setCellFont () {
  5. if (!instance.startup) {
  6. textNode1.setFont (1, cellFont);
  7. imageNode1.setFont (1, cellFont);
  8. }
  9. /* Set the font item's image to match the font of the item. */
  10. Font ft = cellFont;
  11. if (ft == null) ft = textNode1.getFont (1);
  12. TableItem item = colorAndFontTable.getItem(CELL_FONT);
  13. Image oldImage = item.getImage();
  14. if (oldImage != null) oldImage.dispose();
  15. item.setImage (fontImage(ft));
  16. item.setFont(ft);
  17. colorAndFontTable.layout ();
  18. }

代码示例来源:origin: com.github.rinde/rinsim-pdptw

  1. @Override
  2. public void initializePanel(Composite parent) {
  3. parent.setLayout(new FillLayout());
  4. table = new Table(parent, SWT.BORDER | SWT.SINGLE);
  5. final TableColumn tc1 = new TableColumn(table, 0);
  6. tc1.setText("Vehicle");
  7. tc1.setWidth(COLUMN_WIDTH_PX);
  8. final TableColumn tc2 = new TableColumn(table, 0);
  9. tc2.setText("Route length");
  10. tc2.setWidth(COLUMN_WIDTH_PX);
  11. final TableColumn tc3 = new TableColumn(table, 0);
  12. tc3.setText("Route");
  13. tc3.setWidth(COLUMN_WIDTH_PX);
  14. table.setHeaderVisible(true);
  15. for (final RouteFollowingVehicle v : list) {
  16. createItem(v);
  17. }
  18. table.layout();
  19. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

  1. /**
  2. * Sets the font of the Node 1 TreeItems.
  3. */
  4. void setItemFont () {
  5. if (!instance.startup) {
  6. textNode1.setFont (itemFont);
  7. imageNode1.setFont (itemFont);
  8. }
  9. /* Set the font item's image to match the font of the item. */
  10. Font ft = itemFont;
  11. if (ft == null) ft = textNode1.getFont ();
  12. TableItem item = colorAndFontTable.getItem(ITEM_FONT);
  13. Image oldImage = item.getImage();
  14. if (oldImage != null) oldImage.dispose();
  15. item.setImage (fontImage(ft));
  16. item.setFont(ft);
  17. colorAndFontTable.layout ();
  18. }

代码示例来源:origin: rinde/RinSim

  1. @Override
  2. public void initializePanel(Composite parent) {
  3. parent.setLayout(new FillLayout());
  4. table = new Table(parent, SWT.BORDER | SWT.SINGLE);
  5. final TableColumn tc1 = new TableColumn(table, 0);
  6. tc1.setText("Vehicle");
  7. tc1.setWidth(COLUMN_WIDTH_PX);
  8. final TableColumn tc2 = new TableColumn(table, 0);
  9. tc2.setText("Route length");
  10. tc2.setWidth(COLUMN_WIDTH_PX);
  11. final TableColumn tc3 = new TableColumn(table, 0);
  12. tc3.setText("Route");
  13. tc3.setWidth(COLUMN_WIDTH_PX);
  14. table.setHeaderVisible(true);
  15. for (final RouteFollowingVehicle v : list) {
  16. createItem(v);
  17. }
  18. table.layout();
  19. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

  1. /**
  2. * Sets the font of the "Example" widgets.
  3. */
  4. void setExampleWidgetFont () {
  5. if (colorAndFontTable == null) return; // user cannot change color/font on this tab
  6. Control [] controls = getExampleControls ();
  7. if (!instance.startup) {
  8. for (Control control : controls) {
  9. control.setFont(font);
  10. }
  11. }
  12. /* Set the font item's image and font to match the font of the example widget(s). */
  13. Font ft = font;
  14. if (controls.length == 0) return;
  15. if (ft == null) ft = controls [0].getFont ();
  16. TableItem item = colorAndFontTable.getItem(FONT);
  17. Image oldImage = item.getImage();
  18. if (oldImage != null) oldImage.dispose();
  19. item.setImage (fontImage (ft));
  20. item.setFont(ft);
  21. colorAndFontTable.layout ();
  22. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

  1. /**
  2. * Sets the font of TableItem 0.
  3. */
  4. void setItemFont () {
  5. if (!instance.startup) {
  6. table1.getItem (0).setFont (itemFont);
  7. }
  8. /* Set the font item's image to match the font of the item. */
  9. Font ft = itemFont;
  10. if (ft == null) ft = table1.getItem (0).getFont ();
  11. TableItem item = colorAndFontTable.getItem(ITEM_FONT);
  12. Image oldImage = item.getImage();
  13. if (oldImage != null) oldImage.dispose();
  14. item.setImage (fontImage(ft));
  15. item.setFont(ft);
  16. colorAndFontTable.layout ();
  17. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

  1. /**
  2. * Sets the font of the Row 0 TableItem in column 1.
  3. */
  4. void setCellFont () {
  5. if (!instance.startup) {
  6. table1.getItem (0).setFont (1, cellFont);
  7. }
  8. /* Set the font item's image to match the font of the item. */
  9. Font ft = cellFont;
  10. if (ft == null) ft = table1.getItem (0).getFont (1);
  11. TableItem item = colorAndFontTable.getItem(CELL_FONT);
  12. Image oldImage = item.getImage();
  13. if (oldImage != null) oldImage.dispose();
  14. item.setImage (fontImage(ft));
  15. item.setFont(ft);
  16. colorAndFontTable.layout ();
  17. }

代码示例来源:origin: org.eclipse/org.eclipse.ajdt.ui

  1. table.getSelection()[0].setData(selection);
  2. table.layout();

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

  1. /**
  2. * Sets the font of CTabItem 0.
  3. */
  4. void setItemFont () {
  5. if (!instance.startup) {
  6. tabFolder1.getItem (0).setFont (itemFont);
  7. setExampleWidgetSize();
  8. }
  9. /* Set the font item's image to match the font of the item. */
  10. Font ft = itemFont;
  11. if (ft == null) ft = tabFolder1.getItem (0).getFont ();
  12. TableItem item = colorAndFontTable.getItem(ITEM_FONT);
  13. Image oldImage = item.getImage();
  14. if (oldImage != null) oldImage.dispose();
  15. item.setImage (fontImage(ft));
  16. item.setFont(ft);
  17. colorAndFontTable.layout ();
  18. }
  19. }

相关文章

Table类方法