public final class CloseOperationState extends Object
MultiViewElement.canCloseElement()
)
New instances are created by MultiViewFactory.createUnsafeCloseState(java.lang.String, javax.swing.Action, javax.swing.Action)
factory method.Modifier and Type | Field and Description |
---|---|
static CloseOperationState |
STATE_OK
Singleton instance of a close operation state, to be used whenever
MultiViewElement is in consistent state
and can be safely closed. |
Modifier and Type | Method and Description |
---|---|
boolean |
canClose()
The return value denotes wheather the
MultiViewElement can be closed or not. |
String |
getCloseWarningID()
A preferably unique id of the reason why the element cannot be closed.
|
Action |
getDiscardAction()
Action is used when user wants to complete the closing of the component and discard any changes.
|
Action |
getProceedAction()
Action is used when user wants to complete the closing of the component without loosing changed data.
|
public static final CloseOperationState STATE_OK
MultiViewElement
is in consistent state
and can be safely closed.public boolean canClose()
MultiViewElement
can be closed or not.public String getCloseWarningID()
CloseOperationHandler
implementation can use it when deciding about UI shown or action taken.public Action getProceedAction()
CloseOperationHandler
.public Action getDiscardAction()
CloseOperationHandler
.