public static class DialogUtils.Updater
extends java.lang.Object
reportChanged(org.eclipse.wst.jsdt.chromium.debug.ui.DialogUtils.ValueSource<?>)
method.
Updater supports conditional updating. At some place in graph there may be switcher that introduces several scopes. The switcher has only one active scope at a time, that is controlled by an expression provided. The scope may contain parts of the graph and only the active scope has its vertices updated, update in other scopes is deferred. Vertices from the scope are only available via vertex called merger from outside of this scope. Scopes may be nested. Updater always has a root scope.
Constructor and Description |
---|
Updater() |
Modifier and Type | Method and Description |
---|---|
void |
addConsumer(DialogUtils.Scope scope,
DialogUtils.ValueConsumer consumer)
Registers a consumer within a particular scope.
|
void |
addConsumer(DialogUtils.ValueConsumer value,
DialogUtils.ValueSource<?>... dependencies) |
void |
addConsumer(DialogUtils.ValueConsumer value,
java.util.List<? extends DialogUtils.ValueSource<?>> dependencies)
Registers a consumer vertex with all its dependencies.
|
void |
addDependency(DialogUtils.ValueConsumer consumer,
DialogUtils.ValueSource<?> source)
Adds a dependency of consumer on source.
|
void |
addDependency(DialogUtils.ValueConsumer consumer,
java.util.List<? extends DialogUtils.ValueSource<?>> sourceList)
Adds a dependency of consumer on several sources.
|
void |
addSource(DialogUtils.Scope scope,
DialogUtils.ValueSource<?> source)
Registers a source within a particular scope.
|
void |
reportChanged(DialogUtils.ValueSource<?> source)
Reports about sources that have been changed and plans future update of consumers.
|
DialogUtils.Scope |
rootScope()
Returns a root scope that updater always has.
|
void |
stopAsync()
Stops asynchronous updates -- an activity which is hard to stop directly.
|
void |
update()
Performs update of all vertices that need it.
|
void |
updateAll()
Updates all consumer vertices in graph.
|
void |
updateAsync()
Request deferred update.
|
public void addConsumer(DialogUtils.ValueConsumer value, DialogUtils.ValueSource<?>... dependencies)
public void addConsumer(DialogUtils.ValueConsumer value, java.util.List<? extends DialogUtils.ValueSource<?>> dependencies)
public void addConsumer(DialogUtils.Scope scope, DialogUtils.ValueConsumer consumer)
public void addSource(DialogUtils.Scope scope, DialogUtils.ValueSource<?> source)
public void addDependency(DialogUtils.ValueConsumer consumer, DialogUtils.ValueSource<?> source)
public void addDependency(DialogUtils.ValueConsumer consumer, java.util.List<? extends DialogUtils.ValueSource<?>> sourceList)
#addDependency(ValueConsumer, ValueSource)
.public void reportChanged(DialogUtils.ValueSource<?> source)
public void update()
public void updateAll()
public DialogUtils.Scope rootScope()
public void updateAsync()
public void stopAsync()
Copyright (c) IBM Corp. and others 2000, 2016. All Rights Reserved.