java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
cmpt213.assignment4.packagedeliveries.client.view.util.customUI.CustomDialog
All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class CustomDialog extends JDialog implements ActionListener
Custom Dialog that uses RoundButtons. Inherits JDialog. Implements how buttons look like on click.
See Also:
  • Field Details

    • isRemove

      public boolean isRemove
    • dispose

      public boolean dispose
  • Constructor Details

    • CustomDialog

      public CustomDialog(Frame parent, String title, String message, String btnYesText, String btnNoText, boolean isRemove, boolean modal)
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Determines whether the dialog will be closed when a button is selected.
      Specified by:
      actionPerformed in interface ActionListener
      Parameters:
      e - the event to be processed
    • run

      public void run(int panelItemIndex, int pkgIndex)
      Invokes the dialog without needing to use Runnable.
      Parameters:
      panelItemIndex - Index of a PackageItem object in a JPanel ArrayList.
      pkgIndex - Index of a PackageBase object in a PackageBase ArrayList.