当前位置: 首页>>代码示例>>Java>>正文


Java VisualItem.TEXTCOLOR属性代码示例

本文整理汇总了Java中prefuse.visual.VisualItem.TEXTCOLOR属性的典型用法代码示例。如果您正苦于以下问题:Java VisualItem.TEXTCOLOR属性的具体用法?Java VisualItem.TEXTCOLOR怎么用?Java VisualItem.TEXTCOLOR使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在prefuse.visual.VisualItem的用法示例。


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

示例1: TextColorAction

public TextColorAction(String group) {
    super(group, VisualItem.TEXTCOLOR, ColorLib.gray(0));
    add("_hover", ColorLib.rgb(255,0,0));
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:4,代码来源:RadialGraphView.java

示例2: initVisualization

private void initVisualization() {
	/*try
	{
		graph = new GraphMLReader().readGraph("/socialnet.xml");
	} catch ( DataIOException e ) {
		e.printStackTrace();
		System.err.println("Error loading graph. Exiting...");
		System.exit(1);
	}*/
	Graph graph = data.getIPGraph();
	
	vis = new Visualization();
	vis.add(GRAPH, graph);

	LabelRenderer r = new LabelRenderer(data.ADDRESS);
	r.setRoundedCorner(8,8);
	r.setRenderType(LabelRenderer.RENDER_TYPE_DRAW_AND_FILL);
	vis.setRendererFactory(new DefaultRendererFactory(r));
	
	/*int [] palette = new int[] {
			ColorLib.rgb(255,180,180), ColorLib.rgb(190,190,255)
	};
	DataColorAction fill = new DataColorAction("graph.nodes","gender",
			Constants.NOMINAL,VisualItem.FILLCOLOR,palette);*/
	
	ColorAction draw = new ColorAction(NODES,VisualItem.STROKECOLOR,ColorLib.gray(0));
	ColorAction fill = new ColorAction(NODES,VisualItem.FILLCOLOR,ColorLib.rgb(210, 210, 255));
	ColorAction text = new ColorAction(NODES,VisualItem.TEXTCOLOR,ColorLib.gray(0));
	ColorAction edges = new ColorAction(EDGES,VisualItem.STROKECOLOR,ColorLib.gray(200));
	ActionList color = new ActionList(Activity.INFINITY,1000);
	color.add(data.getLockAction());
	color.add(draw);
	color.add(fill);
	color.add(text);
	color.add(edges);
	color.add(data.getUnlockAction());
	
	//ActionList layout = new ActionList(Activity.INFINITY,100);
	ActionList layout = new ActionList(Activity.INFINITY,1000);
	layout.add(data.getLockAction());
	layout.add(new GridMinusCircle(150,10,NODES));
	layout.add(data.getUnlockAction());
	layout.add(new RepaintAction());
	
	vis.putAction(COLOR, color);
	vis.putAction(LAYOUT,layout);

	display = new Display(vis);
	display.setSize(720,500);
	display.addControlListener(new ZoomControl());
	display.addControlListener(new DragControl());
	display.addControlListener(new PanControl());
	
	TupleTableModel ttm = new TupleTableModel(graph.getEdgeTable());
	node_table = new JTable(ttm);
	node_table.getTableHeader().addMouseListener(ttm);
	//ttm.addTableModelListener(node_table);
	//node_table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
	node_table.addMouseListener(new JTableMouseListener());
}
 
开发者ID:codydunne,项目名称:netgrok,代码行数:60,代码来源:AdamTestWindow.java


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