userselectiontablemodel.java
来自「Java的面向对象数据库系统的源代码」· Java 代码 · 共 39 行
JAVA
39 行
// You can redistribute this software and/or modify it under the terms of// the Ozone Library License version 1 published by ozone-db.org.//// The original code and portions created by SMB are// Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.//// $Id: UserSelectionTableModel.java,v 1.2 2003/03/24 08:36:55 per_nyfelt Exp $package org.ozoneDB.adminGui.feature.account;import org.ozoneDB.core.User;import javax.swing.table.DefaultTableModel;import java.util.Vector;/** * @author Per Nyfelt */class UserSelectionTableModel extends DefaultTableModel { public UserSelectionTableModel() { addColumn("id"); addColumn("name"); } /** * Adds a row to the end of the model. The new row will contain * <code>null</code> values unless a <code>User</code> is specified. * Notification of the row being added will be generated. * * @param user data of the row being added */ public void addRow(User user) { Vector rowData = new Vector(); rowData.add(user.id()); rowData.add(user.name()); super.addRow(rowData); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?