diff options
Diffstat (limited to 'src/net/java/joglutils/msg/misc')
-rw-r--r-- | src/net/java/joglutils/msg/misc/State.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/net/java/joglutils/msg/misc/State.java b/src/net/java/joglutils/msg/misc/State.java index c718f71..b0279b7 100644 --- a/src/net/java/joglutils/msg/misc/State.java +++ b/src/net/java/joglutils/msg/misc/State.java @@ -87,6 +87,14 @@ public class State { push(); } + /** Returns the default State, or this State if it corresponds to + the defaults for a given Action subclass. */ + public State getDefaults() { + if (defaults != null) + return defaults; + return this; + } + /** Gets the state element at the given index. */ public Element getElement(StateIndex index) { // The comments in the Open Inventor implementation indicate that |