Examples of SWTJGraphPane


Examples of net.sourceforge.jpowergraph.swt.SWTJGraphPane

//  view.setParent(group); 
//  return (SWTJGraphPane) jGraphPane;
//  }

  public SWTJGraphPane createViewer(Composite group){
    SWTJGraphPane jGraphPane;
    SWTJGraphScrollPane scroll;
    OntoSpreadViewPanel view;
    jGraphPane = new SWTJGraphPane(group, controller.createEmptyGraph());
    jGraphPane.setLens(controller.getLensSet());
    scroll = new SWTJGraphScrollPane(group, (SWTJGraphPane) jGraphPane, controller.getLensSet());
    scroll.setParent(group);
    view = new OntoSpreadViewPanel(group, scroll, controller.getLensSet());
    view.setParent(group);
    return (SWTJGraphPane) jGraphPane;
View Full Code Here

Examples of net.sourceforge.jpowergraph.swt.SWTJGraphPane

        hand = new Cursor(theDisplay, SWT.CURSOR_HAND);
        stop = theDisplay.getSystemCursor(SWT.CURSOR_NO);
    }

    public void setCursor(JGraphPane theJGraphPane, int theCursorType) {
        SWTJGraphPane graphPane = (SWTJGraphPane) theJGraphPane;
        if (!arrow.isDisposed() && theCursorType == CursorChanger.ARROW) {
            graphPane.setCursor(arrow);
        }
        else if (!cross.isDisposed() && theCursorType == CursorChanger.CROSS) {
            graphPane.setCursor(cross);
        }
        else if (!hand.isDisposed() && theCursorType == CursorChanger.HAND) {
            graphPane.setCursor(hand);
        }
        else if (!stop.isDisposed() && theCursorType == CursorChanger.STOP) {
            graphPane.setCursor(stop);
        }
        else if (display != null && !display.isDisposed()){
            graphPane.setCursor(new Cursor(display, SWT.CURSOR_ARROW));
        }
    }
View Full Code Here

Examples of net.sourceforge.jpowergraph.swt.SWTJGraphPane

        this.toolTipListener = theToolTipListener;
        this.contextMenuListener = theContextMenuListener;
    }

    public void doRightClickPopup(JGraphPane theGraphPane, JPowerGraphMouseEvent e) {
        final SWTJGraphPane graphPane = (SWTJGraphPane) theGraphPane;

        JPowerGraphPoint point = e.getPoint();
        Legend legend = graphPane.getLegendAtPoint(point);
        Node node = graphPane.getNodeAtPoint(point);
        Edge edge = graphPane.getNearestEdge(point);

        closeRightClickIfNeeded(graphPane);
        rightClick = new Menu(graphPane);
        graphPane.setMenu(rightClick);
        rightClick.addMenuListener(new MenuListener() {
            public void menuHidden(MenuEvent arg0) {
                synchronized (graphPane) {
                    graphPane.redraw();
                }
            }

            public void menuShown(MenuEvent arg0) {
            }
View Full Code Here

Examples of net.sourceforge.jpowergraph.swt.SWTJGraphPane

            rightClick.setVisible(true);
        }
    }

    public void doToolTipPopup(JGraphPane theGraphPane, JPowerGraphMouseEvent e) {
        final SWTJGraphPane graphPane = (SWTJGraphPane) theGraphPane;
       
        JPowerGraphPoint point = e.getPoint();
        Node node = graphPane.getNodeAtPoint(point);

        if (node != null && node != lastNode) {
            closeToolTipIfNeeded(graphPane);
            if (toolTipListener != null) {
                tipShell = new Shell(graphPane.getShell(), SWT.ON_TOP | SWT.TOOL);
                tipShell.setBackground(background);
                boolean okay = toolTipListener.addNodeToolTipItems(node, tipShell, background);
                if (okay) {
                    tipShell.pack();
                    setTooltipLocation(tipShell, graphPane.toDisplay(point.x, point.y));
                    tipShell.setVisible(true);
                }
            }
        }
        else if (node == null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.