Interface PaletteSelectorIF

  • All Superinterfaces:
    com.google.gwt.user.client.ui.IsWidget
    All Known Implementing Classes:
    PaletteSelector

    public interface PaletteSelectorIF
    extends com.google.gwt.user.client.ui.IsWidget
    Interface defining a palette selector widget
    Author:
    Guy Griffiths
    • Method Detail

      • setId

        void setId​(String id)
        Sets the layer ID which this palette selector is currently active on
        Parameters:
        id - The ID
      • populatePalettes

        void populatePalettes​(List<String> availablePalettes)
        Populates the list of available palette names
      • getSelectedPalette

        String getSelectedPalette()
        Returns:
        The name of the currently selected palette
      • selectPalette

        void selectPalette​(String paletteString)
        Select the named palette, if available
        Parameters:
        paletteString - The name of the palette to select
      • getAboveMaxString

        String getAboveMaxString()
        Returns:
        The string representation of the colour to display when values are above the maximum
      • setExtraAboveMaxColour

        void setExtraAboveMaxColour​(String aboveMaxColour)
        Sets a colour to use in addition to black/extend/transparent for values above the maximum scale value
        Parameters:
        aboveMaxColour - The colour to display for values above the maximum scale range
      • getBelowMinString

        String getBelowMinString()
        Returns:
        The string representation of the colour to display when values are below the minimum
      • setExtraBelowMinColour

        void setExtraBelowMinColour​(String belowMinColour)
        Sets a colour to use in addition to black/extend/transparent for values below the minimum scale value
        Parameters:
        belowMinColour - The colour to display for values below the minimum scale range
      • populateStyles

        void populateStyles​(List<String> availableStyles)
        Parameters:
        availableStyles - The list of available style names
      • setNoPaletteStyles

        void setNoPaletteStyles​(List<String> noPaletteStyles)
        Sets the list of styles which do not use a palette (e.g. contours, arrows)
        Parameters:
        noPaletteStyles - The list of styles which do not use a palette
      • getSelectedStyle

        String getSelectedStyle()
        Returns:
        The name of the currently selected style
      • selectStyle

        void selectStyle​(String styleString)
        Select the named style, if available
        Parameters:
        styleString - The name of the style to select
      • setScaleRange

        boolean setScaleRange​(String scaleRange,
                              Boolean logScale)
        Sets the scale range
        Parameters:
        scaleRange - The desired scale range, of the form [min],[max]
        logScale - Whether we want this to be a log scale or not
        Returns:
        true if the operation was successful (may not be if the palette is locked, or we want a negative value in a logarithmic range)
      • getScaleRange

        String getScaleRange()
        Returns:
        A String of the form "[min],[max]" which represents the current scale range
      • getDisplayScaleRange

        String getDisplayScaleRange()
        Returns:
        A String of the form "[min],[max]" which represents the current scale range displayed. If there is no unit converter set, this will be equivalent to getScaleRange().
      • getNumColorBands

        int getNumColorBands()
        Returns:
        The number of colour bands in the currently selected palette
      • setNumColorBands

        void setNumColorBands​(int nBands)
        Sets the number of colour bands in the current palette
      • isLogScale

        boolean isLogScale()
        Returns:
        Whether or not this is a logarithmic scale
      • isLocked

        boolean isLocked()
        Returns:
        Whether or not the palette is locked
      • setEnabled

        void setEnabled​(boolean enabled)
        Enables/disables the palette selector
      • isEnabled

        boolean isEnabled()
        Returns:
        Whether or not the current palette selector is enabled
      • getOpacity

        float getOpacity()
        Returns:
        The opacity of the current palette as a float ranging from 0-1
      • setOpacity

        void setOpacity​(float opacity)
        Sets the opacity of the current palette
        Parameters:
        opacity - The opacity, as a float ranging from 0-1
      • setNoDataColour

        void setNoDataColour​(String noDataColour)
        Parameters:
        noDataColour - The colour to display for missing data
      • getNoDataColour

        String getNoDataColour()
        Returns:
        The colour to display for missing data
      • setUnitConverter

        void setUnitConverter​(UnitConverter converter)
        Setting this allows the PaletteSelectorIF to work in different units to those used by the server. For example a client may always want to treat temperatures as degrees Celcius regardless of what the WMS server says.
        Parameters:
        converter - The UnitConverter to use for converting display units to the underlying units used on the WMS server. Set to null to use the WMS native units
      • setCategorical

        void setCategorical​(boolean categorical)
        Parameters:
        categorical - Whether or not this palette should retrieve a categorical legend in place of the usual scaling tools