Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [subversive-dev] subversive extension

Hi to everybody!

Also I have another problem!

I want to add a third button to DefaultDialog.

 

public class MyDialog extends DefaultDialog implements ICommitDialog{

 

      @Override

      protected void buttonPressed(int buttonId) {

            if (222== buttonId) {

                  showTaskSelectDialog(buttonId);

            } else {

                  if (frame.isVisible()) {

                        frame.setVisible(false);

                        frame.dispose();

                  }

                  super.buttonPressed(buttonId);

            }

      }

protected void createButtonsForButtonBar(Composite parent) {

            super.createButtonsForButtonBar(parent);

            String[] buttonLabels = getButtonLabels();

            Button[] buttons = new Button[buttonLabels.length + 1];

            String[] anotherLabels;

 

            buttons[0] = createButton(parent, 222 "Associate Issues", false);

            for (int i = 0; i < buttonLabels.length; i++) {

                  buttons[i + 1] = getButton(i);

            }

 

            anotherLabels = new String[buttonLabels.length + 1];

            anotherLabels[0] = "MY New Button";

            for (int i = 0; i < buttonLabels.length; i++) {

                  anotherLabels[i + 1] = buttonLabels[i];

            }

 

            super.setButtonLabels(anotherLabels);

            super.setButtons(buttons);

 

      }

}

 

So, in method createButtonsForButtonBar I changed the order of buttons. "MY New Button" must be the first, and another buttons are placed after it. But when I launch this, the order of buttons does not change.

Can anybody tell me what may be the problem?

_________

With best regards,

Andrey Pavlenko

 

**********************************************************************

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

**********************************************************************

 


Back to the top