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


Java GraphConstants.setEditable方法代码示例

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


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

示例1: setAttributes

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
/**
 * Sets all the attributes like background colour, dimensions, port number
 * & position
 *
 * @param pt
 * @return created map
 */
public Hashtable<Object, Map> setAttributes(Point2D pt, JGraph graph) {
	//contains attributes of the cell & ports
	Hashtable<Object, Map> nest = new Hashtable<Object, Map>();

	Dimension cellDimension = getSize(graph);
	//contains attributes of the cell
	Map attr = getAttributes();
	GraphConstants.setBounds(attr, new Rectangle2D.Double(pt.getX(), pt.getY(), cellDimension.getWidth(), cellDimension.getHeight()));
	GraphConstants.setEditable(attr, false);
	GraphConstants.setBackground(attr, graph.getBackground());
	nest.put(this, attr);

	//create ports
	ports = createPorts();
	Icon icon = GraphConstants.getIcon(attr);
	updatePortPositions(nest, icon, cellDimension);
	for (Port port : ports) {
		add((DefaultPort) port);
	}
	return nest;
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:29,代码来源:JmtCell.java

示例2: setAttributes

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
/**
 * Sets all the attribults like background colour, dimensions, port number
 * & position
 * @param pt
 * @return created map
 */
public Hashtable<Object, Map> setAttributes(Point2D pt, JGraph graph) {
	//contains attribute of the cell & ports
	Hashtable<Object, Map> nest = new Hashtable<Object, Map>();

	Dimension cellDimension = getSize(graph);
	//contains attrib of cell
	Map attr = getAttributes();
	GraphConstants.setBounds(attr, new Rectangle2D.Double(pt.getX(), pt.getY(), cellDimension.getWidth(), cellDimension.getHeight()));
	GraphConstants.setEditable(attr, false);
	GraphConstants.setBackground(attr, graph.getBackground());
	nest.put(this, attr);

	//create ports
	ports = createPorts();
	Icon icon = GraphConstants.getIcon(attr);
	updatePortPositions(nest, icon, cellDimension);
	for (Port port : ports) {
		add((DefaultPort) port);
	}
	return nest;
}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:28,代码来源:JmtCell.java

示例3: ActionAssociation

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
public ActionAssociation(Element action, Element actionReference, BasicCell source, BasicCell target){
	super();
	data = action;
	reference = actionReference;

	GraphConstants.setEditable(getAttributes(), false);
	
	setVisual();
	
	setSource(source.getChildAt(0));
	if(source == target){
		// self-loop
		setTarget(source.getChildAt(1));
		loopEdge = source;
		
	}

	else{
		setTarget(target.getChildAt(0));
	}
}
 
开发者ID:tvaquero,项目名称:itsimple,代码行数:22,代码来源:ActionAssociation.java

示例4: createVertex

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
private void createVertex(DefaultGraphCell cell, double x, double y, double w, double h)
{
    // Set bounds
    GraphConstants.setBounds(cell.getAttributes(), new Rectangle2D.Double(x, y, w, h));

    GraphConstants.setBorder(cell.getAttributes(), BorderFactory.createRaisedBevelBorder());

    GraphConstants.setEditable(cell.getAttributes(), false);
    GraphConstants.setSizeable(cell.getAttributes(), true);
    GraphConstants.setAutoSize(cell.getAttributes(), false);
    GraphConstants.setRouting(cell.getAttributes(), GraphConstants.ROUTING_SIMPLE);
    GraphConstants.setBendable(cell.getAttributes(), true);

    // Add a Floating Port
    hmPorts.put(cell.getUserObject(), cell.addPort());
}
 
开发者ID:tchico,项目名称:dgMaster-trunk,代码行数:17,代码来源:DBWizardEREditor.java

示例5: setLayout

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
/**
 * Define appearance of this component
 */
private void setLayout() {
	GraphConstants.setSizeable(attributes, false);
	GraphConstants.setGroupOpaque(attributes, true);
	GraphConstants.setOpaque(attributes, true);
	GraphConstants.setGradientColor(attributes, new Color(.1F, .1F, .9F, .3F));
	titledBorder = BorderFactory.createTitledBorder(" " + name + " ");
	GraphConstants.setBorder(attributes, titledBorder);
	GraphConstants.setInset(attributes, (int) (GraphConstants.DEFAULTFONT.getSize() * 1.4));
	GraphConstants.setEditable(attributes, false);
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:14,代码来源:BlockingRegion.java

示例6: setLayout

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
/**
 * Define apparence of this component
 */
private void setLayout() {
	GraphConstants.setSizeable(attributes, false);
	GraphConstants.setGroupOpaque(attributes, true);
	GraphConstants.setOpaque(attributes, true);
	GraphConstants.setGradientColor(attributes, new Color(.1F, .1F, .9F, .3F));
	titledBorder = BorderFactory.createTitledBorder(" " + name + " ");
	GraphConstants.setBorder(attributes, titledBorder);
	GraphConstants.setInset(attributes, 15);
	GraphConstants.setEditable(attributes, false);
}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:14,代码来源:BlockingRegion.java

示例7: TableCell

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
public TableCell(Table aTable) {
    super(aTable);

    GraphConstants.setBounds(getAttributes(), new Rectangle2D.Double(20,
            20, 40, 20));
    GraphConstants.setGradientColor(getAttributes(), Color.orange);
    GraphConstants.setOpaque(getAttributes(), false);
    GraphConstants.setAutoSize(getAttributes(), true);
    GraphConstants.setEditable(getAttributes(), true);
    addPort();
}
 
开发者ID:mirkosertic,项目名称:ERDesignerNG,代码行数:12,代码来源:TableCell.java

示例8: ViewCell

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
public ViewCell(View aTable) {
    super(aTable);

    GraphConstants.setBounds(getAttributes(), new Rectangle2D.Double(20,
            20, 40, 20));
    GraphConstants.setGradientColor(getAttributes(), Color.orange);
    GraphConstants.setOpaque(getAttributes(), false);
    GraphConstants.setAutoSize(getAttributes(), true);
    GraphConstants.setEditable(getAttributes(), true);
    addPort();
}
 
开发者ID:mirkosertic,项目名称:ERDesignerNG,代码行数:12,代码来源:ViewCell.java

示例9: SubjectAreaCell

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
public SubjectAreaCell(SubjectArea aArea) {
    super(aArea);

    GraphConstants.setAutoSize(getAttributes(), true);
    GraphConstants.setEditable(getAttributes(), true);
    GraphConstants.setInset(getAttributes(), 20);
    GraphConstants.setGroupOpaque(getAttributes(), true);
}
 
开发者ID:mirkosertic,项目名称:ERDesignerNG,代码行数:9,代码来源:SubjectAreaCell.java

示例10: CommentCell

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
public CommentCell(Comment aTable) {
    super(aTable);

    GraphConstants.setBounds(getAttributes(), new Rectangle2D.Double(20,
            20, 40, 20));
    GraphConstants.setOpaque(getAttributes(), false);
    GraphConstants.setAutoSize(getAttributes(), true);
    GraphConstants.setResize(getAttributes(), true);
    GraphConstants.setEditable(getAttributes(), true);
}
 
开发者ID:mirkosertic,项目名称:ERDesignerNG,代码行数:11,代码来源:CommentCell.java

示例11: getDefaultUnmovableMappingEdgeStyle

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
private static final AttributeMap getDefaultUnmovableMappingEdgeStyle(Color lineColor)
{
	AttributeMap lineStyle = new AttributeMap();
	GraphConstants.setLineBegin(lineStyle, GraphConstants.ARROW_NONE);
	GraphConstants.setLineColor(lineStyle,lineColor);
	GraphConstants.setBeginSize(lineStyle, 10);
	GraphConstants.setFont(lineStyle, GraphConstants.DEFAULTFONT.deriveFont(10));
	GraphConstants.setBendable(lineStyle, false);
	GraphConstants.setEditable(lineStyle, false);
	GraphConstants.setMoveable(lineStyle, false);
	GraphConstants.setResize(lineStyle, false);
	GraphConstants.setSizeable(lineStyle, false);
	return lineStyle;
}
 
开发者ID:NCIP,项目名称:caadapter,代码行数:15,代码来源:UIHelper.java

示例12: getDefaultInvisibleVertexAttribute

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
public static final AttributeMap getDefaultInvisibleVertexAttribute(Point position, boolean representSourceVertex)
{
	AttributeMap map = getDefaultInvisibleVertexBounds(position, representSourceVertex);
	GraphConstants.setEditable(map, false);
	GraphConstants.setBendable(map, false);
	GraphConstants.setSelectable(map, false);
	GraphConstants.setResize(map, false);
	GraphConstants.setSizeable(map, false);
	return map;
}
 
开发者ID:NCIP,项目名称:caadapter,代码行数:11,代码来源:UIHelper.java


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