javax.swing.JTable.setValueAt()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(304)

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

JTable.setValueAt介绍

暂无

代码示例

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

public void unselectAll () {
  for (int row : extensions.keySet()) {
    table.setValueAt(false, row, 0);
  }
}

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

public void setSelected (String extensionName, boolean selected) {
  int row = -1;
  for (int i : extensions.keySet()) {
    if (extensions.get(i).getName().equals(extensionName)) {
      row = i;
      break;
    }
  }
  if (row != -1) table.setValueAt(selected, row, 0);
}

代码示例来源:origin: RipMeApp/ripme

@Override
  public void actionPerformed(ActionEvent ae) {
    for (int row = 0; row < tableComponent.getRowCount(); row++) {
      tableComponent.setValueAt(true, row, 4);
    }
  }
};

代码示例来源:origin: RipMeApp/ripme

@Override
  public void actionPerformed(ActionEvent ae) {
    for (int row : tableComponent.getSelectedRows()) {
      tableComponent.setValueAt(true, row, 4);
    }
  }
};

代码示例来源:origin: RipMeApp/ripme

@Override
  public void actionPerformed(ActionEvent ae) {
    for (int row : tableComponent.getSelectedRows()) {
      tableComponent.setValueAt(false, row, 4);
    }
  }
};

代码示例来源:origin: RipMeApp/ripme

@Override
  public void actionPerformed(ActionEvent ae) {
    for (int row = 0; row < tableComponent.getRowCount(); row++) {
      tableComponent.setValueAt(false, row, 4);
    }
  }
};

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

private void updateAllRecStatus() {
  for (int row = 0; row < promptArray.length; row++) {
    String recStatus = determineStatus(promptArray[row].getRecording());
    // PRI2 Assumes saturation status is false; needs to actually check
    jTable_PromptSet.setValueAt(recStatus, row, REC_STATUS_COLUMN);
  }
}

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

setText((state) ? NONE : ALL);
for (int r = 0; r < table.getRowCount(); r++) {
  table.setValueAt(state, r, viewColumn);

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

warning = currentRecording.isAmpClipped || currentRecording.isTempClipped;
Test.output("|AdminWindow.makeRecording()| New status: " + recStatus);
jTable_PromptSet.setValueAt(recStatus, promptIndex, REC_STATUS_COLUMN);

代码示例来源:origin: ron190/jsql-injection

FixedColumnTable.this.fixedTable.setValueAt(FixedColumnTable.this.mainTable.getValueAt(i, 0), i, 0);
  FixedColumnTable.this.fixedTable.setValueAt(FixedColumnTable.this.mainTable.getValueAt(i, 1), i, 1);
this.fixedTable.setValueAt(this.mainTable.getValueAt(i, 0), i, 0);
this.fixedTable.setValueAt(this.mainTable.getValueAt(i, 1), i, 1);

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

table = new JTable(4, 4);
for (int i = 0; i < table.getRowCount(); i++) {
  table.setValueAt(i, i, 0);
headerTable = new JTable(model);
for (int i = 0; i < table.getRowCount(); i++) {
  headerTable.setValueAt("Row " + (i + 1), i, 0);

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

JTable table = new JTable();
...
int row = ...
int column = ...
table.setValueAt("", row, column);

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

Map<String,Integer> map=new HashMap<>();
map.put("A",1);
map.put("B",2);
map.put("C",3);
JTable table=new JTable(map.size(),2);
int row=0;
for(Map.Entry<String,Integer> entry: map.entrySet()){
  table.setValueAt(entry.getKey(),row,0);
  table.setValueAt(entry.getValue(),row,1);
  row++;
}

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

public static void clearTable(final JTable table) {
  for (int i = 0; i < table.getRowCount(); i++)
   for(int j = 0; j < table.getColumnCount(); j++) {
     table.setValueAt("", i, j);
   }
  }
}

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

@Override
public void setValueAt(Object aValue, int row, int column) {
  super.setValueAt(column == 0 ? aValue.toString() : aValue, row, column);
  setSelectedCellTypeInfo();
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-jsf

private void initJsfComponentLibraries(JSFVersion version) {
  List<JsfComponentImplementation> descriptors = componentsMap.get(version);
  if (descriptors == null) {
    return;
  }
  for (int i = 0; i < descriptors.size(); i++) {
    JsfComponentImplementation jsfComponentDescriptor = descriptors.get(i);
    if (jsfComponentDescriptor.isInWebModule(panel.getWebModule())) {
      jsfComponentsTable.setValueAt(true, i, 0);
    }
  }
}

代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2

public void setSelection(String selection, Color value) {
  // select a certain RT
  int index = setSelection(selection);
  if (index > -1) {
    table.setValueAt(value, index, 1);
    perform();
  }
}

代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2

public void setSelection(String selection, Color value) {
  // select a certain DataSource
  int index = setSelection(selection);
  if (index > -1) {
    table.setValueAt(value, index, 1);
    perform();
  }
}

代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2

public void setSelection(String selection, Shape value) {
  // select a certain RT
  int index = setSelection(selection);
  if (index > -1) {
    table.setValueAt(value, index, 1);
    perform();
  }
}

代码示例来源:origin: locationtech/jts

public static void commitChanges(JTable table) {
  if (table.isEditing()) {
    String text = ((JTextComponent) table.getEditorComponent()).getText();
    table.setValueAt(text, table.getEditingRow(), table.getEditingColumn());
    table.getCellEditor().cancelCellEditing();
  }
}

相关文章

JTable类方法