2
如何放置字段的自定義位置座標經理,而無需使用HorizontalFieldManager或VerticalFieldManager經理,並沒有使用setMargin():自定義位置(兒童)由座標
__________________________________
|manager T T |
| | y1 | |
| | | |
| V | |
| x1 -------------- |y2 |
| <---> | field 1 | | |
| |______________| | |
| | |
| V |
| x2 ------------ |
| <----------> | field 2 | |
| |____________| |
| |
| |
__________________________________
我可以使用代碼類似於:
public static class MyCustomManager extends Manager {
public MyCustomManager() {
super();
}
public void paint(Graphics g) {/**my painting*/super.paint(g);}
protected void sublayout(int width, int height) {
super.sublayout(PLOT, AUKST);
setPositionChild(??,??) //Something like this?
setPosition(??, ??); // or this? how?
setExtent(??, ??);
}
}
非常感謝!
是,黑莓可以通過管理者的子字段列表循環做到這一點。使用setPositionChild(child,x,y)來定位子字段。 – Rupak 2012-01-01 04:31:56