|
Eclipse Platform Release 3.2 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.commands.common.EventManager
org.eclipse.core.commands.State
org.eclipse.jface.commands.PersistentState
org.eclipse.jface.commands.ToggleState
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.
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 |
public ToggleState()
ToggleState
. By default, the toggle is
off (e.g., false
).
Method Detail |
public final void load(IPreferenceStore store, String preferenceKey)
PersistentState
PersistentState.save(IPreferenceStore, String)
.
load
in class PersistentState
store
- The store from which to read; must not be null
.preferenceKey
- The key at which the state is stored; must not be
null
.public final void save(IPreferenceStore store, String preferenceKey)
PersistentState
PersistentState.load(IPreferenceStore, String)
.
save
in class PersistentState
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
.public void setValue(Object value)
State
setValue
in class State
value
- The value to set; may be anything.
|
Eclipse Platform Release 3.2 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.