Class TerraMenuPopupSkin

    • Constructor Detail

      • TerraMenuPopupSkin

        public TerraMenuPopupSkin()
    • Method Detail

      • install

        public void install​(Component component)
        Description copied from class: ComponentSkin
        Must be implemented in every subclass in order to do component-specific operations at instantiation time, but every subclass must call this superclass method to setup the necessary listeners, etc.
        Specified by:
        install in interface Skin
        Overrides:
        install in class WindowSkin
        Parameters:
        component - The component to which the skin is being attached.
      • getBorderColor

        public java.awt.Color getBorderColor()
      • setBorderColor

        public void setBorderColor​(java.awt.Color borderColor)
      • setBorderColor

        public void setBorderColor​(java.lang.String borderColor)
      • getCloseTransitionDuration

        public int getCloseTransitionDuration()
      • setCloseTransitionDuration

        public void setCloseTransitionDuration​(int closeTransitionDuration)
      • getCloseTransitionRate

        public int getCloseTransitionRate()
      • setCloseTransitionRate

        public void setCloseTransitionRate​(int closeTransitionRate)
      • keyPressed

        public boolean keyPressed​(Component component,
                                  int keyCode,
                                  Keyboard.KeyLocation keyLocation)
        ESCAPE Close the menu popup.
        Specified by:
        keyPressed in interface ComponentKeyListener
        Overrides:
        keyPressed in class ComponentSkin
        Parameters:
        component - Component that has the focus.
        keyCode - The key code for the key that was pressed.
        keyLocation - Location value for the key (left or right for shift keys, etc.).
        Returns:
        true to consume the event; false to allow it to propagate.
      • menuChanged

        public void menuChanged​(MenuPopup menuPopup,
                                Menu previousMenu)
        Description copied from interface: MenuPopupListener
        Called when a menu popup's menu has changed.
        Specified by:
        menuChanged in interface MenuPopupListener
        Parameters:
        menuPopup - The menu popup source of this event.
        previousMenu - What the menu used to be for this popup.
      • previewMenuPopupClose

        public Vote previewMenuPopupClose​(MenuPopup menuPopup,
                                          boolean immediate)
        Description copied from interface: MenuPopupStateListener
        Called to preview a menu popup close event.
        Specified by:
        previewMenuPopupClose in interface MenuPopupStateListener
        Parameters:
        menuPopup - The source of the event.
        immediate - Whether the close is meant to be immediate.
        Returns:
        The verdict as to whether to close from this listener.