|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
edu.washington.biostr.sig.brainj3d.core.client.ClientManager
public class ClientManager
Observers listener to this should watch for: FRONT (when
the front object changes), LAYOUT (when the layout changes).
While quiting should be done by ClientManager2's quit methods,
the ClientManager2
| Field Summary | |
|---|---|
static String |
FRONT
This message is sent to observers when the front view changes. |
static String |
LAYOUT
This message is sent to observers when the layout changes |
static String |
LIBRARY
This message is sent when the library changes. |
| Constructor Summary | |
|---|---|
protected |
ClientManager(Session session,
ExecutorService main)
Create a new client manager with the given session. |
| Method Summary | |
|---|---|
static void |
addRecentLibrary(URI filename)
Add a loaded library to the recent library list. |
FileType |
canSave(FileType type)
Check if a type can be saved. |
boolean |
close(boolean force)
Close this ClientManager if possible and return true. |
boolean |
close(long id)
Try and close the view specified by id. |
void |
execute(Runnable r)
Execute the given runnable in the preferred client thread. |
static void |
forceQuit()
Forcefully quit the program. |
static Set<ClientManager> |
getAllClientManagers()
|
static LayoutManager |
getAvailableLayout()
If any layouts exist return one that corresponds to some window. |
RemoteFileSource |
getFileSource()
|
long |
getFront()
Get the frontmost component's id. |
LayoutManager |
getLayout()
Get the layout manager. |
DataVault |
getLibrary()
Return the current library. |
TreeModel |
getLibraryTreeModel()
Get the tree model for displaying the library in a tree form. |
static ClientManager |
getManager(Session session,
ExecutorService main)
Create a new ClientManager for the specified session. |
DataVault |
getMasterLibrary()
Get the master library. |
ExecutorService |
getPool()
Get this client's threadpool |
FileGroup[] |
getRecent(FileType type)
|
Session |
getSession()
Get the session. |
TreeTemplate |
getTemplate()
Get a template node that uses mainTag for its main tag. |
DataVaultTreeBuilder |
getTreeOrdering()
|
static String |
getUrlBase()
The urlBase adds the start to urls to point them in the right direction. |
ViewCapsule |
getViewCapsule(Long id)
Get the specified view capsule |
void |
handleError(Throwable t)
|
boolean |
hasEditPermission()
Check to see if this user has permission to edit things |
void |
load(FileGroup... g)
|
void |
load(String[] str)
Load the given string. |
static boolean |
quit(boolean exit)
Quit the whole program. |
void |
registerSyncObject(Object o)
|
void |
run()
Start this ClientManager. |
void |
setConnectSplashScreen(ConnectSplashscreen css)
|
void |
setCurrentLibrary(DataVault vault)
Set the current library to vault or default to the master library if vault is null. |
void |
setFocus(Object focusKey)
|
void |
setFront(Long id,
int index)
Set the front component. |
void |
setLayoutManager(LayoutManager layout)
Set a new layout manager. |
protected void |
setupMainView()
Setup the main window (including libray, timer, menus and other things). |
protected static void |
setupRenderers()
|
static void |
setUrlBase(String urlBase_)
The urlBase adds the start to urls to point them in the right direction. |
boolean |
shouldSave(FileGroup file)
Check if we should save a file. |
void |
show(ViewCapsule view)
|
static void |
showAbout()
|
static void |
showPrefs()
|
boolean |
showSaveDialogAndSave(Set toSave,
boolean cancelable)
Show the save dialog and save any that were selected. |
void |
showStartup()
|
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String LAYOUT
public static final String FRONT
public static final String LIBRARY
| Constructor Detail |
|---|
protected ClientManager(Session session,
ExecutorService main)
throws InstantiationException,
ClassNotFoundException,
IllegalAccessException,
RemoteException
InstantiationException
ClassNotFoundException
IllegalAccessException
RemoteException| Method Detail |
|---|
public ExecutorService getPool()
public static ClientManager getManager(Session session,
ExecutorService main)
session - main - The threaddispatcher or null if we should create one
public void load(String[] str)
str - public boolean close(long id)
id -
NullPointerException - if id doesn't exist or id is nullpublic void showStartup()
public void setLayoutManager(LayoutManager layout)
layout - protected static void setupRenderers()
protected void setupMainView()
throws RemoteException
RemoteExceptionpublic void setConnectSplashScreen(ConnectSplashscreen css)
public DataVaultTreeBuilder getTreeOrdering()
public void show(ViewCapsule view)
public long getFront()
public void setFront(Long id,
int index)
id - public LayoutManager getLayout()
public ViewCapsule getViewCapsule(Long id)
id -
public Session getSession()
public void handleError(Throwable t)
public void execute(Runnable r)
r -
public boolean showSaveDialogAndSave(Set toSave,
boolean cancelable)
toSave - cancelable -
public void load(FileGroup... g)
public boolean close(boolean force)
force - Force this to close and do not display any popups.public static boolean quit(boolean exit)
public static void forceQuit()
public static Set<ClientManager> getAllClientManagers()
public void run()
run in interface Runnablepublic RemoteFileSource getFileSource()
public static String getUrlBase()
public static void setUrlBase(String urlBase_)
urlBase - The urlBase to set.public FileGroup[] getRecent(FileType type)
public void setFocus(Object focusKey)
public static void showPrefs()
public static LayoutManager getAvailableLayout()
public static void showAbout()
public DataVault getLibrary()
public void setCurrentLibrary(DataVault vault)
vault - public DataVault getMasterLibrary()
public TreeModel getLibraryTreeModel()
public static void addRecentLibrary(URI filename)
filename - public boolean shouldSave(FileGroup file)
file -
public FileType canSave(FileType type)
type - The type that we want to save as something else.
public boolean hasEditPermission()
public TreeTemplate getTemplate()
mainTag -
public void registerSyncObject(Object o)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||