本文整理汇总了Java中net.rim.device.api.ui.container.HorizontalFieldManager类的典型用法代码示例。如果您正苦于以下问题:Java HorizontalFieldManager类的具体用法?Java HorizontalFieldManager怎么用?Java HorizontalFieldManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
HorizontalFieldManager类属于net.rim.device.api.ui.container包,在下文中一共展示了HorizontalFieldManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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"));
}
示例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"));
}
示例3: FileItem
import net.rim.device.api.ui.container.HorizontalFieldManager; //导入依赖的package包/类
public FileItem(FileSystemObject fso) {
this.fso = fso;
Pair bitmaps = fetchBitmaps(fso);
bitmapNormal = (Bitmap) bitmaps.first;
bitmapHover = (Bitmap) bitmaps.second;
label = new CustomLabelField(
(fso == null) ? tr(VikaResource.Back) : fso.displayName,
DrawStyle.ELLIPSIS | Field.FIELD_VCENTER, THEME);
icon = new ImageField(bitmapNormal, DP12, DP12, Field.FIELD_VCENTER, false);
HorizontalFieldManager hfm = new HorizontalFieldManager();
hfm.add(icon);
hfm.add(label);
add(hfm);
addingCompleted();
}
示例4: 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);
}
示例5: DisplayStory
import net.rim.device.api.ui.container.HorizontalFieldManager; //导入依赖的package包/类
DisplayStory(EncodedImage original, Bitmap img, UiApplication app, int time) {
_original = original;
int direction = Display.DIRECTION_NORTH;
Ui.getUiEngineInstance().setAcceptableDirections(direction);
monApp = app;
_img = img;
//this.setTitle(Caption);
this.addMenuItem(_ScreenShootitem);
this.addMenuItem(_Nextstoryitem);
this.addMenuItem(_EndStoryitem);
// afficher l'image.
HorizontalFieldManager SnapManager = new HorizontalFieldManager();
bmp = new BitmapField();
SnapManager.add(bmp);
this.add(SnapManager);
t = new Timer();
t.schedule(new Chronometer(time, img), 0, 1000);
}
示例6: DisplaySnap
import net.rim.device.api.ui.container.HorizontalFieldManager; //导入依赖的package包/类
DisplaySnap(EncodedImage original, Bitmap img, int time, UiApplication app, JSONObject Current, String key) {
_original = original;
int direction = Display.DIRECTION_NORTH;
Ui.getUiEngineInstance().setAcceptableDirections(direction);
monApp = app;
_img = img;
_Current = Current;
_key = key;
// afficher l'image.
this.addMenuItem(_ScreenShootitem);
HorizontalFieldManager SnapManager = new HorizontalFieldManager();
bmp = new BitmapField();
SnapManager.add(bmp);
this.add(SnapManager);
t = new Timer();
t.schedule(new Chronometer(time, img), 0, 1000);
}
示例7: CheckCodeScreen
import net.rim.device.api.ui.container.HorizontalFieldManager; //导入依赖的package包/类
public CheckCodeScreen(String user) {
mUser = user;
setTitle(sResources.getString(CHECK_CODE_TITLE));
mCheckCodeTextView = new RichTextField();
mCheckCodeTextView.setText(sResources.getString(CHECK_CODE));
mCodeArea = new HorizontalFieldManager(FIELD_HCENTER);
Bitmap bitmap = Bitmap.getBitmapResource("ic_lock_lock.png");
BitmapField icon = new BitmapField(bitmap, FIELD_VCENTER);
mCodeTextView = new LabelField("", FIELD_VCENTER);
mCodeArea.add(icon);
mCodeArea.add(mCodeTextView);
ApplicationDescriptor applicationDescriptor = ApplicationDescriptor
.currentApplicationDescriptor();
String version = applicationDescriptor.getVersion();
mVersionText = new LabelField(version, FIELD_RIGHT | FIELD_BOTTOM);
add(mCheckCodeTextView);
add(mCodeArea);
add(mVersionText);
}
示例8: V
import net.rim.device.api.ui.container.HorizontalFieldManager; //导入依赖的package包/类
public V() {
root = new HorizontalFieldManager(message.isOut() ? Field.FIELD_RIGHT : 0);
roof = new VerticalFieldManager();
MessageItem.this.add(roof);
hfmLeft = new HorizontalFieldManager(Field.FIELD_BOTTOM);
balloonOutside = new MaxWidthVerticalFieldManager();
balloon = new BalloonFieldManager();
hfmRight = new HorizontalFieldManager(Field.FIELD_BOTTOM);
balloonOutside.add(balloon);
text = new TextField();
date = new SimpleLabelField("", Field.FIELD_VCENTER, MessageItem.DATE_THEME);
topTextLabel = new CustomLabelField("ABC", Field.USE_ALL_WIDTH | DrawStyle.HCENTER,
MessageItem.DATE_THEME);
topTextLabel.setMargin(MessageItem.px(1), 0, MessageItem.px(1), 0);
topTextLabel.setFont(Fonts.defaultFont);
delivered = new ImageField(null, MessageItem.px(8), MessageItem.px(8), Field.FIELD_VCENTER);
userIcon = new AutoLoadingBitmapField(new XYDimension(DP10, DP10),
Field.FIELD_VCENTER, true);
}
示例9: item
import net.rim.device.api.ui.container.HorizontalFieldManager; //导入依赖的package包/类
item(EncodedImage img) {
super(Manager.FIELD_HCENTER);
HorizontalFieldManager Hmf = new HorizontalFieldManager(Field.FIELD_HCENTER);
Hmf.add(new BitmapField(img.getBitmap(),Field.FIELD_VCENTER));
Hmf.add(box);
this.add(Hmf);
}
示例10: 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);
}
示例11: 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);
}
示例12: loadButtons
import net.rim.device.api.ui.container.HorizontalFieldManager; //导入依赖的package包/类
private void loadButtons() {
int width = Display.getWidth();
/*
* if (Device.isBold()) { width = Display.getWidth(); } else { width =
* Math.min(Display.getWidth(), Display.getHeight()); }
*/
width -= getPaddingLeft() + getPaddingRight();
Bitmap messagesDefault = R.instance.getBitmap(Files.TABS_MESSAGES_NOTACTIVE);
Bitmap messagesHover = R.instance.getBitmap(Files.TABS_MESSAGES_HOVER);
Bitmap messagesActive = R.instance.getBitmap(Files.TABS_MESSAGES_ACTIVE);
Bitmap frendsDefault = R.instance.getBitmap(Files.TABS_FRIENDS_NOTACTIVE);
Bitmap frendsHover = R.instance.getBitmap(Files.TABS_FRIENDS_HOVER);
Bitmap frendsActive = R.instance.getBitmap(Files.TABS_FRIENDS_ACTIVE);
Bitmap searchDefault = R.instance.getBitmap(Files.TABS_SEARCH_NOTACTIVE);
Bitmap searchHover = R.instance.getBitmap(Files.TABS_SEARCH_HOVER);
Bitmap searchActive = R.instance.getBitmap(Files.TABS_SEARCH_ACTIVE);
Bitmap settingsDefault = R.instance.getBitmap(Files.TABS_SETTINGS_NOTACTIVE);
Bitmap settingsHover = R.instance.getBitmap(Files.TABS_SETTINGS_HOVER);
Bitmap settingsActive = R.instance.getBitmap(Files.TABS_SETTINGS_ACTIVE);
Bitmap writeDefault = R.instance.getBitmap(Files.TABS_WRITE_NOTACTIVE);
Bitmap writeHover = R.instance.getBitmap(Files.TABS_WRITE_HOVER);
Bitmap writeActive = R.instance.getBitmap(Files.TABS_WRITE_ACTIVE);
int buttonHeight = px(12);
int buttonWidth = width / 5;
messages = new ImageSelectorField(messagesDefault, messagesHover, messagesActive,
messagesActive, buttonWidth, buttonHeight, 0, VkToolbar.buttonTheme, false);
current = messages;
current.select();
messages.setFocusListener(this);
messages.setChangeListener(this);
friends = new ImageSelectorField(frendsDefault, frendsHover, frendsActive, frendsActive,
buttonWidth, buttonHeight, 0, VkToolbar.buttonTheme, false);
friends.setFocusListener(this);
friends.setChangeListener(this);
search = new ImageSelectorField(searchDefault, searchHover, searchActive, searchActive,
buttonWidth, buttonHeight, 0, VkToolbar.buttonTheme, false);
search.setFocusListener(this);
search.setChangeListener(this);
settings = new ImageSelectorField(settingsDefault, settingsHover, settingsActive,
settingsActive, buttonWidth, buttonHeight, 0, VkToolbar.buttonTheme, false);
settings.setFocusListener(this);
settings.setChangeListener(this);
write = new ImageSelectorField(writeDefault, writeHover, writeActive, writeActive, buttonWidth,
buttonHeight, 0, VkToolbar.buttonTheme, false);
write.setFocusListener(this);
write.setChangeListener(this);
HorizontalFieldManager hfm = new HorizontalFieldManager(Field.FIELD_HCENTER);
hfm.add(messages);
hfm.add(friends);
hfm.add(search);
hfm.add(settings);
hfm.add(write);
add(hfm);
}
示例13: FriendSelector
import net.rim.device.api.ui.container.HorizontalFieldManager; //导入依赖的package包/类
FriendSelector(JSONObject Current, UiApplication app) {
int direction = Display.DIRECTION_NORTH;
Ui.getUiEngineInstance().setAcceptableDirections(direction);
this.setTitle(" CrapSnap - Select Receiver...");
Bitmap back = EncodedImage.getEncodedImageResource("Back.jpg")
.getBitmap();
this.setBackground(BackgroundFactory.createBitmapBackground(back));
monApp = app;
Send.setChangeListener(new FieldChangeListener() {
public void fieldChanged(Field field, int context) {
exitbol = false;
if (CheckBox.getChecked() == true) {
storybol = true;
}
quit();
}
});
String[] names;
try {
JSONArray friends = Current.getJSONArray("friends");
names = new String[friends.length()];
for (int i = 0; i < friends.length(); i++) {
JSONObject friend = friends.getJSONObject(i);
names[i] = friend.getString("name");
}
Comparator strComparator = new Comparator() {
public int compare(Object o1, Object o2) {
return o1.toString().compareTo(o2.toString());
}
};
Arrays.sort(names, strComparator);
for (int i = 0; i < names.length; i++) {
ListManager.add(new FriendSelectorObject(names[i]));
ListManager.add(new SeparatorField());
}
} catch (JSONException e) {
e.printStackTrace();
}
this.addMenuItem(AddMenuItem);
this.addMenuItem(CancelMenuItem);
BtnManager.add(Send);
MainManager.add(ListManager);
HorizontalFieldManager StoryManager = new HorizontalFieldManager();
CheckBox.setFont(CheckBox.getFont().derive(Font.BOLD, 9, Ui.UNITS_pt));
StoryManager.add(new LabelField(" "));
StoryManager.add(CheckBox);
MainManager.add(StoryManager);
MainManager.add(BtnManager);
this.add(MainManager);
}
示例14: Factory
import net.rim.device.api.ui.container.HorizontalFieldManager; //导入依赖的package包/类
public Manager Factory(Object[] arg, boolean isupdated) {
int i = 0;
boolean textfielded = false;
ListManager Main = new ListManager();
Main.arg = arg;
HorizontalFieldManager Head = new HorizontalFieldManager();
VerticalFieldManager Label = new VerticalFieldManager();
VerticalFieldManager Description = new VerticalFieldManager();
if (_imageSpaceUsed == true) {
Head.add(new BitmapField((Bitmap) arg[0]));
i = i + 1;
}
for (int j = 0; j < _numberOfLabelFields; j++) {
if (textfielded == false){
LabelField txt = new LabelField((String) arg[i] + " ",Field.FOCUSABLE);
Label.add(txt);
textfielded = true;
} else {
Label.add(new LabelField((String) arg[i], LabelField.ELLIPSIS));
}
i = i +1;
}
Head.add(Label);
Main.add(Head);
for (int k = 0; k < _numberOfDescriptionFields; k++) {
Description.add(new LabelField((String) arg[i]));
i = i+1;
}
Main.add(Description);
if (isupdated == false){
if (alternened == true){
Main.setBackground(BackgroundFactory.createSolidBackground(Color.IVORY));
alternened = false;
} else {
Main.setBackground(BackgroundFactory.createSolidBackground(Color.WHITE));
alternened = true;
}
}else {
Main.setBackground(BackgroundFactory.createSolidBackground(Color.ANTIQUEWHITE));
}
if (_Separator == true) Main.add(new SeparatorField());
return Main;
}
示例15: EnterKeyScreen
import net.rim.device.api.ui.container.HorizontalFieldManager; //导入依赖的package包/类
public EnterKeyScreen() {
setTitle(sResources.getString(ENTER_KEY_TITLE));
VerticalFieldManager manager = new VerticalFieldManager();
mDescriptionText = new LabelField(sResources.getString(ENTER_KEY_HELP));
mAccountName = new EditField(EditField.NO_NEWLINE);
mAccountName.setLabel(sResources.getString(ENTER_ACCOUNT_LABEL));
mKeyEntryField = new EditField(EditField.NO_NEWLINE);
mKeyEntryField.setLabel(sResources.getString(ENTER_KEY_LABEL));
mType = new ObjectChoiceField(sResources.getString(TYPE_PROMPT), OtpType
.values());
mStatusText = new LabelField() {
protected void paint(Graphics graphics) {
int savedColor = graphics.getColor();
graphics.setColor(mStatusColor);
super.paint(graphics);
graphics.setColor(savedColor);
}
};
mKeyEntryField.setChangeListener(this);
manager.add(mDescriptionText);
manager.add(new LabelField()); // Spacer
manager.add(mAccountName);
manager.add(mKeyEntryField);
manager.add(mStatusText);
manager.add(mType);
HorizontalFieldManager buttons = new HorizontalFieldManager(FIELD_HCENTER);
mSubmitButton = new ButtonField(sResources.getString(SUBMIT),
ButtonField.CONSUME_CLICK);
mClearButton = new ButtonField(sResources.getString(CLEAR),
ButtonField.CONSUME_CLICK);
mCancelButton = new ButtonField(sResources.getString(CANCEL),
ButtonField.CONSUME_CLICK);
mSubmitButton.setChangeListener(this);
mClearButton.setChangeListener(this);
mCancelButton.setChangeListener(this);
buttons.add(mSubmitButton);
buttons.add(mClearButton);
buttons.add(mCancelButton);
ApplicationDescriptor applicationDescriptor = ApplicationDescriptor
.currentApplicationDescriptor();
String version = applicationDescriptor.getVersion();
mVersionText = new LabelField(version, FIELD_RIGHT | FIELD_BOTTOM);
add(manager);
add(buttons);
add(mVersionText);
}