ReleaseAddressDialog.java revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* ident "%Z%%M% %I% %E% SMI"
*
* Copyright 1998-2002 by Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/**
* This dialog is used to release one or more addresses. Release is defined
* to mean resetting the client id to 00 and setting the lease date to 0.
*/
public class ReleaseAddressDialog extends MultipleOperationDialog {
private DhcpClientRecord [] recs;
boolean showAddresses;
class AddressTableModel extends AbstractTableModel {
public int getRowCount() {
return 0;
} else {
}
}
public int getColumnCount() {
return 3;
}
switch (column) {
case 0:
if (showAddresses) {
} else {
}
case 1:
case 2:
default:
return null;
}
}
switch (column) {
case 0:
if (showAddresses) {
return IPAddress.class;
} else {
return String.class;
}
case 1:
return String.class;
case 2:
return Date.class;
default:
return Object.class;
}
}
switch (column) {
case 0:
if (showAddresses) {
} else {
}
case 1:
case 2:
default:
return null;
}
}
}
super(f, false);
this.showAddresses = showAddresses;
}
}
protected JPanel getMainPanel() {
d.height = 100;
buttonPanel.setOkEnabled(true);
return mainPanel;
}
protected String getProgressMessage() {
}
protected int getProgressLength() {
}
protected String getErrorHeading() {
}
protected Class getErrorClass() {
return IPAddress.class;
}
protected Thread getOperationThread() {
return new Thread() {
public void run() {
try {
// Clear client id and lease date
// Update progress meter
} catch (InterruptedException e) {
// User asked to stop
closeDialog();
return;
} catch (Throwable e) {
}
}
// Errors occurred, display them now
if (errorsOccurred()) {
}
closeDialog();
}
};
}
protected String getHelpKey() {
return "release_addresses";
}
protected void fireActionPerformed() {
}
}