ToolBarHandlerExtension
From OpenKM Documentation
Revision as of 11:36, 3 June 2010 by Jllort (talk | contribs) (Created page with 'Any extension that implements ToolBarHandlerExtension will be watching all events fired from toolbar == Method == onChange(ToolBarEventConstant event) == onChange(ToolBarEvent…')
Any extension that implements ToolBarHandlerExtension will be watching all events fired from toolbar
Method
onChange(ToolBarEventConstant event)
onChange(ToolBarEventConstant event)
Each time it'll be some new toolbar event the method onChange it'll be fired by OpenKM
Example
public class ToolBarButton extends ToolBarButtonExtension implements ToolBarHandlerExtension {
public ToolBarButton(Image image, String title, ClickHandler handler) {
super(image, title, handler);
}
@Override
public void langRefresh() {
if (lang.equals("en-GB")) {
title = "title";
} else {
title = "other title";
}
}
@Override
public void setLang(String code) {
lang = code;
}
@Override
public void checkPermissions(GWTFolder folder, GWTFolder folderParent, int originPanel) {
// TODO Auto-generated method stub
}
@Override
public void checkPermissions(GWTDocument doc, GWTFolder folder) {
// TODO Auto-generated method stub
}
@Override
public void checkPermissions(GWTMail mail, GWTFolder folder) {
// TODO Auto-generated method stub
}
@Override
public void enable(boolean enable) {
// TODO Auto-generated method stub
}
@Override
public boolean isEnabled() {
// TODO Auto-generated method stub
return false;
}
@Override
public void onChange(ToolBarEventConstant event) {
if (event.equals(HasToolBarEvent.EXECUTE_ADD_DOCUMENT)) {
Window.alert("executed add document - " + event.getType());
}
}
}