private void controls() {
ToolbarButton save = new ToolbarButton();
save.setText(constants.SaveChanges());
save.setTooltip(getTip(constants.CommitAnyChangesForThisAsset()));
save.addListener(new ButtonListenerAdapter() {
public void onClick(
com.gwtext.client.widgets.Button button,
EventObject e) {
doCheckinConfirm(button);
}
});
toolbar.addButton(save);
toolbar.addFill();
toolbar.addSeparator();
ToolbarButton copy = new ToolbarButton();
copy.setText(constants.Copy());
copy.setTooltip(constants.CopyThisAsset());
copy.addListener(new ButtonListenerAdapter() {
public void onClick(
com.gwtext.client.widgets.Button button,
EventObject e) {
doCopyDialog(button);
}
});
toolbar.addButton(copy);
ToolbarButton archive = new ToolbarButton();
archive.setText(constants.Archive());
archive.setTooltip(getTip(constants.ArchiveThisAssetThisWillNotPermanentlyDeleteIt()));
archive.addListener(new ButtonListenerAdapter() {
public void onClick(
com.gwtext.client.widgets.Button button,
EventObject e) {
if (Window.confirm(constants.AreYouSureYouWantToArchiveThisItem())) {
archiveAction.doCheckin(constants.ArchivedItemOn() + new java.util.Date().toString());
}
}
});
toolbar.addButton(archive);
if (notCheckedInYet()) {
final ToolbarButton delete = new ToolbarButton();
delete.setText(constants.Delete());
delete.setTooltip(getTip(constants.DeleteAssetTooltip()));
delete.addListener(new ButtonListenerAdapter() {
public void onClick(
com.gwtext.client.widgets.Button button,
EventObject e) {
if (Window.confirm(constants.DeleteAreYouSure()) ) {
deleteAction.execute();
}
}
});
toolbar.addButton(delete);
this.afterCheckinEvent = new Command() {
public void execute() {
delete.setVisible(false);
}
};
}
ToolbarButton stateChange = new ToolbarButton();
stateChange.setText(constants.ChangeStatus());
stateChange.setTooltip(getTip(constants.ChangeStatusTip()));
stateChange.addListener(new ButtonListenerAdapter() {
public void onClick(
com.gwtext.client.widgets.Button button,
EventObject e) {
showStatusChanger(button);
}