LayoutPanel formPanel = new LayoutPanel();
formPanel.getElement().setAttribute("style", "padding:15px;");
final ToolStrip toolStrip = new ToolStrip();
final ToolButton edit = new ToolButton("Edit");
edit.addClickHandler(new ClickHandler(){
@Override
public void onClick(ClickEvent clickEvent) {
if(edit.getText().equals("Edit"))
{
}
else
{
}
}
});
toolStrip.addToolButton(edit);
ToolButton delete = new ToolButton("Delete");
delete.addClickHandler(new ClickHandler(){
@Override
public void onClick(ClickEvent clickEvent) {
Feedback.confirm(
"Delete Deployment",
"Do you want to delete this deployment?",
new Feedback.ConfirmationHandler()
{
@Override
public void onConfirmation(boolean isConfirmed) {
if(isConfirmed)
{
SingleSelectionModel<DeploymentRecord> selectionModel = (SingleSelectionModel) deploymentTable.getSelectionModel();
presenter.deleteDeployment(
selectionModel.getSelectedObject()
);
}
}
});
}
});
toolStrip.addToolButton(delete);
formPanel.add(toolStrip);
formPanel.setWidgetTopHeight(toolStrip, 0, Style.Unit.PX, 30, Style.Unit.PX);
form = new Form<DeploymentRecord>(DeploymentRecord.class);