Class WindowSizeDialog

    • Constructor Detail

      • WindowSizeDialog

        public WindowSizeDialog​(Frame owner,
                                Strings strings,
                                int titleIndex,
                                int initialWidth,
                                int initialHeight)
        Parameters:
        owner - the Frame this dialog will belong to
    • Method Detail

      • actionPerformed

        public void actionPerformed​(ActionEvent e)
        Hides (closes) this dialog if the OK button was source of the action event (e.g. if the button was pressed).
        Specified by:
        actionPerformed in interface ActionListener
      • getHeightValue

        public int getHeightValue()
      • getWidthValue

        public int getWidthValue()
      • getValue

        private int getValue​(TextComponent textField)
        Attempts to convert the content of the argument text component to an int; if successful, returns that int, otherwise -1000 is returned.
        Parameters:
        textField - the text component that is supposed to hold an int value
        Returns:
        int representation of the text component's data
      • hasPressedOk

        public boolean hasPressedOk()
      • updateOkButton

        private void updateOkButton()