Enhanced PaletteView to save/restore instance state.