本文整理汇总了Java中org.jgraph.graph.GraphConstants.setFont方法的典型用法代码示例。如果您正苦于以下问题:Java GraphConstants.setFont方法的具体用法?Java GraphConstants.setFont怎么用?Java GraphConstants.setFont使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jgraph.graph.GraphConstants
的用法示例。
在下文中一共展示了GraphConstants.setFont方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: AbstractGraphVertex
import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
/**
* Constructor for graph
*
* @param x
* @param y
* @param data
* @param graph
*/
public AbstractGraphVertex(int x, int y, DataItem data,
MicroarrayGraph graph) {
super(data);
this.graph = graph;
this.setPosition(new Point(x,y));
GraphConstants.setGradientColor(
this.getAttributes(),
DEFAULT_VERTEX_COLOR);
GraphConstants.setBorderColor(
this.getAttributes(),
Color.black);
GraphConstants.setOpaque(
this.getAttributes(),
true);
GraphConstants.setVerticalAlignment(
this.getAttributes(),
JLabel.TOP);
Font font = GraphConstants.getFont(this.getAttributes());
font = font.deriveFont((float)font.getSize() + 3);
GraphConstants.setFont(this.getAttributes(), font);
}
示例4: 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;
}
示例5: PlaceGraphCell
import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
public PlaceGraphCell(int id, int posX, int posY) {
super("P" + id, posX, posY);
GraphConstants.setBackground(getAttributes(), Color.ORANGE);
GraphConstants.setFont(getAttributes(), FONT);
}
示例6: TransitionGraphCell
import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
public TransitionGraphCell(int id, int posX, int posY) {
super("T" + id, posX, posY);
GraphConstants.setBackground(getAttributes(), Color.CYAN);
GraphConstants.setFont(getAttributes(), FONT);
}
示例7: ArcGraphCell
import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
public ArcGraphCell() {
GraphConstants.setLineEnd(getAttributes(), GraphConstants.ARROW_TECHNICAL);
GraphConstants.setLabelPosition(getAttributes(), new Point2D.Double(GraphConstants.PERMILLE / 2, -10));
GraphConstants.setFont(getAttributes(), FONT);
}