Class ViwableDialog


  • public class ViwableDialog
    extends java.lang.Object
    This class encapsulate viwable part of SecurityDialog, so it do not need to extend it. It is accepting commons setters for jdialog, but actually applying them right before it is created. Obviously it do not have getters, but jdialog itself should not be keeper of any information. SecurityPanel is.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private javax.swing.JDialog jd  
      private java.util.List<java.awt.event.ActionListener> listeners  
      (package private) java.util.List<java.lang.Runnable> operations  
    • Constructor Summary

      Constructors 
      Constructor Description
      ViwableDialog()  
    • Field Detail

      • jd

        private javax.swing.JDialog jd
      • operations

        java.util.List<java.lang.Runnable> operations
      • listeners

        private final java.util.List<java.awt.event.ActionListener> listeners
    • Constructor Detail

      • ViwableDialog

        public ViwableDialog()
    • Method Detail

      • createJDialog

        private javax.swing.JDialog createJDialog()
      • setMinimumSize

        public void setMinimumSize​(java.awt.Dimension minimumSize)
      • pack

        public void pack()
      • setLocationRelativeTo

        public void setLocationRelativeTo​(java.awt.Component c)
      • show

        public void show()
      • dispose

        public void dispose()
        Called when the SecurityDialog is hidden - either because the user made a choice (Ok, Cancel, etc) or closed the window
      • notifySelectionMade

        private void notifySelectionMade()
        Notify all the listeners that the user has made a decision using this security dialog.
      • addActionListener

        public void addActionListener​(java.awt.event.ActionListener listener)
        Adds an ActionListener which will be notified if the user makes a choice using this SecurityDialog. The listener should use getValue() to actually get the user's response.
        Parameters:
        listener - another action listener to be listen to
      • setModalityType

        public void setModalityType​(java.awt.Dialog.ModalityType modalityType)
      • setTitle

        public void setTitle​(java.lang.String title)
      • setDefaultCloseOperation

        public void setDefaultCloseOperation​(int op)
      • centerDialog

        private static void centerDialog​(javax.swing.JDialog dialog)
      • centerDialog

        public void centerDialog()
      • setResizable

        public void setResizable​(boolean b)
      • addWindowListener

        public void addWindowListener​(java.awt.event.WindowAdapter adapter)
      • addWindowFocusListener

        public void addWindowFocusListener​(java.awt.event.WindowAdapter adapter)