Java JDialog setDirty(JDialog dialog, boolean isDirty)

Here you can find the source of setDirty(JDialog dialog, boolean isDirty)

Description

set Dirty

License

Open Source License

Declaration

public static void setDirty(JDialog dialog, boolean isDirty) 

Method Source Code

//package com.java2s;
// modify it under the terms of the GNU Lesser General Public License

import javax.swing.JComponent;
import javax.swing.JDialog;
import javax.swing.JFrame;

public class Main {
    public static void setDirty(JFrame frame, boolean isDirty) {
        setDirty(frame.getRootPane(), isDirty);
    }/*from   w w  w.j a  va 2s.c o  m*/

    public static void setDirty(JDialog dialog, boolean isDirty) {
        setDirty(dialog.getRootPane(), isDirty);
    }

    private static void setDirty(JComponent comp, boolean isDirty) {
        if (comp != null)
            comp.putClientProperty("windowModified", Boolean.valueOf(isDirty));
    }
}

Related

  1. resizeDialogToScreen(JDialog dialog)
  2. rptaConfirmDialog(JDialog pJDialog, String pMensaje)
  3. runProgressBar(final Runnable runnable, final JDialog dialog)
  4. setActionsMenu(JDialog dialog, MenuElement menu)
  5. setCursorFree(JDialog dialog)
  6. setHelpDialogLoc(JButton odsHelpButton, JDialog helpDialog)
  7. setSize(JDialog dialog, int width, int height)
  8. setWinVisible(final JDialog win, final boolean vis)
  9. sizeDialog(JDialog dialog, int prefWidth, int prefHeight)