Sha256: 147dbdbf306dc82503d6f670b90e02c9be978239151bd2f4468bd4c309a1ca8e

Contents?: true

Size: 1.61 KB

Versions: 14

Compression:

Stored size: 1.61 KB

Contents

/**
 * 
 */
package com.rho.rhoelements.plugins;

import com.rho.rhoelements.Common;
import com.rho.rhoelements.LogEntry;
import com.rho.rhoelements.PluginSetting;
import com.rho.rhoelements.Version;

/**
 * @author FPC843
 *
 */
public class ZoomPlugin extends Plugin
{

	/**
	 * @see com.rho.rhoelements.plugins.Plugin#onSetting(com.rho.rhoelements.PluginSetting)
	 */
	@Override
	public void onSetting(PluginSetting setting)
	{
		Common.logger.add(new LogEntry(LogEntry.PB_LOG_DEBUG, "Start"));
		
		if ( (setting == null) || (setting.getValue() == null) )
		{
			Common.logger.add(new LogEntry(LogEntry.PB_LOG_ERROR, "setting is null"));
			return;
		}
		try
		{
			if (setting.getName().equalsIgnoreCase("text"))
			{
				Common.logger.add(new LogEntry(LogEntry.PB_LOG_DEBUG, "text"));
				
				/* There is no need to check that the int value is within the valid zoom range as this check is carried out
				 * by browserSetTextZoom()
				 */
				Common.elementsCore.browserSetTextZoom(Integer.parseInt(setting.getValue()));
			}
			else if (setting.getName().equalsIgnoreCase("page"))
			{
				Common.logger.add(new LogEntry(LogEntry.PB_LOG_DEBUG, "page"));
				Common.elementsCore.browserSetZoom(Double.parseDouble(setting.getValue()));
			}
		}
		catch (NumberFormatException e)
		{
			Common.logger.add(new LogEntry(LogEntry.PB_LOG_ERROR, "Passed parameter has wrong format"));
		}
	}

	/**
	 * @see com.rho.rhoelements.plugins.Plugin#onShutdown()
	 */
	@Override
	public void onShutdown()
	{
	}
	
	/**
	 * @return The version of this plugin being built
	 */
	public static Version getVersion()
	{
		return new Version("ZoomPlugin");
	}

}

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rhodes-7.6.0 extensions/rhoelementsext/ext/rhoelementsext/platform/android/rhoelements_temp/src/com/rho/rhoelements/plugins/ZoomPlugin.java
rhodes-7.5.1 extensions/rhoelementsext/ext/rhoelementsext/platform/android/rhoelements_temp/src/com/rho/rhoelements/plugins/ZoomPlugin.java
rhodes-7.4.1 extensions/rhoelementsext/ext/rhoelementsext/platform/android/rhoelements_temp/src/com/rho/rhoelements/plugins/ZoomPlugin.java
rhodes-7.1.17 extensions/rhoelementsext/ext/rhoelementsext/platform/android/rhoelements_temp/src/com/rho/rhoelements/plugins/ZoomPlugin.java
rhodes-6.2.0 extensions/rhoelementsext/ext/rhoelementsext/platform/android/rhoelements_temp/src/com/rho/rhoelements/plugins/ZoomPlugin.java
rhodes-6.0.11 extensions/rhoelementsext/ext/rhoelementsext/platform/android/rhoelements_temp/src/com/rho/rhoelements/plugins/ZoomPlugin.java
rhodes-5.5.18 extensions/rhoelementsext/ext/rhoelementsext/platform/android/rhoelements_temp/src/com/rho/rhoelements/plugins/ZoomPlugin.java
rhodes-5.5.17 extensions/rhoelementsext/ext/rhoelementsext/platform/android/rhoelements_temp/src/com/rho/rhoelements/plugins/ZoomPlugin.java
rhodes-5.5.15 extensions/rhoelementsext/ext/rhoelementsext/platform/android/rhoelements_temp/src/com/rho/rhoelements/plugins/ZoomPlugin.java
rhodes-5.5.0.22 extensions/rhoelementsext/ext/rhoelementsext/platform/android/rhoelements_temp/src/com/rho/rhoelements/plugins/ZoomPlugin.java
rhodes-5.5.2 extensions/rhoelementsext/ext/rhoelementsext/platform/android/rhoelements_temp/src/com/rho/rhoelements/plugins/ZoomPlugin.java
rhodes-5.5.0.7 extensions/rhoelementsext/ext/rhoelementsext/platform/android/rhoelements_temp/src/com/rho/rhoelements/plugins/ZoomPlugin.java
rhodes-5.5.0.3 extensions/rhoelementsext/ext/rhoelementsext/platform/android/rhoelements_temp/src/com/rho/rhoelements/plugins/ZoomPlugin.java
rhodes-5.5.0 extensions/rhoelementsext/ext/rhoelementsext/platform/android/rhoelements_temp/src/com/rho/rhoelements/plugins/ZoomPlugin.java