本文整理汇总了Java中org.robovm.objc.Selector类的典型用法代码示例。如果您正苦于以下问题:Java Selector类的具体用法?Java Selector怎么用?Java Selector使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Selector类属于org.robovm.objc包,在下文中一共展示了Selector类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: ResourceManager
import org.robovm.objc.Selector; //导入依赖的package包/类
protected ResourceManager() {
this.xmlCache = XMLCache.getSharedInstance();
this.resourceIdentifierCache = new HashMap<>();
NSNotificationCenter.getDefaultCenter().addObserver(this,
Selector.register("didReceiveMemoryWarning:"),
UIApplication.DidReceiveMemoryWarningNotification(), null);
}
开发者ID:liraz,项目名称:robolayout,代码行数:9,代码来源:ResourceManager.java
示例2: applyAttributes
import org.robovm.objc.Selector; //导入依赖的package包/类
public static void applyAttributes(UIControl control, Map<String, String> attrs, NSObject actionTarget) {
UIViewLayoutUtil.applyAttributes(control, attrs);
if(actionTarget != null) {
String onClickKeyPath = attrs.get("onClickKeyPath");
String onClickSelector = attrs.get("onClick");
Selector selector = null;
if(onClickSelector != null && (selector = Selector.register(onClickSelector)) != null) {
if(!onClickKeyPath.isEmpty()) {
control.addTarget(actionTarget.getKeyValueCoder().getValue(onClickKeyPath), selector, UIControlEvents.TouchUpInside);
} else {
control.addTarget(actionTarget, selector, UIControlEvents.TouchUpInside);
}
}
}
}
开发者ID:liraz,项目名称:robolayout,代码行数:18,代码来源:UIControlLayoutUtil.java
示例3: BitmapDrawable
import org.robovm.objc.Selector; //导入依赖的package包/类
public BitmapDrawable(BitmapDrawableConstantState state, UIImage image) {
super();
NSNotificationCenter defaultCenter = NSNotificationCenter.getDefaultCenter();
defaultCenter.addObserver(this, Selector.register("didReceiveMemoryWarning:"), UIApplication.DidReceiveMemoryWarningNotification(), null);
BitmapDrawableConstantState internalState = new BitmapDrawableConstantState(state);
internalState.setImage(image);
this.internalConstantState = internalState;
}
开发者ID:liraz,项目名称:robolayout,代码行数:11,代码来源:BitmapDrawable.java
示例4: didSelectRow
import org.robovm.objc.Selector; //导入依赖的package包/类
@Override
public void didSelectRow(UITableView uiTableView, NSIndexPath nsIndexPath) {
UIViewController vc = null;
switch (nsIndexPath.getRow()) {
case 0:
vc = new FormularViewController("formular");
break;
case 1:
vc = new LayoutAnimationsViewController("animations");
break;
case 2:
vc = new LayoutViewController("animations");
UIButton toggleButton = (UIButton) UIViewLayoutUtil.findViewById(vc.getView(), "toggleButton");
toggleButton.getTitleLabel().setNumberOfLines(0);
toggleButton.addTarget(this, Selector.register("didPressToggleButton"), UIControlEvents.TouchUpInside);
break;
case 4:
vc = new LayoutViewController("includeContainer");
break;
case 5:
UICollectionViewFlowLayout layout = new UICollectionViewFlowLayout();
layout.setScrollDirection(UICollectionViewScrollDirection.Vertical);
vc = new CollectionViewExampleViewController(layout);
break;
default:
break;
}
if(vc != null) {
getNavigationController().pushViewController(vc, true);
}
}
开发者ID:liraz,项目名称:robolayout,代码行数:35,代码来源:MainViewController.java
示例5: LoginViewController
import org.robovm.objc.Selector; //导入依赖的package包/类
public LoginViewController(UIWindow window) {
this.window = window;
UIBarButtonItem helpButton = new UIBarButtonItem("Help",
UIBarButtonItemStyle.Plain, null);
Selector selector = Selector.register("help:");
helpButton.setAction(selector);
helpButton.setTarget(this);
this.getNavigationItem().setRightBarButtonItem(helpButton);
}
开发者ID:wolfgang-s,项目名称:owncloud-gallery,代码行数:12,代码来源:LoginViewController.java
示例6: viewDidLoad
import org.robovm.objc.Selector; //导入依赖的package包/类
@Override
public void viewDidLoad() {
super.viewDidLoad();
getView().setBackgroundColor(UIColor.white());
setupMetal();
buildPipeline();
timer = UIScreen.getMainScreen().getDisplayLink(this, Selector.register("redraw"));
timer.addToRunLoop(NSRunLoop.getMain(), NSRunLoopMode.Default);
}
开发者ID:robovm,项目名称:robovm-samples,代码行数:12,代码来源:MetalBasic2DViewController.java
示例7: canPerformUnwind
import org.robovm.objc.Selector; //导入依赖的package包/类
/**
* We must disambiguate which QuestionViewController should handle the
* exitToQuizStart: action as there will be several QuestionViewController
* instances on the navigation stack when the unwind segue is triggered. By
* default, a UINavigationController (or QuizContainerViewController)
* searches its viewControllers array in reverse. Without overriding this
* method, the QuestionViewController directly preceding the results screen
* would be selected as the destination of the unwind segue.
*/
@Override
public boolean canPerformUnwind(Selector action, UIViewController fromViewController, NSObject sender) {
// Always check if the view controller implements the unwind action by
// calling the super's implementation.
if (super.canPerformUnwind(action, fromViewController, sender)) {
// The first QuestionViewController in the navigation stack should
// handle the unwind action.
return this == ((UINavigationController) getParentViewController()).getViewControllers().get(0);
}
return false;
}
开发者ID:robovm,项目名称:robovm-samples,代码行数:22,代码来源:QuestionViewController.java
示例8: shouldAutorotateToInterfaceOrientation
import org.robovm.objc.Selector; //导入依赖的package包/类
@Callback @BindSelector("shouldAutorotateToInterfaceOrientation:")
private static boolean shouldAutorotateToInterfaceOrientation(
RoboViewController self, Selector sel, UIInterfaceOrientation orientation) {
return self.shouldAutorotateToInterfaceOrientation(orientation);
}
开发者ID:playn,项目名称:playn,代码行数:6,代码来源:RoboViewController.java
示例9: canPerformAction
import org.robovm.objc.Selector; //导入依赖的package包/类
@Override
public boolean canPerformAction(UITableView uiTableView, Selector selector, NSIndexPath nsIndexPath, NSObject nsObject) {
return false;
}
开发者ID:liraz,项目名称:robolayout,代码行数:5,代码来源:MainViewController.java
示例10: shouldAutorotateToInterfaceOrientation
import org.robovm.objc.Selector; //导入依赖的package包/类
@Callback
@BindSelector("shouldAutorotateToInterfaceOrientation:")
private static boolean shouldAutorotateToInterfaceOrientation (IOSUIViewController self, Selector sel,
UIInterfaceOrientation orientation) {
return self.shouldAutorotateToInterfaceOrientation(orientation);
}
开发者ID:basherone,项目名称:libgdxcn,代码行数:7,代码来源:IOSGraphics.java
示例11: objc_isAvailableForServiceType
import org.robovm.objc.Selector; //导入依赖的package包/类
@Bridge
private native static boolean objc_isAvailableForServiceType (ObjCClass __self__, Selector __cmd__, NSString serviceType);
开发者ID:pierotofy,项目名称:snappyfrog,代码行数:3,代码来源:SLComposeViewController.java
示例12: objc_composeViewControllerForServiceType
import org.robovm.objc.Selector; //导入依赖的package包/类
@Bridge
private native static SLComposeViewController objc_composeViewControllerForServiceType (ObjCClass __self__, Selector __cmd__,
NSString serviceType);
开发者ID:pierotofy,项目名称:snappyfrog,代码行数:4,代码来源:SLComposeViewController.java
示例13: objc_setInitialText
import org.robovm.objc.Selector; //导入依赖的package包/类
@Bridge
private native static boolean objc_setInitialText (SLComposeViewController __self__, Selector __cmd__, String text);
开发者ID:pierotofy,项目名称:snappyfrog,代码行数:3,代码来源:SLComposeViewController.java
示例14: objc_addImage
import org.robovm.objc.Selector; //导入依赖的package包/类
@Bridge
private native static boolean objc_addImage (SLComposeViewController __self__, Selector __cmd__, UIImage image);
开发者ID:pierotofy,项目名称:snappyfrog,代码行数:3,代码来源:SLComposeViewController.java
示例15: receivePrint
import org.robovm.objc.Selector; //导入依赖的package包/类
@Callback
@BindSelector("receivePrint:")
public static void receivePrint(PdReceiverDelegate __self__, Selector __cmd__, NSString delegate){
__self__.receivePrint(delegate);
}
开发者ID:manhluong,项目名称:pd-for-libgdx,代码行数:6,代码来源:PdReceiverDelegate.java
示例16: receiveBangFromSource
import org.robovm.objc.Selector; //导入依赖的package包/类
@Callback
@BindSelector("receiveBangFromSource:")
public static void receiveBangFromSource(PdListener __self__, Selector __cmd__, NSString source){
__self__.receiveBangFromSource(source);
}
开发者ID:manhluong,项目名称:pd-for-libgdx,代码行数:6,代码来源:PdListener.java
示例17: receiveFloat
import org.robovm.objc.Selector; //导入依赖的package包/类
@Callback
@BindSelector("receiveFloat:fromSource:")
public static void receiveFloat(PdListener __self__, Selector __cmd__, float received, NSString source){
__self__.receiveFloat(received, source);
}
开发者ID:manhluong,项目名称:pd-for-libgdx,代码行数:6,代码来源:PdListener.java
示例18: receiveSymbol
import org.robovm.objc.Selector; //导入依赖的package包/类
@Callback
@BindSelector("receiveSymbol:fromSource:")
public static void receiveSymbol(PdListener __self__, Selector __cmd__, NSString symbol, NSString source){
__self__.receiveSymbol(symbol, source);
}
开发者ID:manhluong,项目名称:pd-for-libgdx,代码行数:6,代码来源:PdListener.java
示例19: receiveList
import org.robovm.objc.Selector; //导入依赖的package包/类
@Callback
@BindSelector("receiveList:fromSource:")
public static void receiveList(PdListener __self__, Selector __cmd__, NSArray<?> list, NSString source){
__self__.receiveList(list, source);
}
开发者ID:manhluong,项目名称:pd-for-libgdx,代码行数:6,代码来源:PdListener.java
示例20: receiveMessage
import org.robovm.objc.Selector; //导入依赖的package包/类
@Callback
@BindSelector("receiveMessage:withArguments:fromSource:")
public static void receiveMessage(PdListener __self__, Selector __cmd__, NSString message, NSArray<?> arguments, NSString source){
__self__.receiveMessage(message, arguments, source);
}
开发者ID:manhluong,项目名称:pd-for-libgdx,代码行数:6,代码来源:PdListener.java
注:本文中的org.robovm.objc.Selector类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论