• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java CollapsedSubtreeLayout类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中prefuse.action.layout.CollapsedSubtreeLayout的典型用法代码示例。如果您正苦于以下问题:Java CollapsedSubtreeLayout类的具体用法?Java CollapsedSubtreeLayout怎么用?Java CollapsedSubtreeLayout使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CollapsedSubtreeLayout类属于prefuse.action.layout包,在下文中一共展示了CollapsedSubtreeLayout类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setOrientation

import prefuse.action.layout.CollapsedSubtreeLayout; //导入依赖的package包/类
public void setOrientation(int orientation) {
	NodeLinkTreeLayout rtl = (NodeLinkTreeLayout) m_vis.getAction("treeLayout");
	CollapsedSubtreeLayout stl = (CollapsedSubtreeLayout) m_vis.getAction("subLayout");
	switch (orientation) {
	case Constants.ORIENT_LEFT_RIGHT:
		m_nodeRenderer.setHorizontalAlignment(Constants.LEFT);
		m_edgeRenderer.setHorizontalAlignment1(Constants.RIGHT);
		m_edgeRenderer.setHorizontalAlignment2(Constants.LEFT);
		m_edgeRenderer.setVerticalAlignment1(Constants.CENTER);
		m_edgeRenderer.setVerticalAlignment2(Constants.CENTER);
		break;
	case Constants.ORIENT_RIGHT_LEFT:
		m_nodeRenderer.setHorizontalAlignment(Constants.RIGHT);
		m_edgeRenderer.setHorizontalAlignment1(Constants.LEFT);
		m_edgeRenderer.setHorizontalAlignment2(Constants.RIGHT);
		m_edgeRenderer.setVerticalAlignment1(Constants.CENTER);
		m_edgeRenderer.setVerticalAlignment2(Constants.CENTER);
		break;
	case Constants.ORIENT_TOP_BOTTOM:
		m_nodeRenderer.setHorizontalAlignment(Constants.CENTER);
		m_edgeRenderer.setHorizontalAlignment1(Constants.CENTER);
		m_edgeRenderer.setHorizontalAlignment2(Constants.CENTER);
		m_edgeRenderer.setVerticalAlignment1(Constants.BOTTOM);
		m_edgeRenderer.setVerticalAlignment2(Constants.TOP);
		break;
	case Constants.ORIENT_BOTTOM_TOP:
		m_nodeRenderer.setHorizontalAlignment(Constants.CENTER);
		m_edgeRenderer.setHorizontalAlignment1(Constants.CENTER);
		m_edgeRenderer.setHorizontalAlignment2(Constants.CENTER);
		m_edgeRenderer.setVerticalAlignment1(Constants.TOP);
		m_edgeRenderer.setVerticalAlignment2(Constants.BOTTOM);
		break;
	default:
		throw new IllegalArgumentException("Unrecognized orientation value: " + orientation);
	}
	m_orientation = orientation;
	rtl.setOrientation(orientation);
	stl.setOrientation(orientation);
}
 
开发者ID:jdepend,项目名称:cooper,代码行数:40,代码来源:TreeGraphUtil.java


示例2: setOrientation

import prefuse.action.layout.CollapsedSubtreeLayout; //导入依赖的package包/类
public void setOrientation(int orientation) {
    NodeLinkTreeLayout rtl 
        = (NodeLinkTreeLayout)m_vis.getAction("treeLayout");
    CollapsedSubtreeLayout stl
        = (CollapsedSubtreeLayout)m_vis.getAction("subLayout");
    switch ( orientation ) {
    case Constants.ORIENT_LEFT_RIGHT:
        m_nodeRenderer.setHorizontalAlignment(Constants.LEFT);
        m_edgeRenderer.setHorizontalAlignment1(Constants.RIGHT);
        m_edgeRenderer.setHorizontalAlignment2(Constants.LEFT);
        m_edgeRenderer.setVerticalAlignment1(Constants.CENTER);
        m_edgeRenderer.setVerticalAlignment2(Constants.CENTER);
        break;
    case Constants.ORIENT_RIGHT_LEFT:
        m_nodeRenderer.setHorizontalAlignment(Constants.RIGHT);
        m_edgeRenderer.setHorizontalAlignment1(Constants.LEFT);
        m_edgeRenderer.setHorizontalAlignment2(Constants.RIGHT);
        m_edgeRenderer.setVerticalAlignment1(Constants.CENTER);
        m_edgeRenderer.setVerticalAlignment2(Constants.CENTER);
        break;
    case Constants.ORIENT_TOP_BOTTOM:
        m_nodeRenderer.setHorizontalAlignment(Constants.CENTER);
        m_edgeRenderer.setHorizontalAlignment1(Constants.CENTER);
        m_edgeRenderer.setHorizontalAlignment2(Constants.CENTER);
        m_edgeRenderer.setVerticalAlignment1(Constants.BOTTOM);
        m_edgeRenderer.setVerticalAlignment2(Constants.TOP);
        break;
    case Constants.ORIENT_BOTTOM_TOP:
        m_nodeRenderer.setHorizontalAlignment(Constants.CENTER);
        m_edgeRenderer.setHorizontalAlignment1(Constants.CENTER);
        m_edgeRenderer.setHorizontalAlignment2(Constants.CENTER);
        m_edgeRenderer.setVerticalAlignment1(Constants.TOP);
        m_edgeRenderer.setVerticalAlignment2(Constants.BOTTOM);
        break;
    default:
        throw new IllegalArgumentException(
            "Unrecognized orientation value: "+orientation);
    }
    m_orientation = orientation;
    rtl.setOrientation(orientation);
    stl.setOrientation(orientation);
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:43,代码来源:CommonTreeView.java


示例3: setOrientation

import prefuse.action.layout.CollapsedSubtreeLayout; //导入依赖的package包/类
public void setOrientation(int orientation) {
    NodeLinkTreeLayout rtl
            = (NodeLinkTreeLayout)m_vis.getAction("treeLayout");
    CollapsedSubtreeLayout stl
            = (CollapsedSubtreeLayout)m_vis.getAction("subLayout");
    switch ( orientation ) {
        case Constants.ORIENT_LEFT_RIGHT:
            m_nodeRenderer.setHorizontalAlignment(Constants.LEFT);
            m_edgeRenderer.setHorizontalAlignment1(Constants.RIGHT);
            m_edgeRenderer.setHorizontalAlignment2(Constants.LEFT);
            m_edgeRenderer.setVerticalAlignment1(Constants.CENTER);
            m_edgeRenderer.setVerticalAlignment2(Constants.CENTER);
            break;
        case Constants.ORIENT_RIGHT_LEFT:
            m_nodeRenderer.setHorizontalAlignment(Constants.RIGHT);
            m_edgeRenderer.setHorizontalAlignment1(Constants.LEFT);
            m_edgeRenderer.setHorizontalAlignment2(Constants.RIGHT);
            m_edgeRenderer.setVerticalAlignment1(Constants.CENTER);
            m_edgeRenderer.setVerticalAlignment2(Constants.CENTER);
            break;
        case Constants.ORIENT_TOP_BOTTOM:
            m_nodeRenderer.setHorizontalAlignment(Constants.CENTER);
            m_edgeRenderer.setHorizontalAlignment1(Constants.CENTER);
            m_edgeRenderer.setHorizontalAlignment2(Constants.CENTER);
            m_edgeRenderer.setVerticalAlignment1(Constants.BOTTOM);
            m_edgeRenderer.setVerticalAlignment2(Constants.TOP);
            break;
        case Constants.ORIENT_BOTTOM_TOP:
            m_nodeRenderer.setHorizontalAlignment(Constants.CENTER);
            m_edgeRenderer.setHorizontalAlignment1(Constants.CENTER);
            m_edgeRenderer.setHorizontalAlignment2(Constants.CENTER);
            m_edgeRenderer.setVerticalAlignment1(Constants.TOP);
            m_edgeRenderer.setVerticalAlignment2(Constants.BOTTOM);
            break;
        default:
            throw new IllegalArgumentException(
                    "Unrecognized orientation value: "+orientation);
    }
    m_orientation = orientation;
    rtl.setOrientation(orientation);
    stl.setOrientation(orientation);
}
 
开发者ID:laas,项目名称:fape,代码行数:43,代码来源:TreeView.java


示例4: initialiseTreeView

import prefuse.action.layout.CollapsedSubtreeLayout; //导入依赖的package包/类
@Override
public void initialiseTreeView(Tree t, Dimension size, String label, int orientation) {
    this.m_orientation = orientation;

    m_vis.add(tree, t);

    m_nodeRenderer = new LabelRenderer(null, "image");

    m_edgeRenderer = new EdgeRenderer(Constants.EDGE_TYPE_CURVE);
    m_edgeRenderer.setDefaultLineWidth(4);

    DefaultRendererFactory rf = new DefaultRendererFactory(m_nodeRenderer);
    rf.add(new InGroupPredicate(treeEdges), m_edgeRenderer);
    m_vis.setRendererFactory(rf);

    int[] colorPalette = new int[]{ColorLib.rgb(51, 51, 51), ColorLib.rgb(51, 51, 51), ColorLib.rgb(51, 51, 51)};

    DataColorAction dataColorAction = new DataColorAction("tree.nodes", "type", Constants.NOMINAL, VisualItem.TEXTCOLOR, colorPalette);

    // colors
    ItemAction nodeColor = new WorkflowNodeColorAction(treeNodes);

    m_vis.putAction("textColor", dataColorAction);

    ItemAction edgeColor = new ColorAction(treeEdges,
            VisualItem.STROKECOLOR, ColorLib.rgba(51, 51, 51, 100));

    // quick repaint
    ActionList repaint = new ActionList();
    repaint.add(nodeColor);
    repaint.add(new RepaintAction());
    m_vis.putAction("repaint", repaint);

    // full paint
    ActionList fullPaint = new ActionList();
    fullPaint.add(nodeColor);
    m_vis.putAction("fullPaint", fullPaint);

    // create the tree layout action
    NodeLinkTreeLayout treeLayout = new NodeLinkTreeLayout(tree,
            m_orientation, 80, 70, 8);
    treeLayout.setLayoutAnchor(new Point2D.Double(size.width / 2, 15));
    m_vis.putAction("treeLayout", treeLayout);

    CollapsedSubtreeLayout subLayout = new CollapsedSubtreeLayout(tree,
            m_orientation);
    m_vis.putAction("subLayout", subLayout);

    createAndAddFilter(dataColorAction, nodeColor, edgeColor, treeLayout, subLayout);
    // animated transition
    createAnimation();
    // ensure size is reasonable!
    finaliseVisualizationSteps(size);
}
 
开发者ID:ISA-tools,项目名称:Automacron,代码行数:55,代码来源:WorkflowVisualisationTreeView.java



注:本文中的prefuse.action.layout.CollapsedSubtreeLayout类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PigStorage类代码示例发布时间:2022-05-23
下一篇:
Java BytestreamRequest类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap