|
PathwayLogic Assistant API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
pla.GraphPanel
public class GraphPanel
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
GraphPanel()
|
|
| Method Summary | |
|---|---|
void |
addZoomListener(ZoomListener zl)
Add given zoom listener to list of objects to be notified upon zoom change. |
void |
centerOn(Rectangle r)
Center component on given rectangle. |
void |
displayMenu(PLANode node)
Display context menu for given node. |
PLAFrame |
getFrame()
|
PLAGraph |
getGraph()
|
Dimension |
getGraphSize()
|
double |
getZoomScale()
Obtain current zoom scale in effect. |
void |
highlight(GraphItem item)
Select given graph item (node or edge) by highlighting it. |
boolean |
isEmpty()
Test whether this graph panel is empty. |
boolean |
isGlyphishVisible(Glyphish g)
Test whether given glyphish thing is currently visible in the parental viewport. |
void |
mouseClicked(MouseEvent event)
|
void |
mouseDragged(MouseEvent event)
|
void |
mouseEntered(MouseEvent event)
|
void |
mouseExited(MouseEvent event)
|
void |
mouseMoved(MouseEvent event)
|
void |
mousePressed(MouseEvent event)
|
void |
mouseReleased(MouseEvent event)
|
void |
mouseWheelMoved(MouseWheelEvent event)
|
protected void |
paintComponent(Graphics g)
|
void |
removeLastSelection()
|
void |
removeZoomListener(ZoomListener zl)
Remove given zoom listener from list of objects to be notified upon zoom change. |
void |
setGraph(PLAGraph g)
|
void |
stateChanged(ChangeEvent event)
|
Point |
transformFromView(Point p)
|
void |
zoom(double factor)
Apply given factor to current zoom. |
void |
zoomToFit(Dimension size)
Zoom the size of the graph so that it fits into given dimension and its size is maximized. |
void |
zoomToOriginal()
Change the size of graph back to its original size. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GraphPanel()
| Method Detail |
|---|
public PLAGraph getGraph()
public void setGraph(PLAGraph g)
public Dimension getGraphSize()
public boolean isEmpty()
public void addZoomListener(ZoomListener zl)
zl - ZoomListener to be notified upon zoom changepublic void removeZoomListener(ZoomListener zl)
zl - ZoomListener to be removedpublic double getZoomScale()
public void zoom(double factor)
factor - Zoom factor to applypublic void zoomToFit(Dimension size)
null does nothing.
size - Dimension, in which the zoomed graph must fit intopublic void zoomToOriginal()
public void centerOn(Rectangle r)
null.
r - Rectangle to center onpublic void highlight(GraphItem item)
item - Node or edge to select in graph;
may be NULL if nothing to be selectedpublic void displayMenu(PLANode node)
node - public PLAFrame getFrame()
public void removeLastSelection()
public boolean isGlyphishVisible(Glyphish g)
false if this graph panel is not
embedded into a JViewport.
Returns false if glyphish is not entirely
inside the currently visible rectangle. If given glyph
is null returns false.
g - Glyphish thing to test visibility of
public Point transformFromView(Point p)
protected void paintComponent(Graphics g)
paintComponent in class JComponentpublic void stateChanged(ChangeEvent event)
stateChanged in interface ChangeListenerpublic void mouseWheelMoved(MouseWheelEvent event)
mouseWheelMoved in interface MouseWheelListenerpublic void mouseClicked(MouseEvent event)
mouseClicked in interface MouseListenerpublic void mousePressed(MouseEvent event)
mousePressed in interface MouseListenerpublic void mouseReleased(MouseEvent event)
mouseReleased in interface MouseListenerpublic void mouseEntered(MouseEvent event)
mouseEntered in interface MouseListenerpublic void mouseExited(MouseEvent event)
mouseExited in interface MouseListenerpublic void mouseDragged(MouseEvent event)
mouseDragged in interface MouseMotionListenerpublic void mouseMoved(MouseEvent event)
mouseMoved in interface MouseMotionListener
|
PathwayLogic Assistant API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||