public abstract class LXSnapshot.View extends Object implements LXSerializable
LXSerializable.Utils
Modifier and Type | Field and Description |
---|---|
BooleanParameter |
enabled
Whether this view is enabled for recall or not.
|
LXSnapshot.ViewScope |
scope |
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
protected void |
finishTransition()
Subclasses may override, indicates the completion of a transition
|
abstract LXCommand |
getCommand()
Gets a command version of this view's operation, needed to make
this action undoable.
|
LXSnapshot |
getSnapshot()
Returns the snapshot that this view belongs to
|
protected void |
interpolate(double amount)
Subclasses may override, indicates the progress of a transition
|
protected abstract boolean |
isDependentOf(LXComponent component)
Subclasses must implement, determines whether the given view is dependent upon
the specified component, and whether this view should be removed if the
component is disposed
|
void |
load(LX lx,
JsonObject obj)
Restores this instance from a JSON object
|
protected abstract void |
recall()
Subclasses must implement, should reapply the state of the view immediately
|
void |
save(LX lx,
JsonObject obj)
Serializes this instance into the JSON object
|
protected void |
startTransition()
Subclasses may override, indicates the beginning of a transition
|
public final LXSnapshot.ViewScope scope
public final BooleanParameter enabled
public LXSnapshot getSnapshot()
public abstract LXCommand getCommand()
protected abstract boolean isDependentOf(LXComponent component)
component
- Component to testtrue
if this view depends upon that component's existence, false
otherwiseprotected abstract void recall()
protected void startTransition()
protected void interpolate(double amount)
amount
- Amount of interpolation to applyprotected void finishTransition()
public void save(LX lx, JsonObject obj)
LXSerializable
save
in interface LXSerializable
lx
- LX instanceobj
- Object to serialize intopublic void load(LX lx, JsonObject obj)
LXSerializable
load
in interface LXSerializable
lx
- LX instanceobj
- Object to deserializepublic void dispose()
LX library by Mark C. Slee. © 2012-2020