当前位置: 首页>>代码示例>>Java>>正文


Java KrollDict.getBoolean方法代码示例

本文整理汇总了Java中org.appcelerator.kroll.KrollDict.getBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java KrollDict.getBoolean方法的具体用法?Java KrollDict.getBoolean怎么用?Java KrollDict.getBoolean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.appcelerator.kroll.KrollDict的用法示例。


在下文中一共展示了KrollDict.getBoolean方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: processProperties

import org.appcelerator.kroll.KrollDict; //导入方法依赖的package包/类
@Override
public void processProperties(KrollDict d)
{	
	super.processProperties(d);
	
	if(d.containsKey("save_location")){
		SAVE = d.getString("save_location");
	}
	
	if( d.containsKey("useFrontCamera") ){
		Log.i(TAG, "Front Camera Property exists!");
		FRONT_CAMERA = d.getBoolean("useFrontCamera");
	}
	
	if( d.containsKey("pictureTimeout")){
		PICTURE_TIMEOUT = d.getInt("pictureTimeout");
	}
	
	if( d.containsKey("resolutionNamed") ){
		RESOLUTION_NAME = d.getInt("resolutionNamed");
	}
}
 
开发者ID:brownemint,项目名称:Ti-Android-CameraView,代码行数:23,代码来源:CameraViewProxy.java

示例2: call

import org.appcelerator.kroll.KrollDict; //导入方法依赖的package包/类
public static void call(final KrollProxy proxy, HashMap args) {

		KrollDict argsDict = new KrollDict(args);
		int objectId = argsDict.getInt("objectId");
		Boolean isFolder = argsDict.getBoolean("isFolder");
		String message = argsDict.getString("message");
		
		final KrollFunction success = (KrollFunction)args.get("success");
		final KrollFunction error = (KrollFunction)args.get("error");
		
		final Box box = Box.getInstance(Constants.API_KEY);
	    box.addComment(Constants.getAuthToken(), isFolder?"folder":"file", objectId, message, new AddCommentListener() {
			
			@Override
			public void onIOException(IOException ex) {
				Util.handleIOException(proxy, ex, error);
			}
			
			@Override
			public void onComplete(Comment comment, String status) {
				if (status.equals("add_comment_ok")) {
					if (success != null)
						success.callAsync(proxy.getKrollObject(), new Object[] {});
				}
				else if (status.equals("add_comment_error")) {
					Util.handleError(proxy, "An error happened while we were adding your comment. Try again?", status, error);
				}
				else {
					Util.handleCommonStatuses(proxy, status, error);
				}
			}
		});
	}
 
开发者ID:appcelerator-archive,项目名称:ti.box,代码行数:34,代码来源:AddComment.java

示例3: call

import org.appcelerator.kroll.KrollDict; //导入方法依赖的package包/类
public static void call(final KrollProxy proxy, HashMap args) {
	
	KrollDict argsDict = new KrollDict(args);
	int objectId = argsDict.getInt("objectId");
	Boolean isFolder = argsDict.getBoolean("isFolder");
	String password = argsDict.getString("password");
	String[] emailAddresses = argsDict.getStringArray("emailAddresses");
	String message = argsDict.getString("message");
	
    final KrollFunction success = (KrollFunction)args.get("success");
   	final KrollFunction error = (KrollFunction)args.get("error");
	
	final Box box = Box.getInstance(Constants.API_KEY);
    box.publicShare(Constants.getAuthToken(), isFolder?"folder":"file", objectId, password, message, emailAddresses, new PublicShareListener() {
		
		@Override
		public void onIOException(IOException ex) {
			Util.handleIOException(proxy, ex, error);
		}
		
		@Override
		public void onComplete(String publicName, String status) {
			if (status.equals("share_ok")) {
				if (success != null)
					success.callAsync(proxy.getKrollObject(), new Object[] {});
			}
			else if (status.equals("wrong_node")) {
				Util.handleError(proxy, "We weren't able to find what you tried to share in your account!", status, error);
			}
			else if (status.equals("share_error")) {
				Util.handleError(proxy, "An error happened while we were sharing your file. Try again?", status, error);
			}
			else {
				Util.handleCommonStatuses(proxy, status, error);
			}
		}
	});
}
 
开发者ID:appcelerator-archive,项目名称:ti.box,代码行数:39,代码来源:PublicShare.java

示例4: call

import org.appcelerator.kroll.KrollDict; //导入方法依赖的package包/类
public static void call(final KrollProxy proxy, HashMap args) {

		KrollDict argsDict = new KrollDict(args);
		int objectId = argsDict.getInt("objectId");
		Boolean isFolder = argsDict.getBoolean("isFolder");
		int destinationFolderId = argsDict.getInt("destinationFolderId");
		
	    final KrollFunction success = (KrollFunction)args.get("success");
    	final KrollFunction error = (KrollFunction)args.get("error");

		final Box box = Box.getInstance(Constants.API_KEY);
	    box.copy(Constants.getAuthToken(), isFolder?"folder":"file", objectId, destinationFolderId, new CopyListener() {
			
			@Override
			public void onIOException(IOException ex) {
				Util.handleIOException(proxy, ex, error);
			}
			
			@Override
			public void onComplete(String status) {
				if (status.equals("s_copy_node")) {
					if (success != null)
						success.callAsync(proxy.getKrollObject(), new Object[] {});
				}
				else if (status.equals("e_copy_node")) {
					Util.handleError(proxy, "An error happened while we were copying your file. Try again?", status, error);
				}
				else {
					Util.handleCommonStatuses(proxy, status, error);
				}
			}
		});
	}
 
开发者ID:appcelerator-archive,项目名称:ti.box,代码行数:34,代码来源:Copy.java

示例5: call

import org.appcelerator.kroll.KrollDict; //导入方法依赖的package包/类
public static void call(final KrollProxy proxy, HashMap args) {
	
	KrollDict argsDict = new KrollDict(args);
	int objectId = argsDict.getInt("objectId");
	Boolean isFolder = argsDict.getBoolean("isFolder");

    final KrollFunction success = (KrollFunction)args.get("success");
   	final KrollFunction error = (KrollFunction)args.get("error");
	
	final Box box = Box.getInstance(Constants.API_KEY);
    box.delete(Constants.getAuthToken(), isFolder?"folder":"file", objectId, new DeleteListener() {

		@Override
		public void onIOException(IOException ex) {
			Util.handleIOException(proxy, ex, error);
		}
		
		@Override
		public void onComplete(String status) {
			if (status.equals("s_delete_node")) {
				if (success != null)
					success.callAsync(proxy.getKrollObject(), new Object[] {});
			}
			else if (status.equals("e_delete_node")) {
				Util.handleError(proxy, "An error happened while we were removing your file. Try again?", status, error);
			}
			else {
				Util.handleCommonStatuses(proxy, status, error);
			}
		}
	});
}
 
开发者ID:appcelerator-archive,项目名称:ti.box,代码行数:33,代码来源:Remove.java

示例6: call

import org.appcelerator.kroll.KrollDict; //导入方法依赖的package包/类
public static void call(final KrollProxy proxy, HashMap args) {
	
	KrollDict argsDict = new KrollDict(args);
	int objectId = argsDict.getInt("objectId");
	Boolean isFolder = argsDict.getBoolean("isFolder");
	
    final KrollFunction success = (KrollFunction)args.get("success");
   	final KrollFunction error = (KrollFunction)args.get("error");
	
	final Box box = Box.getInstance(Constants.API_KEY);
    box.publicUnshare(Constants.getAuthToken(), isFolder?"folder":"file", objectId, new PublicUnshareListener() {
		
		@Override
		public void onIOException(IOException ex) {
			Util.handleIOException(proxy, ex, error);
		}
		
		@Override
		public void onComplete(String status) {
			if (status.equals("unshare_ok")) {
				if (success != null)
					success.callAsync(proxy.getKrollObject(), new Object[] {});
			}
			else if (status.equals("wrong_node")) {
				Util.handleError(proxy, "We weren't able to find what you tried to unshare in your account!", status, error);
			}
			else if (status.equals("unshare_error")) {
				Util.handleError(proxy, "An error happened while we were unsharing your file. Try again?", status, error);
			}
			else {
				Util.handleCommonStatuses(proxy, status, error);
			}
		}
	});
}
 
开发者ID:appcelerator-archive,项目名称:ti.box,代码行数:36,代码来源:PublicUnshare.java

示例7: call

import org.appcelerator.kroll.KrollDict; //导入方法依赖的package包/类
public static void call(final KrollProxy proxy, HashMap args) {
	
	KrollDict argsDict = new KrollDict(args);
	int objectId = argsDict.getInt("objectId");
	Boolean isFolder = argsDict.getBoolean("isFolder");
	String newName = argsDict.getString("newName");

    final KrollFunction success = (KrollFunction)args.get("success");
   	final KrollFunction error = (KrollFunction)args.get("error");
	
	final Box box = Box.getInstance(Constants.API_KEY);
    box.rename(Constants.getAuthToken(), isFolder?"folder":"file", objectId, newName, new RenameListener() {
		
		@Override
		public void onIOException(IOException ex) {
			Util.handleIOException(proxy, ex, error);
		}
		
		@Override
		public void onComplete(String status) {
			if (status.equals("s_rename_node")) {
				if (success != null)
					success.callAsync(proxy.getKrollObject(), new Object[] {});
			}
			else if (status.equals("e_rename_node")) {
				Util.handleError(proxy, "The name you specified may contain invalid characters. Please check it, and try again.", status, error);
			}
			else {
				Util.handleCommonStatuses(proxy, status, error);
			}
		}
	});
}
 
开发者ID:appcelerator-archive,项目名称:ti.box,代码行数:34,代码来源:Rename.java

示例8: call

import org.appcelerator.kroll.KrollDict; //导入方法依赖的package包/类
public static void call(final KrollProxy proxy, HashMap args) {
	
	KrollDict argsDict = new KrollDict(args);
	int objectId = argsDict.getInt("objectId");
	Boolean isFolder = argsDict.getBoolean("isFolder");
	int destinationFolderId = argsDict.getInt("destinationFolderId");

    final KrollFunction success = (KrollFunction)args.get("success");
   	final KrollFunction error = (KrollFunction)args.get("error");
	
    final Box box = Box.getInstance(Constants.API_KEY);
    box.move(Constants.getAuthToken(), isFolder?"folder":"file", objectId, destinationFolderId, new MoveListener() {

		@Override
		public void onIOException(IOException ex) {
			Util.handleIOException(proxy, ex, error);
		}
		
		@Override
		public void onComplete(String status) {
			if (status.equals("s_move_node")) {
				if (success != null)
					success.callAsync(proxy.getKrollObject(), new Object[] {});
			}
			else if (status.equals("e_move_node")) {
				Util.handleError(proxy, "An error happened while we were moving your file. Try again?", status, error);
			}
			else {
				Util.handleCommonStatuses(proxy, status, error);
			}
		}
	});
}
 
开发者ID:appcelerator-archive,项目名称:ti.box,代码行数:34,代码来源:Move.java

示例9: call

import org.appcelerator.kroll.KrollDict; //导入方法依赖的package包/类
public static void call(final KrollProxy proxy, HashMap args) {
	
	KrollDict argsDict = new KrollDict(args);
	int objectId = argsDict.getInt("objectId");
	Boolean isFolder = argsDict.getBoolean("isFolder");
	String[] emailAddresses = argsDict.getStringArray("emailAddresses");
	String message = argsDict.getString("message");
	Boolean notifyWhenViewed = argsDict.getBoolean("notifyWhenViewed");
	
    final KrollFunction success = (KrollFunction)args.get("success");
   	final KrollFunction error = (KrollFunction)args.get("error");
	
	final Box box = Box.getInstance(Constants.API_KEY);
    box.privateShare(Constants.getAuthToken(), isFolder?"folder":"file", objectId, message, emailAddresses, notifyWhenViewed, new PrivateShareListener() {
		
		@Override
		public void onIOException(IOException ex) {
			Util.handleIOException(proxy, ex, error);
		}
		
		@Override
		public void onComplete(String status) {
			if (status.equals("private_share_ok")) {
				if (success != null)
					success.callAsync(proxy.getKrollObject(), new Object[] {});
			}
			else if (status.equals("wrong_node")) {
				Util.handleError(proxy, "We weren't able to find what you tried to share in your account!", status, error);
			}
			else if (status.equals("private_share_error")) {
				Util.handleError(proxy, "An error happened while we were sharing your file. Try again?", status, error);
			}
			else {
				Util.handleCommonStatuses(proxy, status, error);
			}
		}
	});
}
 
开发者ID:appcelerator-archive,项目名称:ti.box,代码行数:39,代码来源:PrivateShare.java

示例10: handleCreationDict

import org.appcelerator.kroll.KrollDict; //导入方法依赖的package包/类
@Override
public void handleCreationDict(KrollDict options) {
	
	final ActionBar actionBar = ((AppCompatActivity)getActivity()).getSupportActionBar();
	final boolean keepTitle;
	
	if (options.containsKey("keepTitle")) {
		keepTitle = options.getBoolean("keepTitle");
	}else{
		keepTitle = false;
	}
	
	add(keepTitle);
    
    if (options.containsKey("titles")) {
    	final String[] dropdownValues = options.getStringArray("titles");
    	
        ArrayAdapter<String> adapter = new ArrayAdapter<String>(actionBar.getThemedContext(),
            android.R.layout.simple_spinner_item, android.R.id.text1,
            dropdownValues);

        adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);

        actionBar.setListNavigationCallbacks(adapter, navigationListener);
	}
    
    if (options.containsKey("index")) {
    	int activeItem = options.getInt("index");
    	setActiveItem(activeItem);
    }

	super.handleCreationDict(options);
}
 
开发者ID:ricardoalcocer,项目名称:actionbarextras,代码行数:34,代码来源:DropdownProxy.java

示例11: handleCreationDict

import org.appcelerator.kroll.KrollDict; //导入方法依赖的package包/类
@Override
public void handleCreationDict(KrollDict options) {
	super.handleCreationDict(options);
	if (options.containsKey(KEY_DEBUG)) {
		sDebug = options.getBoolean(KEY_DEBUG);
	}
	debugMsg("handleCreationDict " + options.toString());
}
 
开发者ID:snowciety,项目名称:sc.mapsforge,代码行数:9,代码来源:MapsforgeViewProxy.java

示例12: call

import org.appcelerator.kroll.KrollDict; //导入方法依赖的package包/类
public static void call(final KrollProxy proxy, HashMap args) {

		KrollDict argsDict = new KrollDict(args);
		int objectId = argsDict.getInt("objectId");
		Boolean isFolder = argsDict.getBoolean("isFolder");
		
	    final KrollFunction success = (KrollFunction)args.get("success");
    	final KrollFunction error = (KrollFunction)args.get("error");
		
		final Box box = Box.getInstance(Constants.API_KEY);
	    box.getComments(Constants.getAuthToken(), isFolder?"folder":"file", objectId, new GetCommentsListener() {
			
			@Override
			public void onIOException(IOException ex) {
				Util.handleIOException(proxy, ex, error);
			}
			
			@Override
			public void onComplete(ArrayList<Comment> comments, String status) {
				if (status.equals("get_comments_ok")) {
					if (success != null) {
						HashMap retVal = new HashMap();
						ArrayList<BoxCommentProxy> commentsProxy = new ArrayList<BoxCommentProxy>();
						for (Comment comment : comments) {
							BoxCommentProxy commentProxy = new BoxCommentProxy();
							commentProxy.setComment(comment);
							commentsProxy.add(commentProxy);
						}
						retVal.put("comments", commentsProxy.toArray());
						success.callAsync(proxy.getKrollObject(), retVal);
					}
				}
				else if (status.equals("get_comments_error")) {
					Util.handleError(proxy, "An error happened while we were retrieving the comments. Try again?", status, error);
				}
				else {
					Util.handleCommonStatuses(proxy, status, error);
				}
			}
		});
	}
 
开发者ID:appcelerator-archive,项目名称:ti.box,代码行数:42,代码来源:GetComments.java


注:本文中的org.appcelerator.kroll.KrollDict.getBoolean方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。