KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > jawe > graph > SubflowRenderer


1 /* SubflowRenderer.java
2  *
3  * Authors:
4  * Stefanovic Nenad chupo@iis.ns.ac.yu
5  * Bojanic Sasa sasaboy@neobee.net
6  * Puskas Vladimir vpuskas@eunet.yu
7  * Pilipovic Goran zboniek@uns.ac.yu
8  *
9  */

10
11 package org.enhydra.jawe.graph;
12
13 import org.enhydra.jawe.*;
14
15 import org.jgraph.graph.*;
16 import java.awt.*;
17
18 /**
19 * Class used to display subflow object.
20 */

21 public class SubflowRenderer extends ActivityRenderer {
22
23    private BasicStroke innerBorderStroke = new BasicStroke(1);
24    /**
25    * Paints subflow. Overrides super class paint
26    * to add specific painting.
27    */

28    public void paint(Graphics g) {
29       super.paint(g);
30
31       // drawing subflow border
32
g.setColor(bordercolor);
33       ((Graphics2D) g).setStroke(innerBorderStroke);
34       g.drawRect(xOff,yOff,innerW-1,innerH-1);
35    }
36
37    protected Color getFillColor() {
38       Color c=Utils.getColor(JaWEConfig.getInstance().getSubFlowActivityColor());
39       return ActivityRenderer.getFillColor(c,(Activity)view.getCell());
40    }
41
42 }
43
Popular Tags