if(jccexit==null || jccexit.equals(JCC_EXIT_ASK)) msg = new RememberOptionMessage("You requested to close the JCC GUI.\n " + "Do you also want to shutdown the local platform?\n"); choice = JOptionPane.showConfirmDialog(window, msg, "Exit Question", if(msg!=null && msg.isRemember()) jccexit = JCC_EXIT_SHUTDOWN; if(msg != null && msg.isRemember()) jccexit = JCC_EXIT_KEEP;
/** * Create a new option message. */ public RememberOptionMessage(String msg, boolean remember) { super(new BorderLayout()); JLabel l = new JLabel("<html>"+msg+"</html>"); //System.out.println(l.getPreferredSize()); Dimension d = l.getPreferredSize(); int w = d.width; int h = d.height; l.setPreferredSize(new Dimension(250, (int)(h*w/250*1.6))); l.setMinimumSize(new Dimension(250, (int)(h*w/250*1.6))); //System.out.println(w+" "+h+" "+l.getPreferredSize()); add(l, BorderLayout.NORTH); //add(new JMultilineLabel(msg, 40), BorderLayout.NORTH); this.remember = new JCheckBox("Remember this decision", remember); add(this.remember, BorderLayout.CENTER); }
if(jccexit==null || jccexit.equals(JCC_EXIT_ASK)) msg = new RememberOptionMessage("You requested to close the JCC GUI.\n " + "Do you also want to shutdown the local platform?\n"); choice = JOptionPane.showConfirmDialog(window, msg, "Exit Question", if(msg!=null && msg.isRemember()) jccexit = JCC_EXIT_SHUTDOWN; if(msg != null && msg.isRemember()) jccexit = JCC_EXIT_KEEP;
if(autodelete==null) msg = new RememberOptionMessage("You deleted a resource from the model tree.\n " + "Do you also want to remove the resource from the classpath?\n"); choice = JOptionPane.showConfirmDialog(SGUI.getWindowParent(ModelTreePanel.this), msg, "Classpath Question", if(msg!=null && msg.isRemember()) autodelete = true; SRemoteGui.removeURL(exta, path); if(msg!=null && msg.isRemember()) autodelete = false;