Interface ColorPaletteModel

All Known Implementing Classes:
DefaultColorPaletteModel

public interface ColorPaletteModel
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds listener as a listener to changes in the model.
    void
    bulkLoad(List<Color> colors, int columns)
    Replaces all colors in the model, and my alter the structure (column/row count).
    getColor(int row, int column)
    Returns the color at this location
    int
    How many columns of colors in the palette
    int
    How many rows of colors in the palette?
    void
    Removes listener as a listener to changes in the model.
    void
    setColor(int row, int column, Color color)
    Change the color at a location
  • Method Details

    • getColumnCount

      int getColumnCount()
      How many columns of colors in the palette
    • getRowCount

      int getRowCount()
      How many rows of colors in the palette?
    • getColor

      Color getColor(int row, int column)
      Returns the color at this location
    • setColor

      void setColor(int row, int column, Color color)
      Change the color at a location
    • bulkLoad

      void bulkLoad(List<Color> colors, int columns)
      Replaces all colors in the model, and my alter the structure (column/row count). The size of the color list must be divisible by the new column count.
    • addChangeListener

      void addChangeListener(ChangeListener listener)
      Adds listener as a listener to changes in the model.
      Parameters:
      listener - the ChangeListener to be added
    • removeChangeListener

      void removeChangeListener(ChangeListener listener)
      Removes listener as a listener to changes in the model.
      Parameters:
      listener - the ChangeListener to be removed