Class IconDialog

All Implemented Interfaces:
ComponentListener, WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants, BeanInterface, ModifiedFlag, WindowInterface
Direct Known Subclasses:
IndicatorTOIconDialog, MultiSensorIconDialog, SignalHeadIconDialog

public class IconDialog extends ItemDialog
This class is used when FamilyItemPanel classes add, modify or delete icon families. Note this class cannot be used with super classes of FamilyItemPanel (ItemPanel etc) since there are several casts to FamilyItemPanel.
See Also:
  • Field Details

  • Constructor Details

    • IconDialog

      public IconDialog(String type, String family, FamilyItemPanel parent)
      Constructor for an existing family to change icons, add/delete icons, or to delete the family entirely.
      Parameters:
      type - itemType
      family - icon family name
      parent - the ItemPanel calling this class
  • Method Details

    • setMap

      protected void setMap(HashMap<String,NamedIcon> iconMap)
    • getIconEditPanel

    • getCatalogPreviewPanel

    • doDoneAction

      protected boolean doDoneAction()
      Action for both create new family and change existing family.
      Returns:
      true if success
    • mapInCatalogOK

      protected boolean mapInCatalogOK(boolean sameMap, boolean nameUsed, String editFamily, String catalogFamily)
      Parameters:
      sameMap - Map edited in dialog is the same as map found in catalog
      nameUsed - Name as edited in dialog is the same as name found in catalog
      editFamily - Map name as edited in this dialog
      catalogFamily - Map name as found in the catalog
      Returns:
      false if not OK
    • mapNotInCatalogOK

      protected boolean mapNotInCatalogOK(boolean sameMap, boolean nameUsed, String editFamily)
      Edited map is not in the catalog.
      Parameters:
      sameMap - Map edited in dialog is the same as map currently held in parent item panel
      nameUsed - Name as edited in dialog is the same as a name found in catalog
      editFamily - Map name as edited in this dialog
      Returns:
      false if not OK
    • renameFamily

      protected void renameFamily()
      Action item to rename an icon family.
    • makeDoneButtonPanel

      protected void makeDoneButtonPanel(JPanel buttonPanel, String text)
    • cancel

      protected void cancel()
    • clone

      protected static HashMap<String,NamedIcon> clone(HashMap<String,NamedIcon> map)