* {@link #getPreloaderCallback()} and implement any loading screen drawing via GWT widgets.
* @author mzechner */
public abstract class GwtApplication implements EntryPoint, Application {
- private ApplicationListener listener;
+ protected ApplicationListener listener;
private GwtApplicationConfiguration config;
- private GwtGraphics graphics;
- private GwtInput input;
+ protected GwtGraphics graphics;
+ protected GwtInput input;
private GwtNet net;
- private Panel root = null;
+ protected Panel root = null;
private TextArea log = null;
private int logLevel = LOG_ERROR;
- private Array<Runnable> runnables = new Array<Runnable>();
- private Array<Runnable> runnablesHelper = new Array<Runnable>();
+ protected Array<Runnable> runnables = new Array<Runnable>();
+ protected Array<Runnable> runnablesHelper = new Array<Runnable>();
private Array<LifecycleListener> lifecycleListeners = new Array<LifecycleListener>();
- private int lastWidth, lastHeight;
- private Preloader preloader;
+ protected int lastWidth;
+ protected int lastHeight;
+ protected Preloader preloader;
private static AgentInfo agentInfo;
private ObjectMap<String, Preferences> prefs = new ObjectMap<String, Preferences>();
@Override
public void onModuleLoad () {
- this.agentInfo = computeAgentInfo();
+ GwtApplication.agentInfo = computeAgentInfo();
this.listener = getApplicationListener();
this.config = getConfig();
this.log = config.log;
}.scheduleRepeating(100);
}
- private void setupLoop () {
+ protected void setupLoop () {
// setup modules
try {
graphics = new GwtGraphics(root, config);
private Map<ResizableWidget, ResizableWidgetInfo> widgets = new HashMap<ResizableWidget, ResizableWidgetInfo>();
/** The current window height. */
- private int windowHeight = 0;
+ protected int windowHeight = 0;
/** The current window width. */
- private int windowWidth = 0;
+ protected int windowWidth = 0;
/** The hook used to remove the window handler. */
private HandlerRegistration windowHandler;
/** The delay between resize checks. */
- private int resizeCheckDelay = DEFAULT_RESIZE_CHECK_DELAY;
+ protected int resizeCheckDelay = DEFAULT_RESIZE_CHECK_DELAY;
/** A boolean indicating that resize checking should run. */
- private boolean resizeCheckingEnabled;
+ protected boolean resizeCheckingEnabled;
/** Create a ResizableWidget. */
public ResizableWidgetCollection () {