1 11 package org.eclipse.team.internal.ccvs.ui.sync; 12 import org.eclipse.jface.dialogs.MessageDialog; 13 import org.eclipse.swt.graphics.Image; 14 import org.eclipse.swt.widgets.Composite; 15 import org.eclipse.swt.widgets.Shell; 16 19 public class ToolTipMessageDialog extends MessageDialog { 20 private String [] buttonToolTips; 21 25 public ToolTipMessageDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage, String dialogMessage, int dialogImageType, String [] dialogButtonLabels, String [] buttonToolTips, int defaultIndex) { 26 super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex); 27 this.buttonToolTips = buttonToolTips; 28 } 29 32 protected void createButtonsForButtonBar(Composite parent) { 33 super.createButtonsForButtonBar(parent); 34 if (buttonToolTips != null) { 35 for (int i = 0; i < buttonToolTips.length; i++) { 36 getButton(i).setToolTipText(buttonToolTips[i]); 37 } 38 } 39 } 40 } 41 | Popular Tags |