|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.ctdp.rfdynhud.widgets.base.widget.Widget
net.ctdp.rfdynhud.widgets.base.widget.StatefulWidget<GeneralStore,LocalStore>
GeneralStore
- the type name of the general store classLocalStore
- the type name of the local store classpublic abstract class StatefulWidget<GeneralStore,LocalStore>
Widgets extending this class can store state data, that is restored when a Widget of this type and/or name is (re-)loaded.
The general store object is used and restored for any StatefulWidget
of the same class.
The local store object is used and restored for any StatefulWidget
of the same class and name.
Field Summary |
---|
Fields inherited from class net.ctdp.rfdynhud.widgets.base.widget.Widget |
---|
LOG_CHANNEL, NEEDED_DATA_ALL, NEEDED_DATA_SCORING, NEEDED_DATA_TELEMETRY |
Constructor Summary | |
---|---|
protected |
StatefulWidget(float width,
boolean widthPercent,
float height,
boolean heightPercent)
Creates a new Widget. |
protected |
StatefulWidget(float width,
float height)
Creates a new Widget. |
Method Summary | |
---|---|
protected abstract GeneralStore |
createGeneralStore()
Creates a store object for all widgets of this type. |
protected abstract LocalStore |
createLocalStore()
Creates a store object for this Widget only. |
GeneralStore |
getGeneralStore()
Gets a value store object for all StatefulWidget s of this class. |
protected java.lang.Class<? extends StatefulWidget> |
getGeneralStoreKey()
|
LocalStore |
getLocalStore()
Gets a value store object for this StatefulWidget . |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected StatefulWidget(float width, boolean widthPercent, float height, boolean heightPercent)
width
- negative numbers for (screen_width - width)widthPercent
- width parameter treated as percentsheight
- negative numbers for (screen_height - height)heightPercent
- height parameter treated as percentsprotected StatefulWidget(float width, float height)
width
- negative numbers for (screen_width - width)height
- negative numbers for (screen_height - height)Method Detail |
---|
protected abstract GeneralStore createGeneralStore()
null
is explicitly permitted and default implementation simply returns null
.protected java.lang.Class<? extends StatefulWidget> getGeneralStoreKey()
public final GeneralStore getGeneralStore()
StatefulWidget
s of this class.
StatefulWidget
s of this class.protected abstract LocalStore createLocalStore()
null
is explicitly permitted and default implementation simply returns null
.public final LocalStore getLocalStore()
StatefulWidget
.
The store is restored when the widget configuration is reloaded.
The object is stored by the StatefulWidget
's class and name.
StatefulWidget
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |