|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openide.windows.CloneableOpenSupport
Simple support for an openable objects.
Can be used either as an OpenCookie
, ViewCookie
, or CloseCookie
,
depending on which cookies the subclass implements.
Inner Class Summary | |
static interface |
CloneableOpenSupport.Env
Abstract interface that is used by CloneableOpenSupport to talk to outside world. |
Field Summary | |
protected CloneableTopComponent.Ref |
allEditors
All opened editors on this file. |
protected CloneableOpenSupport.Env |
env
the environment that provides connection to outside world |
Constructor Summary | |
CloneableOpenSupport(CloneableOpenSupport.Env env)
New support for a given environment. |
Method Summary | |
protected boolean |
canClose()
Should test whether all data is saved, and if not, prompt the user to save. |
boolean |
close()
Closes all components. |
protected boolean |
close(boolean ask)
Closes all opened windows. |
protected abstract CloneableTopComponent |
createCloneableTopComponent()
A method to create a new component. |
void |
edit()
Focuses existing component to view, or if none exists creates new. |
protected abstract String |
messageOpened()
Message to display when an object has been opened. |
protected abstract String |
messageOpening()
Message to display when an object is being opened. |
void |
open()
Focuses existing component to open, or if none exists creates new. |
protected CloneableTopComponent |
openCloneableTopComponent()
Simply open for an editor. |
void |
view()
Focuses existing component to view, or if none exists creates new. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected CloneableOpenSupport.Env env
protected CloneableTopComponent.Ref allEditors
Constructor Detail |
public CloneableOpenSupport(CloneableOpenSupport.Env env)
env
- environment to take all date from/toMethod Detail |
public void open()
OpenCookie.open()
public void view()
open()
.ViewCookie.view()
public void edit()
open()
.ViewCookie.view()
public boolean close()
true
if every component is successfully closed or false
if the user cancelled the requestCloseCookie.close()
protected boolean close(boolean ask)
ask
- true if we should ask userprotected boolean canClose()
true
.true
if everything can be closedprotected final CloneableTopComponent openCloneableTopComponent()
protected abstract CloneableTopComponent createCloneableTopComponent()
protected abstract String messageOpening()
protected abstract String messageOpened()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |