1 19 20 package org.netbeans.core.spi.multiview; 21 22 import javax.swing.Action ; 23 24 25 30 public final class CloseOperationState { 31 32 36 public static final CloseOperationState STATE_OK = MultiViewFactory.createSafeCloseState(); 37 38 private boolean canClose; 39 private String id; 40 private Action proceedAction; 41 private Action discardAction; 42 43 44 CloseOperationState(boolean close, String warningId, Action proceed, Action discard) { 45 canClose = close; 46 proceedAction = proceed; 47 discardAction = discard; 48 id = warningId; 49 } 50 51 55 56 public boolean canClose() { 57 return canClose; 58 } 59 60 64 65 public String getCloseWarningID() { 66 return id; 67 } 68 69 74 public Action getProceedAction() { 75 return proceedAction; 76 } 77 78 83 84 public Action getDiscardAction() { 85 return discardAction; 86 } 87 88 89 } 90 91 | Popular Tags |