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


Java HorizontalFieldManager.setPadding方法代码示例

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


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

示例1: NewChatDialog

import net.rim.device.api.ui.container.HorizontalFieldManager; //导入方法依赖的package包/类
public NewChatDialog() {
    super(new VerticalFieldManager());
    setFont(Fonts.narrow(6));

    writeToFriend = new CompoundButtonField(
            tr(VikaResource.Write_to_friend), WRITE_TO_FRIEND_BITMAP);
    createChat = new CompoundButtonField(tr(VikaResource.Create_chat), CREATE_CHAT_BITMAP);

    writeToFriend.setChangeListener(this);
    createChat.setChangeListener(this);

    HorizontalFieldManager hfm = new HorizontalFieldManager();
    hfm.setPadding(DP2, DP2, DP2, DP2);

    hfm.add(writeToFriend);
    hfm.add(createChat);

    add(hfm);

    setBackground(new NinePatchBackground("Convs/AttachesMenu/Bg.png"));
}
 
开发者ID:yanex,项目名称:vika,代码行数:22,代码来源:NewChatDialog.java

示例2: AttachmentDialog

import net.rim.device.api.ui.container.HorizontalFieldManager; //导入方法依赖的package包/类
public AttachmentDialog() {
    super(new VerticalFieldManager());
    setFont(Fonts.narrow(6));

    camera = new CompoundButtonField(tr(VikaResource.Take_photo), ICON_CAMERA);
    photo = new CompoundButtonField(tr(VikaResource.Choose_existing_photo), ICON_PHOTO);
    map = new CompoundButtonField(tr(VikaResource.Share_location), ICON_MAP);

    camera.setChangeListener(this);
    photo.setChangeListener(this);
    map.setChangeListener(this);

    HorizontalFieldManager hfm = new HorizontalFieldManager();
    hfm.setPadding(DP2, DP2, DP2, DP2);

    hfm.add(camera);
    hfm.add(photo);
    hfm.add(map);

    add(hfm);

    setBackground(new NinePatchBackground("Convs/AttachesMenu/Bg.png"));
}
 
开发者ID:yanex,项目名称:vika,代码行数:24,代码来源:AttachmentDialog.java

示例3: init

import net.rim.device.api.ui.container.HorizontalFieldManager; //导入方法依赖的package包/类
private void init() {
    setMargin(DP1, 0, DP1, 0);

    root = new HorizontalFieldManager();
    vfmMain = new VerticalFieldManager();

    root.setPadding(0, 0, 0, DP3);

    photo = new AutoLoadingBitmapField(new XYDimension(DP10, DP10), 0,
            true);
    photo.setPadding(0, DP2, 0, 0);

    name = new CustomLabelField("", 0, BLACK_THEME);
    date = new CustomLabelField("", 0, GRAY_THEME);

    name.setFont(Fonts.bold(6));
    date.setFont(Fonts.narrow(5));

    text = new TextField("", 0);
}
 
开发者ID:yanex,项目名称:vika,代码行数:21,代码来源:ForwardedMessageItem.java

示例4: ConversationScreenGui

import net.rim.device.api.ui.container.HorizontalFieldManager; //导入方法依赖的package包/类
public ConversationScreenGui(final ConversationScreen screen, User user, Chat chat) {
    screen.addMenuItem(new SendMenuItem(screen));

    title = user != null ?
            new VkConversationTitleField(user) : new VkConversationTitleField(chat);

    list = new List(List.MODE_INVERT);
    list.setOwner(screen);
    list.setListener(screen);
    list.setSeparatorHeight(0);
    list.setSeparatorColor(0xFFFFFF);

    Background bgb = BackgroundFactory.createSolidBackground(0xdfe4ee);

    screen.getMainManager().setBackground(bgb);
    screen.setBackground(bgb);

    bottom = new VerticalFieldManager(Field.USE_ALL_WIDTH);

    bottomTypingWrapper = new VerticalFieldManager(Field.USE_ALL_WIDTH);
    bottomTypingWrapper.setBackground(bgb);

    Theme typingTheme = new Theme();
    typingTheme.setPrimaryColor(0x718aa0);
    bottomTyping = new CustomLabelField("", 0, typingTheme);
    bottomTyping.setMargin(DP2, DP2, DP2, DP2);

    bottomText = new HorizontalFieldManager(Field.USE_ALL_WIDTH);
    Background inputBg = new NinePatchBackground(R.instance.getNinepatch("Convs/InputBg.png"));
    bottomText.setBackground(inputBg);

    bottomLoading = new VerticalFieldManager(Field.USE_ALL_WIDTH);
    bottomLoading.setBackground(inputBg);
    bottomLoadingText = new VkLabelField(tr(VikaResource.Uploading_images) + "...", Field.FIELD_HCENTER);
    bottomLoading.add(bottomLoadingText);

    addAttachments = new ImageSelectorField(addAttachmentsDefault,
            addAttachmentsFocus,
            addAttachmentsActive,
            addAttachmentsActive, DP10, DP10,
            Field.FIELD_VCENTER, ATTACH_BUTTON_THEME, false);

    insertEmoji = new ImageButtonField(Emoticons.instance.getByHexString("D83DDE0A"),
            DP10, DP10, Field.FIELD_VCENTER,
            ATTACH_BUTTON_THEME, false);

    text = new EditTextField(Field.FIELD_VCENTER | TextField.JUMP_FOCUS_AT_END, TEXT_THEME);

    text.setHint(tr(VikaResource.Write_message));

    bottomContextWrapper = new HorizontalFieldManager(Field.USE_ALL_WIDTH);
    bottomContextWrapper.setBackground(inputBg);
    bottomContextWrapper.setPadding(DP2, DP2, DP2, DP2);
    bottomContext = new RightFieldManager();

    contextCancel = new ButtonField(tr(VikaResource.Cancel), 0, CANCEL_THEME);
    contextForward = new ButtonField(tr(VikaResource.Forward_F), Field.FIELD_RIGHT, FORWARD_THEME);
    contextDelete = new ButtonField(tr(VikaResource.Delete_D), Field.FIELD_RIGHT, DELETE_THEME);

    bottomAttachments = new HorizontalFieldManager(Field.USE_ALL_WIDTH | Manager.HORIZONTAL_SCROLL);

    Background bottomAttachmentsBg = new NinePatchBackground("Convs/Attaches/Bg.png");
    bottomAttachments.setBackground(bottomAttachmentsBg);

    add(screen);
    setListeners(screen);
}
 
开发者ID:yanex,项目名称:vika,代码行数:68,代码来源:ConversationScreenGui.java

示例5: MessageViewScreenGui

import net.rim.device.api.ui.container.HorizontalFieldManager; //导入方法依赖的package包/类
public MessageViewScreenGui(final VkMainScreen screen) {
    screen.setFont(Fonts.defaultFont);
    screen.getMainManager().setBackground(INNER_BG);

    outerLayout = new VerticalFieldManager(Field.FIELD_HCENTER);
    outerLayout.setBackground(OUTER_BG);
    outerLayout.setMargin(DP3, DP8, DP3, DP8);

    mainLayout = new VerticalFieldManager();
    mainLayout.setPadding(DP2, DP2, DP2, DP2);
    outerLayout.add(mainLayout);

    VkCompactTitleField title = new VkCompactTitleField(tr(VikaResource.View_message));

    photo = new AutoLoadingBitmapField(new XYDimension(DP14, DP14), 0, true);
    photo.setMargin(0, DP2, 0, 0);

    name = new CustomLabelField("", 0, BLACK_THEME);
    name.setFont(Fonts.bold(7));

    time = new CustomLabelField("", 0, GRAY_THEME);
    time.setFont(Fonts.narrow(6));

    text = new TextField("", 0);
    text.setColor(0x4f7ca3);

    activeText = new ActiveRichTextField("");

    VerticalFieldManager nameLayout = new VerticalFieldManager();
    nameLayout.add(name);
    nameLayout.add(time);

    HorizontalFieldManager topLayout = new HorizontalFieldManager(Field.USE_ALL_WIDTH);
    topLayout.setBackground(BackgroundFactory.createSolidBackground(0xefefef));
    topLayout.setPadding(DP1, DP2, DP1, DP2);
    topLayout.add(photo);
    topLayout.add(nameLayout);

    VerticalFieldManager banner = new VerticalFieldManager();
    banner.add(title);
    banner.add(topLayout);
    screen.setBanner(banner);
}
 
开发者ID:yanex,项目名称:vika,代码行数:44,代码来源:MessageViewScreenGui.java


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