Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.contribution.visualiser.core
Class PaletteManager

    java.lang.Object
      org.eclipse.contribution.visualiser.core.PaletteManager

public class PaletteManager
extends java.lang.Object

The palette manager parses the contents of the defined extensions to the extension-point org.eclipse.contribution.visualiser.palettes.

Field Summary
`static java.lang.String` | `PALETTE_EXTENSION`

Constructor Summary
`PaletteManager()`

Method Summary
`static java.util.List` | `getAllPaletteDefinitions()` Get a list of all the registered palettes
`static PaletteDefinition` | `getCurrentPalette()` Get the current palette, either as set by the preferences, or if not set the default palette specified by the current provider, or if that is not set, use the default palette implementation
`static PaletteDefinition` | `getDefaultForProvider(ProviderDefinition def)`
`static PaletteDefinition` | `getDefaultPalette()` Get the defined default palette
`static PaletteDefinition` | `getPaletteByID(java.lang.String id)` Return the palette definition with the given id, or null if not found
`static PaletteDefinition` | `getPaletteByName(java.lang.String name)` Return the palette definition with the given name, or null if not found
`static void` | `resetCurrent()` Reset the current choice of palette, so that next time it is requested, the usual process is used to determine the chosen palette.
`static void` | `setCurrentPaletteByName(java.lang.String name)` Search for a registered palette with the given name and if found, sets that palette to be the current one

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PALETTE_EXTENSION

    public static final java.lang.String PALETTE_EXTENSION

See Also:
  Constant Field Values

Constructor Detail

### PaletteManager

    public PaletteManager()

Method Detail

### getAllPaletteDefinitions

    public static java.util.List getAllPaletteDefinitions()

  Get a list of all the registered palettes

  Returns:
    a list of PaletteDefinition objects

### getCurrentPalette

    public static PaletteDefinition getCurrentPalette()

  Get the current palette, either as set by the preferences, or if not set the default palette specified by the current provider, or if that is not set, use the default palette implementation

  Returns:
    the current palette

### getPaletteByName

    public static PaletteDefinition getPaletteByName(java.lang.String name)

  Return the palette definition with the given name, or null if not found

  Parameters:
    `name` -
  Returns:
    the PaletteDefinition found, or null

### getPaletteByID

    public static PaletteDefinition getPaletteByID(java.lang.String id)

  Return the palette definition with the given id, or null if not found

  Parameters:
    `id` -
  Returns:
    the PaletteDefinition with the given id, or null

### resetCurrent

    public static void resetCurrent()

  Reset the current choice of palette, so that next time it is requested, the usual process is used to determine the chosen palette. This should be called whenever the provider is changed, in case the palette needs to change accordingly.

### setCurrentPaletteByName

    public static void setCurrentPaletteByName(java.lang.String name)

  Search for a registered palette with the given name and if found, sets that palette to be the current one

  Parameters:
    `name` - the name of the palette

### getDefaultPalette

    public static PaletteDefinition getDefaultPalette()

  Get the defined default palette

  Returns:
    the default PaletteDefinition

### getDefaultForProvider

    public static PaletteDefinition getDefaultForProvider(ProviderDefinition def)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD