pmDelete.java revision 62d717f5277d7b19b63db2d800310f877b57c197
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Delete Printer implementation
*/
/*
* Window for Edit -> Delete
*/
// public class pmDelete extends JPanel {
public class pmDelete {
{
// Display error window
}
pmOKCancelDialog d = new pmOKCancelDialog(
mytop.selectedPrinter, false);
d.setVisible(true);
else {
try {
} catch (pmUserCancelledException ce) {
} catch (pmLoginFailedException de) {
pmMessageDialog m = new pmMessageDialog(
"LoginFailed");
m.setVisible(true);
} catch (pmGuiException ge) {
pmMessageDialog m = new pmMessageDialog(
m.setVisible(true);
}
}
}
public void actionokButton() throws pmGuiException {
int ret;
// handle authentication if needed
try {
}
} catch (pmUserCancelledException e) {
throw new pmUserCancelledException(
} catch (pmGuiException e) {
throw new pmLoginFailedException(
} catch (Exception e) {
throw new pmLoginFailedException(
}
}
// delete the printer
boolean failed = false;
try {
} catch (Exception e) {
failed = true;
}
if (failed) {
pmMessageDialog m = new pmMessageDialog(
"Printer.delete.operation.failed.") :
err),
"DeletePrinterFailed");
m.setVisible(true);
} else {
// Deletion successful, change the table
// update table
} else {
}
}
}
public void actioncancelButton() {
}
}