Class PopOverWrapper<T>


  • public final class PopOverWrapper<T>
    extends java.lang.Object
    Wrapper around a popover, that remembers whether it's already shown or not.
    Author:
    Clément Fournier
    • Constructor Summary

      Constructors 
      Constructor Description
      PopOverWrapper​(java.util.function.BiFunction<T,​@Nullable org.controlsfx.control.PopOver,​@Nullable org.controlsfx.control.PopOver> rebinder)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void doFirstLoad​(javafx.stage.Stage stage)
      This is a weird hack to preload the FXML and CSS, so that the first opening of the popover doesn't look completely broken (twitching and obviously being restyled).
      boolean equals​(java.lang.Object o)  
      T getIdentity()  
      java.util.Optional<java.lang.Object> getUserData()  
      int hashCode()  
      void hide()  
      void rebind​(T identity)  
      void showOrFocus​(java.util.function.Consumer<@NonNull org.controlsfx.control.PopOver> showMethod)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PopOverWrapper

        public PopOverWrapper​(java.util.function.BiFunction<T,​@Nullable org.controlsfx.control.PopOver,​@Nullable org.controlsfx.control.PopOver> rebinder)
    • Method Detail

      • showOrFocus

        public void showOrFocus​(java.util.function.Consumer<@NonNull org.controlsfx.control.PopOver> showMethod)
      • rebind

        public void rebind​(T identity)
      • doFirstLoad

        public void doFirstLoad​(javafx.stage.Stage stage)
        This is a weird hack to preload the FXML and CSS, so that the first opening of the popover doesn't look completely broken (twitching and obviously being restyled).

        We show the popover briefly with opacity 0, just the time for its content graph to load. When hidden the opacity is reset to 1.

      • getIdentity

        public T getIdentity()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • getUserData

        public java.util.Optional<java.lang.Object> getUserData()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • hide

        public void hide()