Disabling Commands at Runtime under Writing UNO Components

hi all,
i want to implement Disable Commands - Apache OpenOffice Wiki
Disabling Commands at Runtime under Writing UNO Components
i am not able to understand how to implement it
can any one help please

A complete implementation example is provided on the page you sited. As suggested by the example, implementation is not simple. To understand the example and how to make use of it requires ability to interpret Java (in which the example is written) and knowledge of the LibreOffice API. Unfortunately, it can’t be explained briefly. (Note that the example’s left edge is clipped; the complete example is available on pages 434-439 of https://wiki.openoffice.org/w/images/d/d9/DevelopersGuide_OOo3.1.0.pdf)