// @Override
public void actionPerformed(com.sun.star.awt.ActionEvent actionEvent)
{
// bStopProcess = true;
XControlModel xModel = (XControlModel)UnoDialog2.getModel(actionEvent.Source);
PropertySetHelper aHelper = new PropertySetHelper(xModel);
int nState = aHelper.getPropertyValueAsInteger(PropertyNames.PROPERTY_STATE, -1);
if (nState == 0)
{
// this will avoid a wrong state, if already pressed.
aHelper.setPropertyValueDontThrow(PropertyNames.PROPERTY_STATE, Short.valueOf((short)1));
}
// check which Button is pressed.
String sControlName = aHelper.getPropertyValueAsString(PropertyNames.PROPERTY_NAME, PropertyNames.EMPTY_STRING);
final String sButton = sControlName.substring(7 + m_aControlName.length());
int nButton = Integer.parseInt(sButton);
// int image = getImageFromEvent(event);
int index = getIndexFor(nButton);