final MosaicPanel toolBox = new MosaicPanel();
toolBox.setPadding(0);
toolBox.setWidgetSpacing(0);
toolBox.setLayout(new BoxLayout(BoxLayout.Orientation.HORIZONTAL));
final ToolBar toolBar = new ToolBar();
toolBar.add(
new Button("Refresh", new ClickHandler() {
public void onClick(ClickEvent clickEvent)
{
reset();
// force loading
controller.handleEvent(
new Event(UpdateDeploymentsAction.ID, null)
);
}
}
)
);
Button deleteBtn = new Button("Delete", new ClickHandler()
{
public void onClick(ClickEvent clickEvent)
{
DeploymentRef deploymentRef = getSelection();
if (deploymentRef != null)
{
MessageBox.confirm("Delete deployment",
"Do you want to delete this deployment? Any related data will be removed.",
new MessageBox.ConfirmationCallback()
{
public void onResult(boolean doIt)
{
if (doIt)
{
controller.handleEvent(
new Event(
DeleteDeploymentAction.ID,
getSelection().getId()
)
);
}
}
});
}
else
{
MessageBox.alert("Missing selection", "Please select a deployment");
}
}
}
);
if(!isRiftsawInstance)
toolBar.add(deleteBtn);
toolBox.add(toolBar, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
// filter
MosaicPanel filterPanel = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));