Module org.jpo

Class PicturePopupMenu

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

public class PicturePopupMenu extends JPopupMenu
This class generates a popup menu on a picture node.
See Also:
  • Constructor Details

    • PicturePopupMenu

      public PicturePopupMenu(NodeNavigatorInterface setOfNodes, int idx)
      Creates a popup menu for one node pointing at a picture
      Parameters:
      setOfNodes - The set of nodes from which the popup picture is coming
      idx - The picture of the set for which the popup is being shown.
  • Method Details

    • replaceEscapedSpaces

      public static Optional<String> replaceEscapedSpaces(@NonNull String stringWithEscapedSpaces)
      Method to replace the %20 that some filenames may have instead of a space char
      Parameters:
      stringWithEscapedSpaces - The source string
      Returns:
      an Optional with the replaced string. The Optional isPresent() and can be retrieved with get() if the name was different. If there was nothing to translate the isPresent() method returns false. This allows the caller to easily tell if there is any point in proposing a rename.
    • replace2520

      public static Optional<String> replace2520(@NonNull String s)
      Method to replace the %2520 that some filenames may have instead of a space char
      Parameters:
      s - The source string
      Returns:
      an Optional with the replaced string. The Optional isPresent() and can be retrieved with get() if the name was different. If there was nothing to translate the isPresent() method returns false. This allows the caller to easily tell if there is any point in proposing a rename.
    • replaceUnderscore

      public static Optional<String> replaceUnderscore(@NonNull String stringWithUnderscores)
      Method to replace the underscores that some filenames may have instead of a space char
      Parameters:
      stringWithUnderscores - The source string
      Returns:
      an Optional with the replaced string. The Optional isPresent() and can be retrieved with get() if the name was different. If there was nothing to translate the isPresent() method returns false. This allows the caller to easily tell if there is any point in proposing a rename.