⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jgraphviewpane.java

📁 JPowerGraph is a Java library for creating directed graphs for SWT. It supports graph movement, sele
💻 JAVA
字号:
package net.sourceforge.jpowergraph.pane;

import net.sourceforge.jpowergraph.lens.CursorLens;
import net.sourceforge.jpowergraph.lens.LegendLens;
import net.sourceforge.jpowergraph.lens.NodeSizeLens;
import net.sourceforge.jpowergraph.lens.RotateLens;
import net.sourceforge.jpowergraph.lens.TooltipLens;
import net.sourceforge.jpowergraph.lens.ZoomLens;
import net.sourceforge.jpowergraph.viewcontrols.CursorControlPanel;
import net.sourceforge.jpowergraph.viewcontrols.LegendControlPanel;
import net.sourceforge.jpowergraph.viewcontrols.NodeSizeControlPanel;
import net.sourceforge.jpowergraph.viewcontrols.RotateControlPanel;
import net.sourceforge.jpowergraph.viewcontrols.TooltipControlPanel;
import net.sourceforge.jpowergraph.viewcontrols.ZoomControlPanel;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;

/**
 * @author Mick Kerrigan
 *
 * Created on 05-Aug-2005
 * Committed by $Author: morcen $
 *
 * $Source: /cvsroot/jpowergraph/swt/src/net/sourceforge/jpowergraph/pane/JGraphViewPane.java,v $,
 * @version $Revision: 1.3 $ $Date: 2005/08/18 16:08:37 $
 */
public class JGraphViewPane extends Composite{

    /**
     * 
     */
    public JGraphViewPane(Composite theParent, Composite theComposite, ZoomLens theZoomLens, RotateLens theRotateLens, CursorLens theDraggingLens, TooltipLens theTooltipLens, LegendLens theLegendLens, NodeSizeLens theNodeSizeLens) {
        super(theParent, SWT.NONE);
        
        GridLayout gridLayout = new GridLayout();
        gridLayout.numColumns = 10;
        gridLayout.marginWidth = 2;
        gridLayout.marginHeight = 4;
        setLayout(gridLayout);
        
        GridData sepData = new GridData();
        sepData.grabExcessVerticalSpace = false;
        sepData.heightHint = 20;
        
        new CursorControlPanel(this, theDraggingLens);
        Label l1 = new Label(this, SWT.SEPARATOR);
        l1.setLayoutData(sepData);
        new ZoomControlPanel(this, theZoomLens);
        new RotateControlPanel(this, theRotateLens);
        Label l2 = new Label(this, SWT.SEPARATOR);
        l2.setLayoutData(sepData);
        new NodeSizeControlPanel(this, theNodeSizeLens);
        Label l3 = new Label(this, SWT.SEPARATOR);
        l3.setLayoutData(sepData);
        Label l4 = new Label(this, SWT.NONE);
        l4.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        new LegendControlPanel(this, theLegendLens);
        new TooltipControlPanel(this, theTooltipLens);
        
        theComposite.setParent(this);
        GridData gridData2 = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
        gridData2.horizontalAlignment = GridData.FILL;
        gridData2.horizontalSpan = gridLayout.numColumns;
        theComposite.setLayoutData(gridData2);
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -