Class UnsavedDataPanel

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, IWindow

public class UnsavedDataPanel extends JPanel implements IWindow, ActionListener
Ask for elements to save before application exit
See Also:
  • Constructor Details

    • UnsavedDataPanel

      public UnsavedDataPanel(IUnsavedData[] unsavedDatalist)
      This is the default constructor
    • UnsavedDataPanel

      public UnsavedDataPanel(String prompt)
  • Method Details

    • getWindowInfo

      public WindowInfo getWindowInfo()
      Description copied from interface: IWindow

      Gets the initial window properties. It must be called just once from the framework. To get the current WindowInfo from this window, use PluginServices.getMDIManager.getWindowInfo(window);

      Specified by:
      getWindowInfo in interface IWindow
      Returns:
      A WindowInfo object, containing the properties that this window should have when created
    • setWindowTitle

      public void setWindowTitle(String windowTitle)
    • setCancelText

      public void setCancelText(String text, String tooltipText)
    • setDiscardText

      public void setDiscardText(String text, String tooltipText)
    • setAcceptText

      public void setAcceptText(String text, String tooltipText)
    • setHeaderText

      public void setHeaderText(String text)
    • addActionListener

      public void addActionListener(UnsavedDataPanel.UnsavedDataPanelListener listener)
      Register a listener to call
      Parameters:
      a - UnsavedDataPanelListener instance
    • removeActionListener

      public void removeActionListener(UnsavedDataPanel.UnsavedDataPanelListener listener)
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • close

      public void close()
    • deselectAll

      public void deselectAll()
    • selectAll

      public void selectAll()
    • setUnsavedDataArray

      public void setUnsavedDataArray(IUnsavedData[] unsavedDatalist)
      Set the resorces to ask for
      Parameters:
      IUnsavedData - [] resources pending to save
    • setUnsavedData

      public void setUnsavedData(List<IUnsavedData> unsavedDatalist)
      Set the resorces to ask for
      Parameters:
      IUnsavedData - [] resources pending to save
    • getSelectedsUnsavedDataList

      public List<IUnsavedData> getSelectedsUnsavedDataList()
    • getSelectedsUnsavedData

      public IUnsavedData[] getSelectedsUnsavedData()
      Returns the IUnsavedData selecteds for the user to save
      Returns:
      IUnsaveData[] to save
    • getUnselectedsUnsavedData

      public IUnsavedData[] getUnselectedsUnsavedData()
      Returns the IUnsavedData not selecteds for the user
      Returns:
      IUnsavedData[] to ignore
    • getWindowProfile

      public Object getWindowProfile()
      Description copied from interface: IWindow

      Gets the profile for this window

      Specified by:
      getWindowProfile in interface IWindow
      Returns:
      An object with the profile.