forked from Coded/SIPRP
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
976 B
40 lines
976 B
package leaf.ui;
|
|
|
|
import static com.evolute.utils.strings.UnicodeLatin1Map.atilde;
|
|
import static com.evolute.utils.strings.UnicodeLatin1Map.ccedil;
|
|
|
|
import javax.swing.JOptionPane;
|
|
|
|
import com.evolute.utils.error.ErrorLogger;
|
|
import com.evolute.utils.ui.DialogException;
|
|
|
|
public class LeafDialog
|
|
{
|
|
|
|
public static void error( Exception e )
|
|
{
|
|
if( e != null )
|
|
{
|
|
ErrorLogger.logException( e );
|
|
e.printStackTrace( System.out );
|
|
DialogException.showException( e );
|
|
}
|
|
}
|
|
|
|
public static boolean confirmDelete( boolean masculino, boolean plural, String nome )
|
|
{
|
|
return JOptionPane.OK_OPTION == JOptionPane.showConfirmDialog(
|
|
null,
|
|
"Tem a certeza que deseja remover " +
|
|
( masculino ? "o" : "a" ) +
|
|
( plural ? "s" : "" ) +
|
|
" " + nome + " seleccionad" +
|
|
( masculino ? "o" : "a" ) +
|
|
( plural ? "s" : "" ) +
|
|
"?",
|
|
"Confirmar remo" + ccedil + atilde + "o",
|
|
JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null );
|
|
}
|
|
|
|
}
|