ブラックベリーのポップアップ画面に白枠をつけたいです。このコードを使用して境界線を追加します
Popup x = new Popup();
Border borderFocus = BorderFactory.createRoundedBorder(new XYEdges(10, 10, 10, 10), 0xffffff, Border.STYLE_SOLID);
x.getDelegate().setBorder(borderFocus);
///////////////////クラスのポップアップ////////////////////
public class Popup extends PopupScreen {
public Popup() {
super(new VerticalFieldManager(), Field.FOCUSABLE);
HorizontalFieldManager hfm = new HorizontalFieldManager(
Field.USE_ALL_WIDTH | FIELD_VCENTER);
HorizontalFieldManager hfmBtn = new HorizontalFieldManager(
Field.USE_ALL_WIDTH | FIELD_VCENTER | FIELD_HCENTER);
LabelField title_screen = new LabelField("ddd");
title_screen.setPadding(11, 5, 0, 0);
hfm.add(title_screen);
add(hfm);
add(new SeparatorField());
add(new LabelField(""));
final LabelField labelVersion = new LabelField("ffffffffffffff");
ButtonField btn_cancel = new ButtonField(
"cancel");
ButtonField btn_ok = new ButtonField("Yes");
btn_ok.setPadding(0, 0, 0, 60);
add(labelVersion);
hfmBtn.add(btn_cancel);
hfmBtn.add(btn_ok);
add(new LabelField(""));
add(hfmBtn);
}
public void sublayout(int width, int height){
super.sublayout(width,height);
setPosition(35,65);
}
public boolean onClose() {
UiApplication.getUiApplication().popScreen();
return true;
}
しかし、私は境界線をポップアップに入れますが、ポップアップのウィンドウには白い境界線はありません。