1 11 package org.eclipse.team.internal.ui.synchronize; 12 13 import org.eclipse.jface.dialogs.Dialog; 14 import org.eclipse.osgi.util.NLS; 15 import org.eclipse.swt.widgets.Composite; 16 import org.eclipse.swt.widgets.Shell; 17 import org.eclipse.team.internal.ui.*; 18 import org.eclipse.team.internal.ui.dialogs.DetailsDialog; 19 20 25 public class ConfigureRefreshScheduleDialog extends DetailsDialog { 26 27 private ConfigureSynchronizeScheduleComposite scheduleComposite; 28 private SubscriberRefreshSchedule schedule; 29 30 public ConfigureRefreshScheduleDialog(Shell parentShell, SubscriberRefreshSchedule schedule) { 31 super(parentShell, NLS.bind(TeamUIMessages.ConfigureRefreshScheduleDialog_0, new String [] { Utils.getTypeName(schedule.getParticipant()) })); 32 this.schedule = schedule; 33 } 34 35 38 protected void createMainDialogArea(Composite parent) { 39 IPageValidator validator = new IPageValidator() { 40 public void setComplete(String errorMessage) { 41 setPageComplete(errorMessage == null); 42 setErrorMessage(errorMessage); 43 } 44 }; 45 scheduleComposite = new ConfigureSynchronizeScheduleComposite(parent, schedule, validator); 46 Dialog.applyDialogFont(parent); 47 } 48 49 52 protected void okPressed() { 53 scheduleComposite.saveValues(); 54 super.okPressed(); 55 } 56 57 60 protected boolean includeDetailsButton() { 61 return false; 62 } 63 64 67 protected Composite createDropDownDialogArea(Composite parent) { 68 return null; 69 } 70 71 74 protected void updateEnablements() { 75 } 76 77 protected String getHelpContextId() { 78 return IHelpContextIds.CONFIGURE_REFRESH_SCHEDULE_DIALOG; 79 } 80 } 81 | Popular Tags |