javax.swing.table.TableColumn.setIdentifier()方法的使用及代码示例

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

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

TableColumn.setIdentifier介绍

暂无

代码示例

代码示例来源:origin: net.sf.jt400/jt400

  1. /**
  2. Constructs a VTableColumn object.
  3. @param columnIndex The column index.
  4. @param propertyIdentifier The property identifier.
  5. **/
  6. public VTableColumn (int columnIndex, Object propertyIdentifier)
  7. {
  8. super (columnIndex);
  9. setIdentifier (propertyIdentifier);
  10. }

代码示例来源:origin: xyz.cofe/gui.swing

  1. public void setIdentifier(Object identifier) {
  2. tableColumn.setIdentifier(identifier);
  3. }

代码示例来源:origin: org.fuzzydb/org.fuzzydb.util.gui

  1. public void configureColumn(int index, String name, Integer minWidth, Integer prefWidth, Integer maxWidth) {
  2. table.getColumnModel().getColumn(index).setIdentifier(name);
  3. table.getColumnModel().getColumn(index).setHeaderValue(name);
  4. if (minWidth != null) table.getColumnModel().getColumn(index).setMinWidth(minWidth);
  5. if (prefWidth != null) table.getColumnModel().getColumn(index).setPreferredWidth(prefWidth);
  6. if (maxWidth != null) table.getColumnModel().getColumn(index).setMaxWidth(maxWidth);
  7. }
  8. }

代码示例来源:origin: org.netbeans.api/org-openide-explorer

  1. /** Creates a new instance of SheetTableModel */
  2. public SheetColumnModel() {
  3. namesColumn = new TableColumn(0);
  4. namesColumn.setIdentifier(NAMES_IDENTIFIER);
  5. valuesColumn = new TableColumn(1);
  6. valuesColumn.setIdentifier(VALUES_IDENTIFIER);
  7. namesColumn.setMinWidth(60);
  8. valuesColumn.setMinWidth(30);
  9. }

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

  1. /** Creates a new instance of SheetTableModel */
  2. public SheetColumnModel() {
  3. namesColumn = new TableColumn(0);
  4. namesColumn.setIdentifier (NAMES_IDENTIFIER);
  5. valuesColumn = new TableColumn(1);
  6. valuesColumn.setIdentifier (VALUES_IDENTIFIER);
  7. namesColumn.setMinWidth(60);
  8. valuesColumn.setMinWidth(30);
  9. }

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

  1. /** Creates a new instance of SheetTableModel */
  2. public SheetColumnModel() {
  3. namesColumn = new TableColumn(0);
  4. namesColumn.setIdentifier (NAMES_IDENTIFIER);
  5. valuesColumn = new TableColumn(1);
  6. valuesColumn.setIdentifier (VALUES_IDENTIFIER);
  7. namesColumn.setMinWidth(60);
  8. valuesColumn.setMinWidth(30);
  9. }

代码示例来源:origin: xyz.cofe/gui.swing

  1. public TableColumn createTableColumn( String name ){
  2. int mi = modelIndexOfColumn(name);
  3. if( mi<0 )return null;
  4. TableColumn tc = new TableColumn(mi);
  5. tc.setIdentifier(name);
  6. tc.setHeaderValue(name);
  7. tc.setModelIndex(mi);
  8. tc.setPreferredWidth(50);
  9. tc.setCellRenderer(renderer);
  10. return tc;
  11. }

代码示例来源:origin: stackoverflow.com

  1. col.setIdentifier(COLUMN1);
  2. col.setHeaderValue("Data");

代码示例来源:origin: org.netbeans.modules/org-netbeans-lib-profiler-ui

  1. void loadFromStorage(Properties properties, ProfilerTable table) {
  2. for (int i = 0; i < getColumnCount(); i++) {
  3. String indexS = properties.getProperty(COLUMN_INDEX_KEY + "." + i); // NOI18N
  4. if (indexS == null) continue;
  5. try {
  6. int index = Integer.parseInt(indexS);
  7. int width = getDefaultColumnWidth(index);
  8. String widthS = properties.getProperty(COLUMN_WIDTH_KEY + "." + i); // NOI18N
  9. if (widthS != null) try {
  10. width = Integer.parseInt(widthS);
  11. } catch (NumberFormatException e) {}
  12. TableColumn column = getModelColumn(index);
  13. column.setIdentifier(i);
  14. if (index != getFitWidthColumn()) {
  15. if (width == 0) hideColumn(column, table);
  16. else column.setWidth(width);
  17. }
  18. } catch (NumberFormatException e) {}
  19. }
  20. Collections.sort(tableColumns, new Comparator<TableColumn>() {
  21. public int compare(TableColumn c1, TableColumn c2) {
  22. Integer index1 = (Integer)c1.getIdentifier();
  23. Integer index2 = (Integer)c2.getIdentifier();
  24. return index1.compareTo(index2);
  25. }
  26. });
  27. }

代码示例来源:origin: org.cytoscape/swing-application-impl

  1. private void initTable() {
  2. DefaultTableColumnModel cm = new DefaultTableColumnModel();
  3. for (int i = 0; i < PreferenceTableModel.columnHeader.length; i++) {
  4. DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
  5. renderer.setHorizontalAlignment(PreferenceTableModel.alignment[i]);
  6. TableColumn Column = new TableColumn(i, PreferenceTableModel.columnWidth[i], renderer,
  7. null);
  8. Column.setIdentifier(PreferenceTableModel.columnHeader[i]);
  9. cm.addColumn(Column);
  10. }
  11. prefsTable.setColumnModel(cm);
  12. prefsTable.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  13. }

代码示例来源:origin: cytoscape/application

  1. renderer.setHorizontalAlignment(alignment[i]);
  2. column = new TableColumn(i, columnWidth[i], renderer, null);
  3. column.setIdentifier(PreferenceTableModel.columnHeader[i]);
  4. prefsTable.addColumn(column);

代码示例来源:origin: stackoverflow.com

  1. col.setIdentifier(COLUMN1);
  2. col.setHeaderValue("Column1");
  3. col.setIdentifier(COLUMN2);
  4. col.setHeaderValue(new ColorHeaderValue("Column2"));
  5. col.setHeaderRenderer(new ColorHeaderRenderer());

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-common

  1. public void showColumn(final int _modelIndex){
  2. final TableColumn col = new TableColumn(_modelIndex);
  3. col.setIdentifier(getTable().getModel().getColumnName(_modelIndex));
  4. col.setHeaderValue(col.getIdentifier());
  5. getColumnModel().addColumn(col);
  6. adjustWidth(col);
  7. }

代码示例来源:origin: com.google.code.findbugs/findbugs

  1. private TableColumn makeTableColumn(int x, Sortables c) {
  2. TableColumn tc = new TableColumn(x);
  3. FBTableCellRenderer temp = new FBTableCellRenderer();
  4. tc.setHeaderRenderer(temp);
  5. tc.setIdentifier(c);
  6. tc.setHeaderValue(c);
  7. tc.setResizable(false);
  8. tc.sizeWidthToFit();
  9. return tc;
  10. }

代码示例来源:origin: net.sf.jt400/jt400

  1. col.setIdentifier(model_.getColumnID(i));

代码示例来源:origin: tinyMediaManager/tinyMediaManager

  1. table.getColumnModel().getColumn(0).setIdentifier("title"); //$NON-NLS-1$
  2. table.getTableHeader().getColumnModel().getColumn(1).setMinWidth(width);
  3. table.getTableHeader().getColumnModel().getColumn(1).setMaxWidth((int) (width * 1.5));
  4. table.getTableHeader().getColumnModel().getColumn(1).setIdentifier("year"); //$NON-NLS-1$
  5. table.getTableHeader().getColumnModel().getColumn(2).setMinWidth((int) (width * 1.2));
  6. table.getTableHeader().getColumnModel().getColumn(2).setMaxWidth((int) (width * 1.5));
  7. table.getTableHeader().getColumnModel().getColumn(2).setIdentifier("rating"); //$NON-NLS-1$
  8. table.getTableHeader().getColumnModel().getColumn(3).setMinWidth((int) (width * 1.2));
  9. table.getTableHeader().getColumnModel().getColumn(3).setMaxWidth((int) (width * 1.2));
  10. table.getTableHeader().getColumnModel().getColumn(3).setIdentifier("dateadded"); //$NON-NLS-1$
  11. table.getTableHeader().getColumnModel().getColumn(4).setMaxWidth(20);
  12. table.getColumnModel().getColumn(4).setHeaderValue(IconManager.INFO);
  13. table.getTableHeader().getColumnModel().getColumn(4).setIdentifier("nfo"); //$NON-NLS-1$
  14. table.getTableHeader().getColumnModel().getColumn(5).setMaxWidth(20);
  15. table.getColumnModel().getColumn(5).setHeaderValue(IconManager.SEARCH);
  16. table.getTableHeader().getColumnModel().getColumn(5).setIdentifier("metadata"); //$NON-NLS-1$
  17. table.getTableHeader().getColumnModel().getColumn(6).setMaxWidth(20);
  18. table.getColumnModel().getColumn(6).setHeaderValue(IconManager.IMAGE);
  19. table.getTableHeader().getColumnModel().getColumn(6).setIdentifier("images"); //$NON-NLS-1$
  20. table.getTableHeader().getColumnModel().getColumn(7).setMaxWidth(20);
  21. table.getColumnModel().getColumn(7).setHeaderValue(IconManager.CLAPBOARD);
  22. table.getTableHeader().getColumnModel().getColumn(7).setIdentifier("trailer"); //$NON-NLS-1$

代码示例来源:origin: net.sf.jt400/jt400

  1. col.setIdentifier(model_.getColumnID(i));

代码示例来源:origin: org.xworker/xworker_core

  1. comp.setIdentifier(identifier);

代码示例来源:origin: org.jspresso/jspresso-swing-application

  1. TableColumn column = viewComponent.getColumnModel().getColumn(
  2. columnIndex++);
  3. column.setIdentifier(propertyName);
  4. IPropertyDescriptor propertyDescriptor = modelDescriptor
  5. .getCollectionDescriptor().getElementDescriptor()

代码示例来源:origin: otros-systems/otroslogviewer

  1. columns.get(i).setIdentifier(TableColumns.getColumnById(i));

相关文章