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

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

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

TableColumn.getIdentifier介绍

暂无

代码示例

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

  1. @Override
  2. public void setDraggedColumn(TableColumn pAColumn)
  3. {
  4. int lIndex = -1;
  5. if (pAColumn != null)
  6. lIndex = getColumnModel().getColumnIndex(pAColumn.getIdentifier());
  7. if (lIndex != 0)
  8. super.setDraggedColumn(pAColumn);
  9. }

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

  1. public int compare(TableColumn c1, TableColumn c2) {
  2. Integer index1 = (Integer)c1.getIdentifier();
  3. Integer index2 = (Integer)c2.getIdentifier();
  4. return index1.compareTo(index2);
  5. }
  6. });

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

  1. /**
  2. * Whether the table column is sortable.
  3. *
  4. * @param column
  5. * the table column to test.
  6. * @return true is the table column is sortable.
  7. */
  8. protected boolean isSortable(TableColumn column) {
  9. return column.getIdentifier() != null
  10. && column.getIdentifier().toString().length() > 0
  11. && !column.getIdentifier().toString().startsWith("#");
  12. }

代码示例来源:origin: com.eas.platypus/platypus-js-forms

  1. private boolean isColumnReadOnly(TableColumn aViewCol) {
  2. if (aViewCol.getIdentifier() instanceof ModelColumn) {
  3. return ((ModelColumn) aViewCol.getIdentifier()).isReadOnly();
  4. }
  5. return false;
  6. }
  7. }

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

  1. @Override
  2. public int getColumnIndex(Object columnIdentifier) {
  3. if (columnIdentifier == null) {
  4. throw new IllegalArgumentException("Dont send null to getColumnIndex, null shouldn't be in the sorting table.");
  5. }
  6. for (int x = 0; x < columnList.size(); x++) {
  7. if (columnList.get(x).getIdentifier().equals(columnIdentifier)) {
  8. return x;
  9. }
  10. }
  11. throw new IllegalArgumentException();
  12. }

代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public TableColumnExt getColumnExt(Object identifier) {
  5. for (Iterator<TableColumn> iter = initialColumns.iterator(); iter.hasNext();) {
  6. TableColumn column = iter.next();
  7. if ((column instanceof TableColumnExt) && (identifier.equals(column.getIdentifier()))) {
  8. return (TableColumnExt) column;
  9. }
  10. }
  11. return null;
  12. }

代码示例来源:origin: org.swinglabs.swingx/swingx-core

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public TableColumnExt getColumnExt(Object identifier) {
  6. for (Iterator<TableColumn> iter = initialColumns.iterator(); iter.hasNext();) {
  7. TableColumn column = iter.next();
  8. if ((column instanceof TableColumnExt) && (identifier.equals(column.getIdentifier()))) {
  9. return (TableColumnExt) column;
  10. }
  11. }
  12. return null;
  13. }

代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public TableColumnExt getColumnExt(Object identifier) {
  6. for (Iterator<TableColumn> iter = initialColumns.iterator(); iter.hasNext();) {
  7. TableColumn column = iter.next();
  8. if ((column instanceof TableColumnExt) && (identifier.equals(column.getIdentifier()))) {
  9. return (TableColumnExt) column;
  10. }
  11. }
  12. return null;
  13. }

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

  1. private void orderUpdate() {
  2. // order.clear();
  3. if (!frozen) {
  4. order = new ArrayList<Sortables>();
  5. for (TableColumn c : columnList) {
  6. order.add((Sortables) c.getIdentifier());
  7. }
  8. }
  9. check();
  10. }

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

  1. protected AbstractApplicationTableModel(TableColumnModelExt columnModel,
  2. boolean createNewRow,
  3. boolean createEmptyRowIsEmpty) {
  4. this.identifiers = Lists.newArrayListWithCapacity(columnModel.getColumnCount());
  5. for (TableColumn tc : columnModel.getColumns(true)) {
  6. this.identifiers.add((ColumnIdentifier<R>) tc.getIdentifier());
  7. }
  8. this.createNewRow = createNewRow;
  9. this.createEmptyRowIsEmpty = createEmptyRowIsEmpty;
  10. }

代码示例来源:origin: org.swinglabs.swingx/swingx-all

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public Object getColumnIdentifierAt(int columnIndex) {
  6. if ((columnIndex < 0) || (columnIndex >= getColumnCount())) {
  7. throw new ArrayIndexOutOfBoundsException(
  8. "invalid column index: " + columnIndex);
  9. }
  10. TableColumn column = getColumnByModelIndex(columnIndex);
  11. Object identifier = column != null ? column.getIdentifier() : null;
  12. return identifier;
  13. }

代码示例来源:origin: org.swinglabs.swingx/swingx-core

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public Object getColumnIdentifierAt(int columnIndex) {
  6. if ((columnIndex < 0) || (columnIndex >= getColumnCount())) {
  7. throw new ArrayIndexOutOfBoundsException(
  8. "invalid column index: " + columnIndex);
  9. }
  10. TableColumn column = getColumnByModelIndex(columnIndex);
  11. Object identifier = column != null ? column.getIdentifier() : null;
  12. return identifier;
  13. }

代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public Object getColumnIdentifierAt(int columnIndex) {
  6. if ((columnIndex < 0) || (columnIndex >= getColumnCount())) {
  7. throw new ArrayIndexOutOfBoundsException(
  8. "invalid column index: " + columnIndex);
  9. }
  10. TableColumn column = getColumnByModelIndex(columnIndex);
  11. Object identifier = column != null ? column.getIdentifier() : null;
  12. return identifier;
  13. }

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

  1. private static boolean canMove(TableColumn column,
  2. JTableHeader header) {
  3. return (column != null) && header.getReorderingAllowed()
  4. && header.getColumnModel().getColumnIndex(column.getIdentifier()) != 0;
  5. }

代码示例来源:origin: org.swinglabs.swingx/swingx-core

  1. private void installColumn(TableColumn column) {
  2. this.column = column;
  3. column.addPropertyChangeListener(getColumnListener());
  4. updateFromColumnHeader(column.getHeaderValue());
  5. // #429-swing: actionCommand must be string
  6. if (column.getIdentifier() != null) {
  7. setActionCommand(column.getIdentifier().toString());
  8. }
  9. boolean visible = (column instanceof TableColumnExt) ?
  10. ((TableColumnExt) column).isVisible() : true;
  11. updateFromColumnVisible(visible);
  12. }

代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core

  1. private void installColumn(TableColumn column) {
  2. this.column = column;
  3. column.addPropertyChangeListener(getColumnListener());
  4. updateFromColumnHeader(column.getHeaderValue());
  5. // #429-swing: actionCommand must be string
  6. if (column.getIdentifier() != null) {
  7. setActionCommand(column.getIdentifier().toString());
  8. }
  9. boolean visible = (column instanceof TableColumnExt) ?
  10. ((TableColumnExt) column).isVisible() : true;
  11. updateFromColumnVisible(visible);
  12. }

代码示例来源:origin: com.haulmont.thirdparty/swingx-core

  1. private void installColumn(TableColumn column) {
  2. this.column = column;
  3. column.addPropertyChangeListener(getColumnListener());
  4. updateFromColumnHeader(column.getHeaderValue());
  5. // #429-swing: actionCommand must be string
  6. if (column.getIdentifier() != null) {
  7. setActionCommand(column.getIdentifier().toString());
  8. }
  9. boolean visible = (column instanceof TableColumnExt) ?
  10. ((TableColumnExt) column).isVisible() : true;
  11. updateFromColumnVisible(visible);
  12. }

代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop

  1. private void installColumn(TableColumn column) {
  2. this.column = column;
  3. column.addPropertyChangeListener(getColumnListener());
  4. updateFromColumnHeader(column.getHeaderValue());
  5. // #429-swing: actionCommand must be string
  6. if (column.getIdentifier() != null) {
  7. setActionCommand(column.getIdentifier().toString());
  8. }
  9. boolean visible = (column instanceof TableColumnExt) ?
  10. ((TableColumnExt) column).isVisible() : true;
  11. updateFromColumnVisible(visible);
  12. }

代码示例来源:origin: org.swinglabs.swingx/swingx-all

  1. private void installColumn(TableColumn column) {
  2. this.column = column;
  3. column.addPropertyChangeListener(getColumnListener());
  4. updateFromColumnHeader(column.getHeaderValue());
  5. // #429-swing: actionCommand must be string
  6. if (column.getIdentifier() != null) {
  7. setActionCommand(column.getIdentifier().toString());
  8. }
  9. boolean visible = (column instanceof TableColumnExt) ?
  10. ((TableColumnExt) column).isVisible() : true;
  11. updateFromColumnVisible(visible);
  12. }

代码示例来源: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. }

相关文章