|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.view.ViewControl
This class manages the ViewModes on a collection of views. There is always one active View. There is one active Mode for this active View. If a the active View is changed, then the active ViewMode Is transfered to this view.
The active Mode can be changed in two ways:
Field Summary | |
protected ViewContainer |
vc
|
Constructor Summary | |
ViewControl()
Creates a new ViewControl |
|
ViewControl(ViewContainer vc)
Creates a new ViewControl for a given ViewContainer. |
Method Summary | |
protected static void |
activateMode(Graph2DView v,
ViewMode vl)
Convinience methods |
void |
add(ViewMode mode)
Registers a mode in this control. |
void |
addPropertyChangeListener(PropertyChangeListener pcl)
Adds a property change listener to this class. |
void |
currentViewChanged(View v)
Current View of the ViewContainer has changed, so transfer the current mode to the new current view |
protected static void |
deactivateMode(Graph2DView v,
ViewMode vl)
Convinience methods |
void |
dropViewContainer()
Remove the ViewControl from the ViewContainer. |
ViewMode |
getCurrentMode()
Returns the currently activated mode of this view control. |
YCursor |
getModes()
|
ViewContainer |
getViewContainer()
Get the ViewContainer of this ViewControl |
void |
popMode()
Makes the the mode on the top of the stack active |
void |
pushMode(ViewMode l)
Pushes the current mode on the top of the Stack and activates a new mode |
void |
remove(ViewMode mode)
Removes this mode from this control. |
void |
setMode(ViewMode viewMode)
Sets a new active view mode. |
protected void |
setToCurrent(ViewMode viewMode)
Sets the given view mode as current view mode. |
void |
setViewContainer(ViewContainer vc)
Set the ViewContainer on which this ViewControl works. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ViewContainer vc
Constructor Detail |
public ViewControl()
public ViewControl(ViewContainer vc)
vc
- The collection of views which should be controlledMethod Detail |
public ViewContainer getViewContainer()
null
if no one is specified.public void setViewContainer(ViewContainer vc)
vc
- A ViewContainerpublic void dropViewContainer()
public void popMode()
public void pushMode(ViewMode l)
l
- The mode which should be activatedpublic void setMode(ViewMode viewMode)
viewMode
- a view modeode which replaces the current active mode.protected void setToCurrent(ViewMode viewMode)
viewMode
- The mode which will become the new current modepublic ViewMode getCurrentMode()
public void add(ViewMode mode)
public void remove(ViewMode mode)
public YCursor getModes()
public void currentViewChanged(View v)
currentViewChanged
in interface ViewChangeListener
protected static void activateMode(Graph2DView v, ViewMode vl)
protected static void deactivateMode(Graph2DView v, ViewMode vl)
public void addPropertyChangeListener(PropertyChangeListener pcl)
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |