Class OctreeDialog

    • Field Detail

      • DITHERING_STRINGS

        public final int[] DITHERING_STRINGS
      • DITHERING_TYPES

        public final int[] DITHERING_TYPES
      • cancel

        private Button cancel
      • numColorsField

        private TextField numColorsField
      • outputColorType

        private Choice outputColorType
      • dithering

        private Choice dithering
      • pressedOk

        private boolean pressedOk
    • Constructor Detail

      • OctreeDialog

        public OctreeDialog​(Frame owner,
                            Strings strings,
                            int numColors,
                            boolean paletted)
        Creates a modal dialog to enter the parameter.
        Parameters:
        owner - the parent of this modal dialog
        strings - an object to get String constants in the current language
        numColors - the number of colors in the resulting image
        paletted - if true, the output image will be paletted, otherwise truecolor
    • 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.
      • getErrorDiffusion

        public int getErrorDiffusion()
      • getIntValue

        private int getIntValue​(TextField textField)
      • getNumColors

        public int getNumColors()
      • hasPressedOk

        public boolean hasPressedOk()
      • isOutputTypePaletted

        public boolean isOutputTypePaletted()
      • updateOkButton

        private void updateOkButton()
      • useErrorDiffusion

        public boolean useErrorDiffusion()
      • useNoDithering

        public boolean useNoDithering()