ModifyAddressesDialog.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 allows the user to modify multiple addresses
*/
public class ModifyAddressesDialog extends MultipleOperationDialog {
private DhcpClientRecord [] recs;
private JLabel numberLabel;
private JTextField comment;
private static final String keepString =
private Object currentValue;
public ServerListModel() {
}
public int getSize() {
}
}
}
public Object getSelectedItem() {
return currentValue;
}
}
private Object currentValue;
public MacroListModel() {
try {
} catch (Throwable e) {
}
}
}
public int getSize() {
}
}
}
public Object getSelectedItem() {
return currentValue;
}
}
// Create dialog with reset button
super(f, true);
}
}
protected JPanel getMainPanel() {
// Number of addresses
// Server
server.setEditable(true);
// Comment
// Macro
// BootP
bootpAll = new JRadioButton(
bootpNone = new JRadioButton(
// Unusable
unusableAll = new JRadioButton(
unusableNone = new JRadioButton(
// Lease
leaseDynamic = new JRadioButton(
leasePermanent = new JRadioButton(
buttonPanel.setOkEnabled(true);
doReset();
return mainPanel;
}
protected void doReset() {
bootpCurrent.setSelected(true);
unusableCurrent.setSelected(true);
leaseCurrent.setSelected(true);
}
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 {
if (!s.equals(keepString)) {
// Change server if necessary
}
if (!s.equals(keepString)) {
client.setComment(s);
}
}
if (bootpAll.isSelected()) {
} else if (bootpNone.isSelected()) {
}
if (unusableAll.isSelected()) {
client.setUnusable(true);
} else if (unusableNone.isSelected()) {
client.setUnusable(false);
}
if (leaseDynamic.isSelected()) {
client.setPermanent(false);
} else if (leasePermanent.isSelected()) {
client.setPermanent(true);
}
} catch (InterruptedException e) {
closeDialog();
return;
} catch (Throwable e) {
}
}
// Errors occurred, display them
if (errorsOccurred()) {
}
closeDialog();
}
};
}
protected String getHelpKey() {
return "modify_multiple_addresses";
}
protected void fireActionPerformed() {
}
}