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


Java JGraph.isDoubleBuffered方法代码示例

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


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

示例1: getRendererComponent

import org.jgraph.JGraph; //导入方法依赖的package包/类
public Component getRendererComponent(JGraph graph, CellView view,
		boolean sel, boolean focus, boolean preview) {
	gridColor = graph.getGridColor();
	highlightColor = graph.getHighlightColor();
	lockedHandleColor = graph.getLockedHandleColor();
	isDoubleBuffered = graph.isDoubleBuffered();
	if (view instanceof VertexView) {
		this.view = (VertexView)view;
		this.hasFocus = focus;
		this.childrenSelected = graph.getSelectionModel()
				.isChildrenSelected(view.getCell());
		this.selected = sel;
		this.preview = preview;
		if (this.view.isLeaf()
				|| GraphConstants.isGroupOpaque(view.getAllAttributes()))
			installAttributes(view);
		else
			resetAttributes();
		return this;
	}
	return null;
}
 
开发者ID:ProgettoRadis,项目名称:ArasuiteIta,代码行数:23,代码来源:TComponentRenderer.java

示例2: getRendererComponent

import org.jgraph.JGraph; //导入方法依赖的package包/类
public Component getRendererComponent(JGraph graph, CellView view,
		boolean sel, boolean focus, boolean preview) {
	gridColor = graph.getGridColor();
	highlightColor = graph.getHighlightColor();
	lockedHandleColor = graph.getLockedHandleColor();
	isDoubleBuffered = graph.isDoubleBuffered();
	if (view instanceof VertexView) {
		this.view = (VertexView) view;
		setComponentOrientation(graph.getComponentOrientation());
		if (graph.getEditingCell() != view.getCell()) {
			Object label = graph.convertValueToString(view);
			if (label != null)
				setText("<html><center><font size='1'><b>"+label.toString()+"</b></font></center></html>");
			else
				setText("");
		} else			
			setText("");
		this.hasFocus = focus;
		this.childrenSelected = graph.getSelectionModel()
				.isChildrenSelected(view.getCell());
		this.selected = sel;
		this.preview = preview;
		if (this.view.isLeaf()
				|| GraphConstants.isGroupOpaque(view.getAllAttributes()))
			installAttributes(view);
		else
			resetAttributes();
		return this;
	}
	return null;
}
 
开发者ID:tvaquero,项目名称:itsimple,代码行数:32,代码来源:PlaceRenderer.java

示例3: getRendererComponent

import org.jgraph.JGraph; //导入方法依赖的package包/类
public Component getRendererComponent(JGraph graph, CellView view,
		boolean sel, boolean focus, boolean preview) {
	gridColor = graph.getGridColor();
	highlightColor = graph.getHighlightColor();
	lockedHandleColor = graph.getLockedHandleColor();
	isDoubleBuffered = graph.isDoubleBuffered();
	if (view instanceof VertexView) {
		this.view = (VertexView) view;
		setComponentOrientation(graph.getComponentOrientation());
		if (graph.getEditingCell() != view.getCell()) {
			Object label = graph.convertValueToString(view);
			if (label != null)
				setText("<html><center><font size='1'><b>"+label.toString()+"</b></center></font></html>");
			else
				setText(null);
		} else
			setText(null);
		this.hasFocus = focus;
		this.childrenSelected = graph.getSelectionModel()
				.isChildrenSelected(view.getCell());
		this.selected = sel;
		this.preview = preview;
		if (this.view.isLeaf()
				|| GraphConstants.isGroupOpaque(view.getAllAttributes()))
			installAttributes(view);
		else
			resetAttributes();
		return this;
	}
	return null;
}
 
开发者ID:tvaquero,项目名称:itsimple,代码行数:32,代码来源:TransitionRenderer.java

示例4: getRendererComponent

import org.jgraph.JGraph; //导入方法依赖的package包/类
public Component getRendererComponent(JGraph graph, CellView view,
		boolean sel, boolean focus, boolean preview) {
	gridColor = graph.getGridColor();
	highlightColor = graph.getHighlightColor();
	lockedHandleColor = graph.getLockedHandleColor();
	isDoubleBuffered = graph.isDoubleBuffered();
	if (view instanceof VertexView) {
		this.view = (VertexView) view;
		setComponentOrientation(graph.getComponentOrientation());
		if (graph.getEditingCell() != view.getCell()) {
			Object label = graph.convertValueToString(view);
			if (label != null)
				setText("<html><center><font size='3'>"+label.toString()+"</font></center></html>");
			else
				setText(null);
		} else
			setText(null);
		this.hasFocus = focus;
		this.childrenSelected = graph.getSelectionModel()
				.isChildrenSelected(view.getCell());
		this.selected = sel;
		this.preview = preview;
		if (this.view.isLeaf()
				|| GraphConstants.isGroupOpaque(view.getAllAttributes()))
			installAttributes(view);
		else
			resetAttributes();
		return this;
	}
	return null;
}
 
开发者ID:tvaquero,项目名称:itsimple,代码行数:32,代码来源:UseCaseRenderer.java

示例5: getRendererComponent

import org.jgraph.JGraph; //导入方法依赖的package包/类
public Component getRendererComponent(JGraph graph, CellView view,
		boolean sel, boolean focus, boolean preview) {
	gridColor = graph.getGridColor();
	highlightColor = graph.getHighlightColor();
	lockedHandleColor = graph.getLockedHandleColor();
	isDoubleBuffered = graph.isDoubleBuffered();
	if (view instanceof VertexView) {
		this.view = (VertexView) view;
		setComponentOrientation(graph.getComponentOrientation());
		if (graph.getEditingCell() != view.getCell()) {
			Object label = graph.convertValueToString(view);
			if (label != null)
				setText("<html><font size='4'><b>"+label.toString()+"</b></font></html>");
			else
				setText("");
		} else
			setText("");
		this.hasFocus = focus;
		this.childrenSelected = graph.getSelectionModel()
				.isChildrenSelected(view.getCell());
		this.selected = sel;
		this.preview = preview;
		if (this.view.isLeaf()
				|| GraphConstants.isGroupOpaque(view.getAllAttributes()))
			installAttributes(view);
		else
			resetAttributes();
		return this;
	}
	return null;
}
 
开发者ID:tvaquero,项目名称:itsimple,代码行数:32,代码来源:ActorRenderer.java

示例6: getRendererComponent

import org.jgraph.JGraph; //导入方法依赖的package包/类
public Component getRendererComponent(JGraph graph, CellView view,
		boolean sel, boolean focus, boolean preview) {
	gridColor = graph.getGridColor();
	highlightColor = graph.getHighlightColor();
	lockedHandleColor = graph.getLockedHandleColor();
	isDoubleBuffered = graph.isDoubleBuffered();
	if (view instanceof VertexView) {
		this.view = (VertexView) view;
		setComponentOrientation(graph.getComponentOrientation());
		if (graph.getEditingCell() != view.getCell()) {
			Object label = graph.convertValueToString(view);
			if (label != null)
				setText("<html><font size='3'><b>"+label.toString()+"</b></font></html>");
			else
				setText("");
		} else
			setText("");
		this.hasFocus = focus;
		this.childrenSelected = graph.getSelectionModel()
				.isChildrenSelected(view.getCell());
		this.selected = sel;
		this.preview = preview;
		if (this.view.isLeaf()
				|| GraphConstants.isGroupOpaque(view.getAllAttributes()))
			installAttributes(view);
		else
			resetAttributes();
		return this;
	}
	return null;
}
 
开发者ID:tvaquero,项目名称:itsimple,代码行数:32,代码来源:GraphLabelRenderer.java

示例7: getRendererComponent

import org.jgraph.JGraph; //导入方法依赖的package包/类
public JComponent getRendererComponent(JGraph graph, CellView view, boolean sel, boolean focus, boolean preview)
	{
		this.graph = graph;
		this.isDoubleBuffered = graph.isDoubleBuffered();
		this.hasFocus = focus;
		this.childrenSelected = graph.getSelectionModel().isChildrenSelected(view.getCell());
		this.selected = sel;
		this.preview = preview;

//		Log.logInfo(this, "view of type '" + view.getClass().getName() + "'");

		if (view instanceof VertexView)
		{
			this.view = (VertexView) view;
			setComponentOrientation(graph.getComponentOrientation());
			installAttributes(view);

			Object obj = view.getCell();
			if(obj instanceof FunctionBoxCell)
			{
				JPanel mainPanel = new JPanel(new BorderLayout(GAP_INTERVAL, GAP_INTERVAL));
				if(selected)
				{
					mainPanel.setBackground(titleSelectedBackgroundColor);
				}
				else
				{
					mainPanel.setBackground(titleBackgroundColor);
				}
				FunctionBoxCell functionCell = (FunctionBoxCell) obj;
				Object userObj = functionCell.getUserObject();
				if(!(userObj instanceof FunctionBoxMutableViewInterface))
				{
					System.err.println("User Object of FunctionBoxCell is not of type '" + FunctionBoxMutableViewInterface.class.getName() + "'");
					return null;
				}
				FunctionBoxMutableViewInterface function = (FunctionBoxMutableViewInterface) userObj;
				//set up the function title
				String functionName = function.getName();
//			Log.logInfo(this, "Function Name in FunctionBoxCellRenderer.getRendererComponent(): '" + functionName + "'");
				JLabel label = new JLabel();
				label.setBorder(getDefaultBorder(1, 0, 0, 0));
				label.setBackground(titleBackgroundColor);
				label.setText(functionName);
				label.setIcon(imageIcon);
				mainPanel.add(label, BorderLayout.NORTH);

				if(function.getFunctionConstant()!=null)
				{
					return renderConstantFunction(function, mainPanel);
				}
                else if(function.getFunctionVocabularyMapping()!=null)
				{
					return renderVocabularyMappingFunction((function), mainPanel);
				}
                else
				{
					return renderNormalFunction(function, mainPanel);
				}
			}
		}
		return this;
	}
 
开发者ID:NCIP,项目名称:caadapter,代码行数:64,代码来源:FunctionBoxView.java

示例8: getRendererComponent

import org.jgraph.JGraph; //导入方法依赖的package包/类
public JComponent getRendererComponent(JGraph graph, CellView view, boolean sel, boolean focus, boolean preview)
	{
		this.graph = graph;
		this.isDoubleBuffered = graph.isDoubleBuffered();
		this.hasFocus = focus;
		this.childrenSelected = graph.getSelectionModel().isChildrenSelected(view.getCell());
		this.selected = sel;
		this.preview = preview;

//		Log.logInfo(this, "view of type '" + view.getClass().getName() + "'");

		if (view instanceof VertexView)
		{
			this.view = (VertexView) view;
			setComponentOrientation(graph.getComponentOrientation());
			installAttributes(view);

			Object obj = view.getCell();
			if(obj instanceof FunctionBoxGraphCell)
			{
				JPanel mainPanel = new JPanel(new BorderLayout(GAP_INTERVAL, GAP_INTERVAL));
				if(selected)
				{
					mainPanel.setBackground(titleSelectedBackgroundColor);
				}
				else
				{
					mainPanel.setBackground(titleBackgroundColor);
				}
				FunctionBoxGraphCell functionCell = (FunctionBoxGraphCell) obj;
				//set up the function title
				String functionName = functionCell.getFunctionDef().getName().toString();
				JLabel label = new JLabel();
				label.setBorder(getDefaultBorder(1, 0, 0, 0));
				label.setBackground(titleBackgroundColor);
				label.setText(functionName);
				label.setIcon(imageIcon);
				mainPanel.add(label, BorderLayout.NORTH);
				if (functionCell.getInputElements().isEmpty())
					return renderFunctionWithoutInputPort(functionCell, mainPanel);
						
				return renderNormalFunction(functionCell, mainPanel);
			}
		}
		return this;
	}
 
开发者ID:NCIP,项目名称:caadapter,代码行数:47,代码来源:FunctionBoxGraphCellView.java


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