Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.commands
Class ToggleState

java.lang.Object
  extended by 

org.eclipse.core.commands.common.EventManager
      extended by 

org.eclipse.core.commands.State
          extended by 

org.eclipse.jface.commands.PersistentState
              extended by 
org.eclipse.jface.commands.ToggleState
Direct Known Subclasses:
RadioState, RegistryToggleState

public class ToggleState
extends PersistentState

A piece of state storing a Boolean .

If this state is registered using IMenuStateIds.STYLE, then it will control the presentation of the command if displayed in the menus, tool bars or status line.

Clients may instantiate this class, but must not extend.

Since:
3.2

Constructor Summary
ToggleState ()
          Constructs a new ToggleState.
 
Method Summary
 void load ( IPreferenceStore store, String preferenceKey)
          Loads this state from the preference store, given the location at which to look.
 void save ( IPreferenceStore store, String preferenceKey)
          Saves this state to the preference store, given the location at which to write.
 void setValue ( Object value)
          Sets the value for this state object.
 
Methods inherited from class org.eclipse.jface.commands. PersistentState
setShouldPersist, shouldPersist
 
Methods inherited from class org.eclipse.core.commands. State
addListener, dispose, fireStateChanged, getId, getValue, removeListener, setId
 
Methods inherited from class org.eclipse.core.commands.common. EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToggleState

public ToggleState()
Constructs a new ToggleState. By default, the toggle is off (e.g., false).

Method Detail

load

public final void load(
IPreferenceStore store,
                       
String preferenceKey)
Description copied from class: PersistentState
Loads this state from the preference store, given the location at which to look. This method must be symmetric with a call to PersistentState.save(IPreferenceStore, String).

Specified by:
load in class PersistentState
Parameters:
store - The store from which to read; must not be null.
preferenceKey - The key at which the state is stored; must not be null.

save

public final void save(
IPreferenceStore store,
                       
String preferenceKey)
Description copied from class: PersistentState
Saves this state to the preference store, given the location at which to write. This method must be symmetric with a call to PersistentState.load(IPreferenceStore, String).

Specified by:
save in class PersistentState
Parameters:
store - The store to which the state should be written; must not be null.
preferenceKey - The key at which the state should be stored; must not be null.

setValue

public void setValue(
Object value)
Description copied from class: State
Sets the value for this state object.

Overrides:
setValue in class State
Parameters:
value - The value to set; may be anything.

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire