本文整理了Java中javax.swing.table.TableModel.setValueAt()
方法的一些代码示例,展示了TableModel.setValueAt()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableModel.setValueAt()
方法的具体详情如下:
包路径:javax.swing.table.TableModel
类名称:TableModel
方法名:setValueAt
暂无
代码示例来源:origin: groovy/groovy-core
public void setValueAt(Object aValue, int aRow, int aColumn) {
model.setValueAt(aValue, aRow, aColumn);
}
代码示例来源:origin: groovy/groovy-core
public void setValueAt(Object aValue, int aRow, int aColumn) {
checkModel();
model.setValueAt(aValue, indexes[aRow], aColumn);
}
代码示例来源:origin: stackoverflow.com
if (e.getType() == TableModelEvent.UPDATE)
{
int row = e.getFirstRow();
int column = e.getColumn();
if (column == 0)
{
TableModel model = (TableModel)e.getSource();
model.setValueAt(Boolean.true, row, 1);
...
}
}
代码示例来源:origin: stackoverflow.com
// Retrieving the model
TableModel model = jTableTranslation.getModel();
// Clearing the model
for (int i=0;i<16;i++) {
for (int j=0;j<3;j++) {
model.setValueAt("", i, j);
}
}
代码示例来源:origin: com.opensymphony/webwork
public void setValueAt(Object aValue, int r, int c) {
if ((rows.size() > 0) && (r < rows.size())) {
model.setValueAt(aValue, ((Row) rows.get(r)).index, c);
}
}
代码示例来源:origin: webwork/webwork-jira
public void setValueAt(Object aValue, int r, int c)
{
if(rows.size() > 0 && r < rows.size())
{
model.setValueAt(aValue, ((Row)rows.get(r)).index, c);
}
}
代码示例来源:origin: stackoverflow.com
public void setValueAt(Object value, int row, int column)
{
super.setValueAt(value, row, column);
if (column == 0 || column == 1)
{
TableModel model = (TableModel)e.getSource();
int quantity = ((Integer)model.getValueAt(row, 0)).intValue();
double price = ((Double)model.getValueAt(row, 1)).doubleValue();
Double value = new Double(quantity * price);
model.setValueAt(value, row, 2);
}
}
代码示例来源:origin: org.jspresso.framework/jspresso-swing-application
/**
* {@inheritDoc}
*/
@Override
public void setValueAt(Object aValue, int row, int column) {
tableModel.setValueAt(aValue, modelIndex(row), column);
}
代码示例来源:origin: org.jspresso.framework/jspresso-wings-application
/**
* {@inheritDoc}
*/
@Override
public void setValueAt(Object aValue, int row, int column) {
tableModel.setValueAt(aValue, modelIndex(row), column);
}
代码示例来源:origin: org.jspresso/jspresso-swing-application
/**
* {@inheritDoc}
*/
@Override
public void setValueAt(Object aValue, int row, int column) {
tableModel.setValueAt(aValue, modelIndex(row), column);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-makeproject
private void tableButtonActionPerformed(int row) {
String path = selectBinaryFile((String) table.getModel().getValueAt(row, 2));
if (path == null) {
return;
}
table.getModel().setValueAt(path, row, 2);
}
代码示例来源:origin: net.sf.cuf/cuf-swing
public void setValueAt(final Object pValue, final int pRow, final int pColumn)
{
mTableModel.setValueAt(pValue, modelIndex(pRow), pColumn);
}
}
代码示例来源:origin: org.bitbucket.goalhub.simpleide/jedit
public void setValueAt(Object aValue, int rowIndex, int columnIndex)
{
int trueRowIndex = getTrueRow(rowIndex);
delegated.setValueAt(aValue, trueRowIndex, columnIndex);
} //}}}
代码示例来源:origin: freeplane/freeplane
@Override
public void setValueAt(Object value, final int row, final int column) {
ensureValidRow(row);
final int origRow = mIndexArray.get(row).intValue();
mTableModel.setValueAt(value, origRow, column);
fireTableCellUpdated(row, column);
}
代码示例来源:origin: xyz.cofe/gui.swing
@Override
public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
if (tableModel == null) return;
int c = mapColumnToInside(columnIndex);
if( c<0 )return;
int r = mapRowToInside(rowIndex);
if( r<0 )return;
tableModel.setValueAt(aValue, r, c);
}
// </editor-fold>
代码示例来源:origin: com.eas.platypus/platypus-js-grid
@Override
public void setValueAt(Object aValue, int aRowIndex, int aColIndex) {
if (isLegal(aRowIndex) && isLegal(aColIndex)) {
delegate.setValueAt(aValue, aRowIndex, aColIndex);
}
}
代码示例来源:origin: net.sf.meka/meka
/**
* Sets the value in the cell at columnIndex and rowIndex to aValue.
*
* @param aValue the new value of the cell
* @param rowIndex the row
* @param columnIndex the column
*/
@Override
public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
if (isInitialized())
getUnsortedModel().setValueAt(aValue, getActualRow(rowIndex), columnIndex);
}
代码示例来源:origin: tulskiy/musique
@Override
public void actionPerformed(ActionEvent e) {
table.getModel().setValueAt("", table.getSelectedRow(), 1);
table.repaint();
}
});
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-jsf
@Messages({
"TemplateClientPanelVisual.lbl.select.valid.template=Select valid or non-empty template..."
})
private static TableModel getNoTemplateTableModel() {
TableModel model = new DefaultTableModel(1, 1);
model.setValueAt(Bundle.TemplateClientPanelVisual_lbl_select_valid_template(), 0, 0);
return model;
}
代码示例来源:origin: xyz.cofe/gui.swing
@Override
public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
if( tableModels==null )return;
if( tableModels.size()==0 )return;
Pair<TableModel,Integer> pTC = getTMColumn(columnIndex);
if( pTC==null )return;
pTC.A().setValueAt(aValue,rowIndex,pTC.B());
}
内容来源于网络,如有侵权,请联系作者删除!