Class TerraDialogSkin

    • Constructor Detail

      • TerraDialogSkin

        public TerraDialogSkin()
    • 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 TerraFrameSkin
        Parameters:
        component - The component to which the skin is being attached.
      • mouseDown

        public boolean mouseDown​(Container container,
                                 Mouse.Button button,
                                 int x,
                                 int y)
        Description copied from interface: ContainerMouseListener
        Called when the mouse is pressed over a container.
        Specified by:
        mouseDown in interface ContainerMouseListener
        Overrides:
        mouseDown in class WindowSkin
        Parameters:
        container - The container under the mouse.
        button - Which button was pressed.
        x - The X-position of the mouse.
        y - The Y-position of the mouse.
        Returns:
        true to consume the event; false to allow it to propagate.
      • keyPressed

        public boolean keyPressed​(Component component,
                                  int keyCode,
                                  Keyboard.KeyLocation keyLocation)
        ENTER Close the dialog with a 'result' of true.
        ESCAPE Close the dialog with a 'result' of false.
        Specified by:
        keyPressed in interface ComponentKeyListener
        Overrides:
        keyPressed in class TerraFrameSkin
        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.
      • modalChanged

        public void modalChanged​(Dialog dialog)
        Description copied from interface: DialogListener
        Called when a dialog's modal flag has changed.
        Specified by:
        modalChanged in interface DialogListener
        Parameters:
        dialog - The dialog that has changed.
      • previewDialogClose

        public Vote previewDialogClose​(Dialog dialog,
                                       boolean result)
        Description copied from interface: DialogStateListener
        Called to preview a dialog close event.
        Specified by:
        previewDialogClose in interface DialogStateListener
        Parameters:
        dialog - The dialog that is requesting to close.
        result - The result flag (true means "OK", while false roughly means "Cancel").
        Returns:
        The consensus vote as to whether or not to allow the close to occur.
      • dialogCloseVetoed

        public void dialogCloseVetoed​(Dialog dialog,
                                      Vote reason)
        Description copied from interface: DialogStateListener
        Called when a dialog close event has been vetoed.
        Specified by:
        dialogCloseVetoed in interface DialogStateListener
        Parameters:
        dialog - The dialog that is not going to close because of this veto.
        reason - The vote result that indicates the veto.