當前位置: 首頁>>代碼示例>>Java>>正文


Java VisualizationViewer.getPreferredSize方法代碼示例

本文整理匯總了Java中edu.uci.ics.jung.visualization.VisualizationViewer.getPreferredSize方法的典型用法代碼示例。如果您正苦於以下問題:Java VisualizationViewer.getPreferredSize方法的具體用法?Java VisualizationViewer.getPreferredSize怎麽用?Java VisualizationViewer.getPreferredSize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在edu.uci.ics.jung.visualization.VisualizationViewer的用法示例。


在下文中一共展示了VisualizationViewer.getPreferredSize方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: MagnifyImageLensSupport

import edu.uci.ics.jung.visualization.VisualizationViewer; //導入方法依賴的package包/類
/**
 * create the base class, setting common members and creating
 * a custom GraphMouse
 * @param vv the VisualizationViewer to work on
 */
public MagnifyImageLensSupport(VisualizationViewer<V,E> vv, LensTransformer lensTransformer,
        ModalGraphMouse lensGraphMouse) {
    super(vv, lensGraphMouse);
    this.renderContext = vv.getRenderContext();
    this.pickSupport = renderContext.getPickSupport();
    this.renderer = vv.getRenderer();
    this.transformingRenderer = new BasicRenderer<V,E>();
    this.savedGraphicsDecorator = renderContext.getGraphicsContext();
    this.lensTransformer = lensTransformer;
    this.savedEdgeRenderer = vv.getRenderer().getEdgeRenderer();
    this.reshapingEdgeRenderer = new ReshapingEdgeRenderer<V,E>();
    this.reshapingEdgeRenderer.setEdgeArrowRenderingSupport(savedEdgeRenderer.getEdgeArrowRenderingSupport());

    Dimension d = vv.getSize();
    if(d.width == 0 || d.height == 0) {
        d = vv.getPreferredSize();
    }
    lensTransformer.setViewRadius(d.width/5);
    this.lensGraphicsDecorator = new MagnifyIconGraphics(lensTransformer);
}
 
開發者ID:SiLeBAT,項目名稱:BfROpenLab,代碼行數:26,代碼來源:MagnifyImageLensSupport.java

示例2: LayoutLensSupport

import edu.uci.ics.jung.visualization.VisualizationViewer; //導入方法依賴的package包/類
/**
  * create the base class, setting common members and creating
  * a custom GraphMouse
  * @param vv the VisualizationViewer to work on
  */
 public LayoutLensSupport(VisualizationViewer<V,E> vv, LensTransformer lensTransformer,
         ModalGraphMouse lensGraphMouse) {
     super(vv, lensGraphMouse);
     this.lensTransformer = lensTransformer;
     this.pickSupport = vv.getPickSupport();

     Dimension d = vv.getSize();
     if(d.width <= 0 || d.height <= 0) {
         d = vv.getPreferredSize();
     }
     lensTransformer.setViewRadius(d.width/5);
}
 
開發者ID:SiLeBAT,項目名稱:BfROpenLab,代碼行數:18,代碼來源:LayoutLensSupport.java


注:本文中的edu.uci.ics.jung.visualization.VisualizationViewer.getPreferredSize方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。