1 11 12 package org.eclipse.ui; 13 14 import java.util.EventObject ; 15 16 17 22 public class SaveablesLifecycleEvent extends EventObject { 23 24 30 private static final long serialVersionUID = -3530773637989046452L; 31 32 35 public static final int POST_OPEN = 1; 36 37 41 public static final int PRE_CLOSE = 2; 42 43 46 public static final int POST_CLOSE = 3; 47 48 52 public static final int DIRTY_CHANGED = 4; 53 54 private int eventType; 55 56 private Saveable[] saveables; 57 58 private boolean force; 59 60 private boolean veto = false; 61 62 79 public SaveablesLifecycleEvent(Object source, int eventType, 80 Saveable[] saveables, boolean force) { 81 super(source); 82 this.eventType = eventType; 83 this.saveables = saveables; 84 this.force = force; 85 } 86 87 94 public int getEventType() { 95 return eventType; 96 } 97 98 103 public Saveable[] getSaveables() { 104 return saveables; 105 } 106 107 113 public boolean isVeto() { 114 return veto; 115 } 116 117 121 public void setVeto(boolean veto) { 122 this.veto = veto; 123 } 124 125 131 public boolean isForce() { 132 return force; 133 } 134 135 } 136 | Popular Tags |