Class MapToArbitraryPaletteDialog

    • Field Detail

      • PALETTE_PALM_256_COLORS

        public static final int PALETTE_PALM_256_COLORS
        See Also:
        Constant Field Values
      • PALETTE_STRING_CONSTANTS

        private static final int[] PALETTE_STRING_CONSTANTS
      • DITHERING_STRING_CONSTANTS

        private static final int[] DITHERING_STRING_CONSTANTS
      • ERROR_DIFFUSION_TYPES

        private static final int[] ERROR_DIFFUSION_TYPES
      • cancel

        private Button cancel
      • checkboxes

        private Checkbox[] checkboxes
      • dithering

        private Choice dithering
      • pressedOk

        private boolean pressedOk
    • Constructor Detail

      • MapToArbitraryPaletteDialog

        public MapToArbitraryPaletteDialog​(Frame owner,
                                           Strings strings)
        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
      • getErrorDiffusionType

        public int getErrorDiffusionType()
        If the use of error diffusion was selected, this method returns on of the ErrorDiffusionDithering TYPE constants
      • getPaletteType

        public int getPaletteType()
        Return the palette type (one of the PALETTE_xyz constants of this class) that is currently selected in the dialog.
      • hasPressedOk

        public boolean hasPressedOk()
        Returns true if the OK button was pressed, false if it was the Cancel button.
      • useErrorDiffusion

        public boolean useErrorDiffusion()
        Returns whether the use of one of the error diffusion algorithms is selected in the dialog.