Class ScaleDialog

    • Field Detail

      • cancel

        private Button cancel
      • maintainAspectRatio

        private Checkbox maintainAspectRatio
      • pressedOk

        private boolean pressedOk
      • oldWidthString

        private String oldWidthString
      • oldHeightString

        private String oldHeightString
      • oldWidth

        private int oldWidth
      • oldHeight

        private int oldHeight
      • type

        private int type
    • Constructor Detail

      • ScaleDialog

        public ScaleDialog​(Frame owner,
                           Strings strings,
                           int width,
                           int height,
                           boolean pickType,
                           String[] typeNames,
                           int initialType)
        Creates an InfoDialog, a modal dialog to display a text message, centered on the desktop.
        Parameters:
        owner - the Frame this dialog will belong to
        strings - the Strings resource used for text messages
        width - the current width of the image
        height - the current height of the image
        pickType - determines whether the will be a Choice box for picking the type of scaling algorithm
        typeNames - names of the image scaling algorithms
        initialType - algorithm type to be initially selected
    • 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
      • center

        public void center()
        Centers the dialog on screen.
      • getHeightValue

        public int getHeightValue()
      • getFilterType

        public int getFilterType()
      • getWidthValue

        public int getWidthValue()
      • hasPressedOk

        public boolean hasPressedOk()
      • handleKeys

        public void handleKeys​(KeyEvent e)