divを外側の親として使用して、独自の複合ボタンを作成しようとしています。
public class CompoundButton extends ButtonBase {
public CompoundButton() {
super(DOM.createDiv());
}
}
ただし、ButtonBaseのコンストラクターはElementインスタンスを必要としているため、そのDOM.createDiv()呼び出しを使用しています。しかし、この時点で子ウィジェットを追加するにはどうすればよいですか?:
public CompoundButton() {
super(DOM.createDiv()); <-- we're just a div.
// ButtonBase has no "add()" method - but this class is really
// just a div instance, so shouldn't I be able to convert it to
// a FlowPanel for example to be able to add elements to it here?
this.add(new FlowPanel()); <-- not possible, "add()" not available here.
ありがとう