1 11 package org.eclipse.ui.forms; 12 21 public abstract class AbstractFormPart implements IFormPart { 22 private IManagedForm managedForm; 23 private boolean dirty = false; 24 private boolean stale = true; 25 28 public void initialize(IManagedForm form) { 29 this.managedForm = form; 30 } 31 36 public IManagedForm getManagedForm() { 37 return managedForm; 38 } 39 43 public void dispose() { 44 } 45 52 public void commit(boolean onSave) { 53 dirty = false; 54 } 55 63 public boolean setFormInput(Object input) { 64 return false; 65 } 66 69 public void setFocus() { 70 } 71 75 public void refresh() { 76 stale = false; 77 dirty = false; 80 } 81 85 public void markDirty() { 86 dirty = true; 87 managedForm.dirtyStateChanged(); 88 } 89 96 public boolean isDirty() { 97 return dirty; 98 } 99 106 public boolean isStale() { 107 return stale; 108 } 109 114 public void markStale() { 115 stale = true; 116 managedForm.staleStateChanged(); 117 } 118 } 119 | Popular Tags |