本文整理汇总了Java中org.jgraph.graph.GraphConstants.setMoveable方法的典型用法代码示例。如果您正苦于以下问题:Java GraphConstants.setMoveable方法的具体用法?Java GraphConstants.setMoveable怎么用?Java GraphConstants.setMoveable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jgraph.graph.GraphConstants
的用法示例。
在下文中一共展示了GraphConstants.setMoveable方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createBounds
import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
public static Map createBounds(AttributeMap map, double x, double y, Dimension dimension, Color c, boolean moveable)
{
// final int ALPHA = 255;
GraphConstants.setBounds(map, map.createRect(x, y, dimension.getWidth(), dimension.getHeight()));
// GraphConstants.setBorder(map, BorderFactory.createBevelBorder(BevelBorder.RAISED));
GraphConstants.setForeground(map, Color.BLACK.darker().darker());//new Color(ALPHA - c.getRed(), ALPHA - c.getGreen(), ALPHA - c.getBlue(), ALPHA));
GraphConstants.setBackground(map, c.darker());
// Add a nice looking gradient background
GraphConstants.setGradientColor(map, c.darker());
// Make sure the cell is resized on insert
// GraphConstants.setSize();
// GraphConstants.setResize(map, true);
// Add a Border Color Attribute to the Map
GraphConstants.setBorderColor(map, Color.BLACK.darker().darker());
GraphConstants.setFont(map, GraphConstants.DEFAULTFONT.deriveFont(Font.BOLD, 12));
GraphConstants.setMoveable(map, moveable);
GraphConstants.setOpaque(map, true);
GraphConstants.setResize(map, false);
GraphConstants.setAutoSize(map, true);
return map;
}
示例2: createBounds
import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
public static Map createBounds(AttributeMap map, double x, double y, Dimension dimension, Color c, boolean moveable)
{
// final int ALPHA = 255;
GraphConstants.setBounds(map, map.createRect(x, y, dimension.getWidth(), dimension.getHeight()));
// GraphConstants.setBorder(map, BorderFactory.createBevelBorder(BevelBorder.RAISED));
GraphConstants.setForeground(map, Color.BLACK.darker().darker());//new Color(ALPHA - c.getRed(), ALPHA - c.getGreen(), ALPHA - c.getBlue(), ALPHA));
GraphConstants.setBackground(map, c.darker());
// Add a nice looking gradient background
GraphConstants.setGradientColor(map, c.darker());
// Make sure the cell is resized on insert
// GraphConstants.setSize();
// GraphConstants.setResize(map, true);
// Add a Border Color Attribute to the Map
GraphConstants.setBorderColor(map, Color.BLACK.darker().darker());
GraphConstants.setFont(map, GraphConstants.DEFAULTFONT.deriveFont(Font.BOLD, 12));
GraphConstants.setMoveable(map, moveable);
GraphConstants.setOpaque(map, true);
GraphConstants.setResize(map, false);
GraphConstants.setAutoSize(map, true);
return map;
}
示例3: 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;
}
示例4: getDefaultFunctionBoxPortAttributes
import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
public static final Map getDefaultFunctionBoxPortAttributes(Map map, Dimension portDimension)
{
GraphConstants.setSize(map, portDimension);
GraphConstants.setSize(map, portDimension);
GraphConstants.setSelectable(map, true);
GraphConstants.setBorderColor(map, Color.RED.darker().darker());
GraphConstants.setMoveable(map, true);
return map;
}