本文整理了Java中javax.swing.table.TableColumn.setIdentifier()
方法的一些代码示例,展示了TableColumn.setIdentifier()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableColumn.setIdentifier()
方法的具体详情如下:
包路径:javax.swing.table.TableColumn
类名称:TableColumn
方法名:setIdentifier
暂无
代码示例来源:origin: net.sf.jt400/jt400
/**
Constructs a VTableColumn object.
@param columnIndex The column index.
@param propertyIdentifier The property identifier.
**/
public VTableColumn (int columnIndex, Object propertyIdentifier)
{
super (columnIndex);
setIdentifier (propertyIdentifier);
}
代码示例来源:origin: xyz.cofe/gui.swing
public void setIdentifier(Object identifier) {
tableColumn.setIdentifier(identifier);
}
代码示例来源:origin: org.fuzzydb/org.fuzzydb.util.gui
public void configureColumn(int index, String name, Integer minWidth, Integer prefWidth, Integer maxWidth) {
table.getColumnModel().getColumn(index).setIdentifier(name);
table.getColumnModel().getColumn(index).setHeaderValue(name);
if (minWidth != null) table.getColumnModel().getColumn(index).setMinWidth(minWidth);
if (prefWidth != null) table.getColumnModel().getColumn(index).setPreferredWidth(prefWidth);
if (maxWidth != null) table.getColumnModel().getColumn(index).setMaxWidth(maxWidth);
}
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
/** Creates a new instance of SheetTableModel */
public SheetColumnModel() {
namesColumn = new TableColumn(0);
namesColumn.setIdentifier(NAMES_IDENTIFIER);
valuesColumn = new TableColumn(1);
valuesColumn.setIdentifier(VALUES_IDENTIFIER);
namesColumn.setMinWidth(60);
valuesColumn.setMinWidth(30);
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
/** Creates a new instance of SheetTableModel */
public SheetColumnModel() {
namesColumn = new TableColumn(0);
namesColumn.setIdentifier (NAMES_IDENTIFIER);
valuesColumn = new TableColumn(1);
valuesColumn.setIdentifier (VALUES_IDENTIFIER);
namesColumn.setMinWidth(60);
valuesColumn.setMinWidth(30);
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
/** Creates a new instance of SheetTableModel */
public SheetColumnModel() {
namesColumn = new TableColumn(0);
namesColumn.setIdentifier (NAMES_IDENTIFIER);
valuesColumn = new TableColumn(1);
valuesColumn.setIdentifier (VALUES_IDENTIFIER);
namesColumn.setMinWidth(60);
valuesColumn.setMinWidth(30);
}
代码示例来源:origin: xyz.cofe/gui.swing
public TableColumn createTableColumn( String name ){
int mi = modelIndexOfColumn(name);
if( mi<0 )return null;
TableColumn tc = new TableColumn(mi);
tc.setIdentifier(name);
tc.setHeaderValue(name);
tc.setModelIndex(mi);
tc.setPreferredWidth(50);
tc.setCellRenderer(renderer);
return tc;
}
代码示例来源:origin: stackoverflow.com
col.setIdentifier(COLUMN1);
col.setHeaderValue("Data");
代码示例来源:origin: org.netbeans.modules/org-netbeans-lib-profiler-ui
void loadFromStorage(Properties properties, ProfilerTable table) {
for (int i = 0; i < getColumnCount(); i++) {
String indexS = properties.getProperty(COLUMN_INDEX_KEY + "." + i); // NOI18N
if (indexS == null) continue;
try {
int index = Integer.parseInt(indexS);
int width = getDefaultColumnWidth(index);
String widthS = properties.getProperty(COLUMN_WIDTH_KEY + "." + i); // NOI18N
if (widthS != null) try {
width = Integer.parseInt(widthS);
} catch (NumberFormatException e) {}
TableColumn column = getModelColumn(index);
column.setIdentifier(i);
if (index != getFitWidthColumn()) {
if (width == 0) hideColumn(column, table);
else column.setWidth(width);
}
} catch (NumberFormatException e) {}
}
Collections.sort(tableColumns, new Comparator<TableColumn>() {
public int compare(TableColumn c1, TableColumn c2) {
Integer index1 = (Integer)c1.getIdentifier();
Integer index2 = (Integer)c2.getIdentifier();
return index1.compareTo(index2);
}
});
}
代码示例来源:origin: org.cytoscape/swing-application-impl
private void initTable() {
DefaultTableColumnModel cm = new DefaultTableColumnModel();
for (int i = 0; i < PreferenceTableModel.columnHeader.length; i++) {
DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
renderer.setHorizontalAlignment(PreferenceTableModel.alignment[i]);
TableColumn Column = new TableColumn(i, PreferenceTableModel.columnWidth[i], renderer,
null);
Column.setIdentifier(PreferenceTableModel.columnHeader[i]);
cm.addColumn(Column);
}
prefsTable.setColumnModel(cm);
prefsTable.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
}
代码示例来源:origin: cytoscape/application
renderer.setHorizontalAlignment(alignment[i]);
column = new TableColumn(i, columnWidth[i], renderer, null);
column.setIdentifier(PreferenceTableModel.columnHeader[i]);
prefsTable.addColumn(column);
代码示例来源:origin: stackoverflow.com
col.setIdentifier(COLUMN1);
col.setHeaderValue("Column1");
col.setIdentifier(COLUMN2);
col.setHeaderValue(new ColorHeaderValue("Column2"));
col.setHeaderRenderer(new ColorHeaderRenderer());
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-common
public void showColumn(final int _modelIndex){
final TableColumn col = new TableColumn(_modelIndex);
col.setIdentifier(getTable().getModel().getColumnName(_modelIndex));
col.setHeaderValue(col.getIdentifier());
getColumnModel().addColumn(col);
adjustWidth(col);
}
代码示例来源:origin: com.google.code.findbugs/findbugs
private TableColumn makeTableColumn(int x, Sortables c) {
TableColumn tc = new TableColumn(x);
FBTableCellRenderer temp = new FBTableCellRenderer();
tc.setHeaderRenderer(temp);
tc.setIdentifier(c);
tc.setHeaderValue(c);
tc.setResizable(false);
tc.sizeWidthToFit();
return tc;
}
代码示例来源:origin: net.sf.jt400/jt400
col.setIdentifier(model_.getColumnID(i));
代码示例来源:origin: tinyMediaManager/tinyMediaManager
table.getColumnModel().getColumn(0).setIdentifier("title"); //$NON-NLS-1$
table.getTableHeader().getColumnModel().getColumn(1).setMinWidth(width);
table.getTableHeader().getColumnModel().getColumn(1).setMaxWidth((int) (width * 1.5));
table.getTableHeader().getColumnModel().getColumn(1).setIdentifier("year"); //$NON-NLS-1$
table.getTableHeader().getColumnModel().getColumn(2).setMinWidth((int) (width * 1.2));
table.getTableHeader().getColumnModel().getColumn(2).setMaxWidth((int) (width * 1.5));
table.getTableHeader().getColumnModel().getColumn(2).setIdentifier("rating"); //$NON-NLS-1$
table.getTableHeader().getColumnModel().getColumn(3).setMinWidth((int) (width * 1.2));
table.getTableHeader().getColumnModel().getColumn(3).setMaxWidth((int) (width * 1.2));
table.getTableHeader().getColumnModel().getColumn(3).setIdentifier("dateadded"); //$NON-NLS-1$
table.getTableHeader().getColumnModel().getColumn(4).setMaxWidth(20);
table.getColumnModel().getColumn(4).setHeaderValue(IconManager.INFO);
table.getTableHeader().getColumnModel().getColumn(4).setIdentifier("nfo"); //$NON-NLS-1$
table.getTableHeader().getColumnModel().getColumn(5).setMaxWidth(20);
table.getColumnModel().getColumn(5).setHeaderValue(IconManager.SEARCH);
table.getTableHeader().getColumnModel().getColumn(5).setIdentifier("metadata"); //$NON-NLS-1$
table.getTableHeader().getColumnModel().getColumn(6).setMaxWidth(20);
table.getColumnModel().getColumn(6).setHeaderValue(IconManager.IMAGE);
table.getTableHeader().getColumnModel().getColumn(6).setIdentifier("images"); //$NON-NLS-1$
table.getTableHeader().getColumnModel().getColumn(7).setMaxWidth(20);
table.getColumnModel().getColumn(7).setHeaderValue(IconManager.CLAPBOARD);
table.getTableHeader().getColumnModel().getColumn(7).setIdentifier("trailer"); //$NON-NLS-1$
代码示例来源:origin: net.sf.jt400/jt400
col.setIdentifier(model_.getColumnID(i));
代码示例来源:origin: org.xworker/xworker_core
comp.setIdentifier(identifier);
代码示例来源:origin: org.jspresso/jspresso-swing-application
TableColumn column = viewComponent.getColumnModel().getColumn(
columnIndex++);
column.setIdentifier(propertyName);
IPropertyDescriptor propertyDescriptor = modelDescriptor
.getCollectionDescriptor().getElementDescriptor()
代码示例来源:origin: otros-systems/otroslogviewer
columns.get(i).setIdentifier(TableColumns.getColumnById(i));
内容来源于网络,如有侵权,请联系作者删除!