|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.view.ViewMode | +--y.view.PopupMode
A view mode that is responsible for showing context sensitive popup menus when a right click occurs on a view element. The popup menus will be displayed at the view coordinate where the right click occured.
Subclasses should overwrite the methods that provide JPopupMenu objects for different kinds of contexts. By default these methods return empty popup menus.
Field Summary |
Fields inherited from class y.view.ViewMode |
lastClickEvent, lastDragEvent, lastPressEvent, lastReleaseEvent, originalX, originalY, view |
Constructor Summary | |
PopupMode()
Initializes a new PopupMode |
|
PopupMode(ViewContainer vc)
Initializes a new PopupMode for a given ViewContainer |
Method Summary | |
JPopupMenu |
getBendPopup(Bend b)
Provides a JPopupMenu that is displayed for the given bend. |
JPopupMenu |
getEdgeLabelPopup(EdgeLabel label)
Provides a JPopupMenu that is displayed for the given edge label. |
JPopupMenu |
getEdgePopup(Edge e)
Provides a JPopupMenu that is displayed for the given edge. |
JPopupMenu |
getNodePopup(Node v)
Provides a JPopupMenu that is displayed for the given node. |
JPopupMenu |
getPaperPopup(double x,
double y)
Provides a JPopupMenu that is displayed if a hit on the view background occured and no graph elements are selected. |
JPopupMenu |
getSelectionPopup(double x,
double y)
Provides a JPopupMenu that is displayed if a hit on the view background occured and some graph elements are selected. |
boolean |
getSelectSubject()
|
void |
mousePressed(MouseEvent e)
Internal use only |
void |
mouseReleased(MouseEvent e)
Triggers the display of a context sensitive menu on a right mouse button press. |
void |
reactivateParent()
Internal use only. |
void |
setSelectSubject(boolean select)
Sets whether or not to automatically select the subject (node, edge, bend,...) for which the popup menu gets activated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PopupMode()
public PopupMode(ViewContainer vc)
Method Detail |
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
mousePressed
in class ViewMode
public void reactivateParent()
reactivateParent
in class ViewMode
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
mouseReleased
in class ViewMode
public JPopupMenu getNodePopup(Node v)
null
no popup menu will be displayed.
public JPopupMenu getBendPopup(Bend b)
null
no popup menu will be displayed.
public JPopupMenu getEdgePopup(Edge e)
null
no popup menu will be displayed.
public JPopupMenu getPaperPopup(double x, double y)
The hit on the background occured at the given world coordinate.
If the JPopupMenu contains no elements or is null
no popup menu will be displayed.
public JPopupMenu getSelectionPopup(double x, double y)
The hit on the background occured at the given world coordinate.
If the JPopupMenu contains no elements or is null
no popup menu will be displayed.
public JPopupMenu getEdgeLabelPopup(EdgeLabel label)
null
no popup menu will be displayed.
public void setSelectSubject(boolean select)
public boolean getSelectSubject()
|
© 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 |