visualdirectededgepainterimpl.java
来自「OpenJGraph是一个开源的Java库」· Java 代码 · 共 36 行
JAVA
36 行
package salvo.jesus.graph.visual.drawing;import salvo.jesus.graph.*;import salvo.jesus.graph.visual.*;import java.awt.*;/** * An implementation of <tt>VisualDirectedEdgePainter</tt> that draws * the <tt>VisualEdge</tt> based on its attributes, then draws the arrowhead * indicating the directio of the edge. * * @author Jesus M. Salvo Jr. */public class VisualDirectedEdgePainterImpl extends VisualEdgePainterImpl implements VisualDirectedEdgePainter{ /** * Delegate responsible for the actual drawing of the arrowhead. */ VisualDirectedEdgePainterWeakImpl arrowHeadPainterDelegate = new VisualDirectedEdgePainterWeakImpl(); public VisualDirectedEdgePainterImpl() {} public void paint( VisualGraphComponent component , Graphics2D g2d ) { super.paint( component, g2d ); this.paintArrowHead( (VisualEdge) component, g2d ); } /** * Draws the arrow head */ public void paintArrowHead( VisualEdge ve, Graphics2D g2d ) { this.arrowHeadPainterDelegate.paintArrowHead( ve, g2d ); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?