Package net.sourceforge.jpowergraph

Examples of net.sourceforge.jpowergraph.Legend


        return NAME;
    }

    public void mouseDoubleClick(JPowerGraphMouseEvent e) {
        if (getGraphPane().isEnabled() && e.getButton() == JPowerGraphMouseEvent.LEFT && doubleClickListener != null) {
            Legend legend = getGraphPane().getLegendAtPoint(e.getPoint());
            Node node = getGraphPane().getNodeAtPoint(e.getPoint());
            Edge edge = getGraphPane().getNearestEdge(e.getPoint());

            if (legend != null) {
                doubleClickListener.doubleClick(e, legend);
View Full Code Here


        return NAME;
    }
   
    public void mouseDown(JPowerGraphMouseEvent e) {
        if (getGraphPane().isEnabled() && e.getButton() == JPowerGraphMouseEvent.LEFT) {
            Legend legend = getGraphPane().getLegendAtPoint(e.getPoint());
            Node node=getGraphPane().getNodeAtPoint(e.getPoint());
            if (legend != null){
                Action a = legend.getActionAtPoint(e.getPoint());
                if (a != null){
                    a.actionPerformed(new ActionEvent("Selection Source", 0, "do Action")); // null was e.getSource()
                }
            }
            else if (node != null) {
View Full Code Here

    public SWTJGraphPane(Composite theParent, Graph graph, GroupLegendItem theLegendRoot) {
        super(theParent, SWT.NO_BACKGROUND);

        this.parent = theParent;

        m_legend = new Legend(theLegendRoot, true);
        m_graphListner = new GraphHandler();
        m_lensListener = new LensHandler();
        m_nodePositions = new HashMap <Node, JPowerGraphPoint>();
        m_manipulators = new ArrayList <Manipulator> ();
        m_manipulatorsByName = new HashMap <String, Manipulator> ();
View Full Code Here

    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);
View Full Code Here

TOP

Related Classes of net.sourceforge.jpowergraph.Legend

Copyright © 2018 www.massapicom. 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.