本文整理汇总了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;
}
示例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;
}
示例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));
}
}
示例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());
}
示例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);
}
示例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);
}
示例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();
}
示例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();
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}