Interface ColorPaletteModel

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addChangeListener​(javax.swing.event.ChangeListener listener)
      Adds listener as a listener to changes in the model.
      void bulkLoad​(java.util.List<java.awt.Color> colors, int columns)
      Replaces all colors in the model, and my alter the structure (column/row count).
      java.awt.Color getColor​(int row, int column)
      Returns the color at this location
      int getColumnCount()
      How many columns of colors in the palette
      int getRowCount()
      How many rows of colors in the palette?
      void removeChangeListener​(javax.swing.event.ChangeListener listener)
      Removes listener as a listener to changes in the model.
      void setColor​(int row, int column, java.awt.Color color)
      Change the color at a location
    • Method Detail

      • getColumnCount

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

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

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

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

        void bulkLoad​(java.util.List<java.awt.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​(javax.swing.event.ChangeListener listener)
        Adds listener as a listener to changes in the model.
        Parameters:
        listener - the ChangeListener to be added
      • removeChangeListener

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