Sha256: 3f54489267c3478432051c493cc6a4a6ea73456f1b79675122c8e0a53284734d

Contents?: true

Size: 890 Bytes

Versions: 6

Compression:

Stored size: 890 Bytes

Contents

package com.rho;

import net.rim.device.api.system.Display;
import net.rim.device.api.ui.TouchEvent;
import net.rim.device.api.ui.container.MainScreen;

public abstract class RhoMainScreen extends MainScreen {
	
	protected abstract boolean onTouchUnclick();
	
	protected boolean touchEvent(TouchEvent message) {
		int nEvent = message.getEvent();
		
		if ( nEvent == TouchEvent.UNCLICK )
		{
			if ( onTouchUnclick() )
			    return true;
		}
		
		return super.touchEvent(message);
	}
	
	public boolean isTouchScreen()
	{
	    //DeviceInfo.getDevicename()
	    return net.rim.device.api.ui.Touchscreen.isSupported();
	}
	
	protected abstract void onChangeOrientation(int x, int y, int nOrientation);
	protected void sublayout(int arg0, int arg1) 
	{
		onChangeOrientation(arg0, arg1, Display.getOrientation()== Display.ORIENTATION_LANDSCAPE ? 1 : 2);
		super.sublayout(arg0, arg1);
	}
	
};

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rhodes-2.2.6 platform/bb/rhodes/platform/4.7/com/rho/RhoMainScreen.java
rhodes-2.2.6.beta.1 platform/bb/rhodes/platform/4.7/com/rho/RhoMainScreen.java
rhodes-2.2.5 platform/bb/rhodes/platform/4.7/com/rho/RhoMainScreen.java
rhodes-2.2.5.beta.3 platform/bb/rhodes/platform/4.7/com/rho/RhoMainScreen.java
rhodes-2.2.5.beta.2 platform/bb/rhodes/platform/4.7/com/rho/RhoMainScreen.java
rhodes-2.2.5.beta.1 platform/bb/rhodes/platform/4.7/com/rho/RhoMainScreen.java