Class DialogsPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, Destroyable

public class DialogsPanel extends JPanel implements Destroyable
This is the panel displayed on the right side of JOSM. It displays a list of panels.
See Also:
  • Field Details

  • Constructor Details

    • DialogsPanel

      public DialogsPanel(JSplitPane parent)
      Creates a new DialogsPanel.
      Parameters:
      parent - The parent split pane that allows this panel to change it's size.
  • Method Details

    • initialize

      public void initialize(List<ToggleDialog> pAllDialogs)
      Initializes this panel
      Parameters:
      pAllDialogs - The list of dialogs this panel should contain on start.
    • add

      public void add(ToggleDialog dlg)
      Add a new ToggleDialog to the list of known dialogs and trigger reconstruct.
      Parameters:
      dlg - The dialog to add
    • add

      public void add(ToggleDialog dlg, boolean doReconstruct)
      Add a new ToggleDialog to the list of known dialogs.
      Parameters:
      dlg - The dialog to add
      doReconstruct - true if reconstruction should be triggered.
    • remove

      public void remove(ToggleDialog toggleDialog)
      Remove a ToggleDialog from the list of known dialogs and trigger reconstruct.
      Parameters:
      toggleDialog - The dialog to remove
      Since:
      18686
    • remove

      public void remove(ToggleDialog toggleDialog, boolean doReconstruct)
      Remove a ToggleDialog from the list of known dialogs.
      Parameters:
      toggleDialog - The dialog to remove
      doReconstruct - true if reconstruction should be triggered.
      Since:
      18686
    • reconstruct

      public void reconstruct(DialogsPanel.Action action, ToggleDialog triggeredBy)
      Reconstruct the view, if the configurations of dialogs has changed.
      Parameters:
      action - what happened, so the reconstruction is necessary
      triggeredBy - the dialog that caused the reconstruction
    • destroy

      public void destroy()
      Description copied from interface: Destroyable
      Called when the object has been destroyed.
      Specified by:
      destroy in interface Destroyable
    • getToggleDialog

      public <T extends ToggleDialog> T getToggleDialog(Class<T> type)
      Replies the instance of a toggle dialog of type type managed by this map frame
      Type Parameters:
      T - toggle dialog type
      Parameters:
      type - the class of the toggle dialog, i.e. UserListDialog.class
      Returns:
      the instance of a toggle dialog of type type managed by this map frame; null, if no such dialog exists