Gwt 通过单击子面板中的按钮关闭弹出面板
我有以下面板层次结构: 自定义面板1包含PopupPanel包含DecklayoutPanel包含自定义面板2包含流程面板包含按钮 如何通过单击按钮关闭自定义面板1或PopupPanel?/CustomPanel 2Gwt 通过单击子面板中的按钮关闭弹出面板,gwt,popuppanel,Gwt,Popuppanel,我有以下面板层次结构: 自定义面板1包含PopupPanel包含DecklayoutPanel包含自定义面板2包含流程面板包含按钮 如何通过单击按钮关闭自定义面板1或PopupPanel?/CustomPanel 2 class CustomPanel2 { @UiField Button closeButton; public CustomPanel2() { initWidget(uiBinder.createAndBindUi(this)); } public
class CustomPanel2 {
@UiField Button closeButton;
public CustomPanel2() {
initWidget(uiBinder.createAndBindUi(this));
}
public HasClickHandlers closeButton() {
return closeButton;
}
}
//客户小组1
class CustomPanel1 implements ClickHandler {
@UiField PopupPanel myPopupPanel;
@UiField CustomPanel2 customPanel2;
public CustomPanel1() {
initWidget(uiBinder.createAndBindUi(this));
customPanel2.closeButton().addClickHandler(this);
}
@Override
public void onClick(ClickEvent e) {
myPopupPanel.hide();
}
}
//客户小组2
class CustomPanel2 {
@UiField Button closeButton;
public CustomPanel2() {
initWidget(uiBinder.createAndBindUi(this));
}
public HasClickHandlers closeButton() {
return closeButton;
}
}
//客户小组1
class CustomPanel1 implements ClickHandler {
@UiField PopupPanel myPopupPanel;
@UiField CustomPanel2 customPanel2;
public CustomPanel1() {
initWidget(uiBinder.createAndBindUi(this));
customPanel2.closeButton().addClickHandler(this);
}
@Override
public void onClick(ClickEvent e) {
myPopupPanel.hide();
}
}