|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.view.ViewControl
public class ViewControl
This class manages the ViewModes on a collection of views. There is always one active view. There is one active view mode for the active view. If the active view is changed, then the active view mode is transferred to newly activated view.
The active view 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)
|
void |
add(ViewMode mode)
Registers a mode in this control. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
Adds a property change listener to this ViewControl. |
void |
currentViewChanged(View v)
Transfers the current view mode to the specified, newly activated view. |
protected static void |
deactivateMode(Graph2DView v,
ViewMode vl)
|
void |
dropViewContainer()
Remove the ViewControl from the ViewContainer. |
ViewMode |
getCurrentMode()
Returns the currently activated mode of this view control. |
YCursor |
getModes()
Returns a cursor for all modes in this control. |
ViewContainer |
getViewContainer()
Returns the ViewContainer of this ViewControl. |
void |
popMode()
Makes the view mode on the top of the view mode stack active. |
void |
pushMode(ViewMode l)
Pushes the current view mode onto the top of the view mode stack and activates the specified, new view mode. |
void |
remove(ViewMode mode)
Removes this mode from this control. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
Removes a property change listener from this ViewControl. |
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)
Sets 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 there is no container.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 mode 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
v
- the newly activated view.protected static void activateMode(Graph2DView v, ViewMode vl)
protected static void deactivateMode(Graph2DView v, ViewMode vl)
public void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
pcl
- the PropertyChangeListener to addpublic void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
pcl
- the PropertyChangeListener to remove.
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |