• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ObjectiveCName类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.google.j2objc.annotations.ObjectiveCName的典型用法代码示例。如果您正苦于以下问题:Java ObjectiveCName类的具体用法?Java ObjectiveCName怎么用?Java ObjectiveCName使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ObjectiveCName类属于com.google.j2objc.annotations包,在下文中一共展示了ObjectiveCName类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: swap

import com.google.j2objc.annotations.ObjectiveCName; //导入依赖的package包/类
@ObjectiveCName("swapWithWindow:")
public void swap(Window that) {
    int tmp = top;
    top = that.top;
    that.top = tmp;

    tmp = left;
    left = that.left;
    that.left = tmp;

    tmp = width;
    width = that.width;
    that.width = tmp;

    tmp = height;
    height = that.height;
    that.height = tmp;

    tmp = z_index;
    z_index = that.z_index;
    that.z_index = tmp;
}
 
开发者ID:Piasy,项目名称:JavaUniverse,代码行数:23,代码来源:Window.java


示例2: touch

import com.google.j2objc.annotations.ObjectiveCName; //导入依赖的package包/类
@MainThread
@ObjectiveCName("touchWithIndex:")
public void touch(int index) {
    im.actor.runtime.Runtime.checkMainThread();

    if (index >= getSize() - loadGap) {
        if (window.isForwardCompleted()) {
            if (bindHook != null) {
                bindHook.onScrolledToEnd();
            }
        } else {
            loadMoreForward();
        }
    }

    if (index < loadGap) {
        loadMoreBackward();
    }

    if (bindHook != null) {
        bindHook.onItemTouched(getItem(index));
    }
}
 
开发者ID:wex5,项目名称:dangchat-sdk,代码行数:24,代码来源:BindedDisplayList.java


示例3: formatDialogText

import com.google.j2objc.annotations.ObjectiveCName; //导入依赖的package包/类
/**
 * Formatting Dialog List text. Deprecated: you need to manually format Content and append
 * performer if needed and highlight it
 *
 * @param dialog dialog to format
 * @return formatted content
 */
@Deprecated
@ObjectiveCName("formatDialogText:")
public String formatDialogText(Dialog dialog) {
    // Detecting if dialog is empty
    if (dialog.getSenderId() == 0) {
        return "";
    } else {
        String contentText = formatContentText(dialog.getSenderId(),
                dialog.getMessageType(), dialog.getText(), dialog.getRelatedUid());
        if (dialog.getPeer().getPeerType() == PeerType.GROUP) {
            if (!isLargeDialogMessage(dialog.getMessageType())) {
                return formatPerformerName(dialog.getSenderId()) + ": " + contentText;
            } else {
                return contentText;
            }
        } else {
            return contentText;
        }
    }
}
 
开发者ID:wex5,项目名称:dangchat-sdk,代码行数:28,代码来源:I18nEngine.java


示例4: formatFileSize

import com.google.j2objc.annotations.ObjectiveCName; //导入依赖的package包/类
@ObjectiveCName("formatFileSize:")
public String formatFileSize(int bytes) {
    if (bytes < 0) {
        bytes = 0;
    }

    // TODO: Better rounding
    if (bytes < 1024) {
        return get("language.file_size.bytes")
                .replace("{bytes}", "" + bytes);
    } else if (bytes < 1024 * 1024) {
        return get("language.file_size.kbytes")
                .replace("{kbytes}", "" + (bytes / 1024));
    } else if (bytes < 1024 * 1024 * 1024) {
        return get("language.file_size.mbytes")
                .replace("{mbytes}", "" + (bytes / (1024 * 1024)));
    } else {
        return get("language.file_size.gbytes")
                .replace("{gbytes}", "" + (bytes / (1024 * 1024 * 1024)));
    }
}
 
开发者ID:wex5,项目名称:dangchat-sdk,代码行数:22,代码来源:IntlEngine.java


示例5: map

import com.google.j2objc.annotations.ObjectiveCName; //导入依赖的package包/类
/**
 * Mapping result value of promise to another value
 *
 * @param res mapping function
 * @param <R> destination type
 * @return promise
 */
@ObjectiveCName("map:")
public <R> Promise<R> map(final Function<T, R> res) {
    final Promise<T> self = this;
    return new Promise<>((PromiseFunc<R>) resolver -> {
        self.then(t -> {
            R r;
            try {
                r = res.apply(t);
            } catch (Exception e) {
                e.printStackTrace();
                resolver.tryError(e);
                return;
            }
            resolver.tryResult(r);
        });
        self.failure(e -> resolver.error(e));
    });
}
 
开发者ID:wex5,项目名称:dangchat-sdk,代码行数:26,代码来源:Promise.java


示例6: Window

import com.google.j2objc.annotations.ObjectiveCName; //导入依赖的package包/类
@ObjectiveCName("initWithWidth:height:top:left:zIndex:uid:")
public Window(int width, int height, int top, int left, int z_index, String uid) {
    this.width = width;
    this.height = height;
    this.top = top;
    this.left = left;
    this.z_index = z_index;
    this.uid = uid;
}
 
开发者ID:Piasy,项目名称:JavaUniverse,代码行数:10,代码来源:Window.java


示例7: AppleListUpdate

import com.google.j2objc.annotations.ObjectiveCName; //导入依赖的package包/类
@ObjectiveCName("initWithRemoved:withAdded:withMoved:withUpdated:withLoadMore:")
public AppleListUpdate(ArrayList<Integer> removed,
                       ArrayList<Integer> added,
                       ArrayList<Move> moved,
                       ArrayList<Integer> updated, boolean isLoadMore) {
    this.removed = removed;
    this.added = added;
    this.moved = moved;
    this.updated = updated;
    this.isLoadMore = isLoadMore;
}
 
开发者ID:wex5,项目名称:dangchat-sdk,代码行数:12,代码来源:AppleListUpdate.java


示例8: areSameDays

import com.google.j2objc.annotations.ObjectiveCName; //导入依赖的package包/类
@ObjectiveCName("areSameDaysWithA:withB:")
public boolean areSameDays(long a, long b) {
    Date date1 = new Date(a);
    int y1 = date1.getYear();
    int m1 = date1.getMonth();
    int d1 = date1.getDate();
    Date date2 = new Date(b);
    int y2 = date2.getYear();
    int m2 = date2.getMonth();
    int d2 = date2.getDate();

    return y1 == y2 && m1 == m2 && d1 == d2;
}
 
开发者ID:wex5,项目名称:dangchat-sdk,代码行数:14,代码来源:IntlEngine.java


示例9: addListener

import com.google.j2objc.annotations.ObjectiveCName; //导入依赖的package包/类
@ObjectiveCName("addListener:")
public void addListener(Listener listener) {
    //im.actor.runtime.Runtime.checkMainThread();
    if (!listeners.contains(listener)) {
        listeners.add(listener);
    }
}
 
开发者ID:wex5,项目名称:dangchat-sdk,代码行数:8,代码来源:DisplayList.java


示例10: findAllLinks

import com.google.j2objc.annotations.ObjectiveCName; //导入依赖的package包/类
/**
 * Finding all messages with links
 *
 * @param peer peer for search
 * @return found messages
 */
@ObjectiveCName("findAllLinksWithPeer:")
public Command<List<MessageSearchEntity>> findAllLinks(Peer peer) {
    return callback -> modules.getSearchModule().findAllLinks(peer)
            .then(v -> callback.onResult(v))
            .failure(e -> callback.onError(e));
}
 
开发者ID:wex5,项目名称:dangchat-sdk,代码行数:13,代码来源:Messenger.java


示例11: addAndroidListener

import com.google.j2objc.annotations.ObjectiveCName; //导入依赖的package包/类
@ObjectiveCName("addAndroidListener:")
public void addAndroidListener(AndroidChangeListener<T> listener) {
    if (operationMode != OperationMode.ANDROID && operationMode != OperationMode.GENERAL) {
        throw new RuntimeException("Unable to set Android Listener in iOS mode");
    }
    //im.actor.runtime.Runtime.checkMainThread();

    if (!androidListeners.contains(listener)) {
        androidListeners.add(listener);
    }
}
 
开发者ID:wex5,项目名称:dangchat-sdk,代码行数:12,代码来源:DisplayList.java


示例12: setPlatformType

import com.google.j2objc.annotations.ObjectiveCName; //导入依赖的package包/类
/**
 * Set App Type
 *
 * @param platformType App Type
 * @return this
 */
@NotNull
@ObjectiveCName("setPlatformType:")
public ConfigurationBuilder setPlatformType(@NotNull PlatformType platformType) {
    this.platformType = platformType;
    return this;
}
 
开发者ID:wex5,项目名称:dangchat-sdk,代码行数:13,代码来源:ConfigurationBuilder.java


示例13: subscribe

import com.google.j2objc.annotations.ObjectiveCName; //导入依赖的package包/类
/**
 * Subscribe for GroupVM updates
 *
 * @param listener Listener for updates
 */
@MainThread
@ObjectiveCName("subscribeWithListener:withNotify:")
public void subscribe(@NotNull ModelChangedListener<GroupVM> listener, boolean notify) {
    im.actor.runtime.Runtime.checkMainThread();
    if (listeners.contains(listener)) {
        return;
    }
    listeners.add(listener);
    if (notify) {
        listener.onChanged(this);
    }
}
 
开发者ID:wex5,项目名称:dangchat-sdk,代码行数:18,代码来源:GroupVM.java


示例14: subscribe

import com.google.j2objc.annotations.ObjectiveCName; //导入依赖的package包/类
/**
 * Subscribe to UserVM updates
 *
 * @param listener UserVM changed listener
 */
@MainThread
@ObjectiveCName("subscribeWithListener:")
public void subscribe(@NotNull ModelChangedListener<UserVM> listener) {
    Runtime.checkMainThread();
    if (listeners.contains(listener)) {
        return;
    }
    listeners.add(listener);
    listener.onChanged(this);
}
 
开发者ID:wex5,项目名称:dangchat-sdk,代码行数:16,代码来源:UserVM.java


示例15: findAllPhotos

import com.google.j2objc.annotations.ObjectiveCName; //导入依赖的package包/类
/**
 * Finding all messages with photos
 *
 * @param peer peer for search
 * @return found messages
 */
@ObjectiveCName("findAllPhotosWithPeer:")
public Command<List<MessageSearchEntity>> findAllPhotos(Peer peer) {
    return callback -> modules.getSearchModule().findAllPhotos(peer)
            .then(v -> callback.onResult(v))
            .failure(e -> callback.onError(e));
}
 
开发者ID:wex5,项目名称:dangchat-sdk,代码行数:13,代码来源:Messenger.java


示例16: setPhoneBookProvider

import com.google.j2objc.annotations.ObjectiveCName; //导入依赖的package包/类
/**
 * Set Phone Book provider
 *
 * @param phoneBookProvider phone book provider
 * @return this
 */
@NotNull
@ObjectiveCName("setPhoneBookProvider:")
public ConfigurationBuilder setPhoneBookProvider(@NotNull PhoneBookProvider phoneBookProvider) {
    this.phoneBookProvider = phoneBookProvider;
    return this;
}
 
开发者ID:wex5,项目名称:dangchat-sdk,代码行数:13,代码来源:ConfigurationBuilder.java


示例17: makeAdmin

import com.google.j2objc.annotations.ObjectiveCName; //导入依赖的package包/类
/**
 * Make member admin of group
 *
 * @param gid group's id
 * @param uid user's id
 * @return Command for execution
 */
@Nullable
@ObjectiveCName("makeAdminCommandWithGid:withUid:")
public Command<Void> makeAdmin(final int gid, final int uid) {
    return callback -> modules.getGroupsModule().makeAdmin(gid, uid)
            .then(v -> callback.onResult(v))
            .failure(e -> callback.onError(e));
}
 
开发者ID:wex5,项目名称:dangchat-sdk,代码行数:15,代码来源:Messenger.java


示例18: findAllDocs

import com.google.j2objc.annotations.ObjectiveCName; //导入依赖的package包/类
/**
 * Finding all doc messages
 *
 * @param peer peer for search
 * @return found messages
 */
@ObjectiveCName("findAllDocsWithPeer:")
public Command<List<MessageSearchEntity>> findAllDocs(Peer peer) {
    return callback -> modules.getSearchModule().findAllDocs(peer)
            .then(v -> callback.onResult(v))
            .failure(e -> callback.onError(e));
}
 
开发者ID:wex5,项目名称:dangchat-sdk,代码行数:13,代码来源:Messenger.java


示例19: getWindows

import com.google.j2objc.annotations.ObjectiveCName; //导入依赖的package包/类
@ObjectiveCName("getWindowsWithPage:num:callback:")
void getWindows(int page, int num, Callback<List<Window>> callback);
 
开发者ID:Piasy,项目名称:JavaUniverse,代码行数:3,代码来源:DataSource.java


示例20: onSuccess

import com.google.j2objc.annotations.ObjectiveCName; //导入依赖的package包/类
@ObjectiveCName("onSuccess:")
void onSuccess(D data);
 
开发者ID:Piasy,项目名称:JavaUniverse,代码行数:3,代码来源:DataSource.java



注:本文中的com.google.j2objc.annotations.ObjectiveCName类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PortletURLFactoryUtil类代码示例发布时间:2022-05-23
下一篇:
Java DateTimeField类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap