|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.argouml.ui.explorer.PerspectiveManager
Provides a model and event management for perspectives(views) of the Explorer.
This class defines the complete list of perspective rules, and knows the default perspectives and their contents.
Field Summary | |
private static PerspectiveManager |
instance
|
private static Logger |
LOG
|
private List |
perspectiveListeners
|
private List |
perspectives
|
private List |
rules
|
Constructor Summary | |
private |
PerspectiveManager()
Creates a new instance of PerspectiveManager |
Method Summary | |
void |
addAllPerspectives(Collection newPerspectives)
|
void |
addListener(PerspectiveManagerListener listener)
|
void |
addPerspective(Object perspective)
|
void |
addRule(PerspectiveRule rule)
Add a rule to the list of rules. |
Collection |
getDefaultPerspectives()
|
static PerspectiveManager |
getInstance()
|
List |
getPerspectives()
|
Collection |
getRules()
|
void |
loadDefaultPerspectives()
Loads a pre-defined default set of perspectives. |
void |
loadRules()
Get the predefined rules. |
void |
loadUserPerspectives()
Tries to load user defined perspectives, if it can't it loads the (predefined) default perspectives. |
void |
removeAllPerspectives()
Remove all perspectives. |
void |
removeListener(PerspectiveManagerListener listener)
|
void |
removePerspective(Object perspective)
|
void |
removeRule(PerspectiveRule rule)
Remove a rule from the list. |
void |
saveUserPerspectives()
save the user perspectives in the ArgoUML configuration |
String |
toString()
string representation of the perspectives in the same format as saved in the user properties. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final Logger LOG
private static PerspectiveManager instance
private List perspectiveListeners
private List perspectives
private List rules
Constructor Detail |
private PerspectiveManager()
Method Detail |
public static PerspectiveManager getInstance()
public void addListener(PerspectiveManagerListener listener)
listener
- the listener to be addedpublic void removeListener(PerspectiveManagerListener listener)
listener
- the listener to be removedpublic void addPerspective(Object perspective)
perspective
- the perspective to be addedpublic void addAllPerspectives(Collection newPerspectives)
newPerspectives
- the collection of perspectives to be addedpublic void removePerspective(Object perspective)
perspective
- the perspective to be removedpublic void removeAllPerspectives()
public List getPerspectives()
public void loadUserPerspectives()
public void loadDefaultPerspectives()
public Collection getDefaultPerspectives()
public void loadRules()
This is a hard coded rules library for now, since it is quite a lot of work to get all possible rule names in "org.argouml.ui.explorer.rules" from the classpath (which would also not allow adding rules from other locations).
public void addRule(PerspectiveRule rule)
rule
- the PerspectiveRule to be addedpublic void removeRule(PerspectiveRule rule)
rule
- the PerspectiveRule to be removedpublic Collection getRules()
public void saveUserPerspectives()
public String toString()
Object.toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20050222) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |