KickJava   Java API By Example, From Geeks To Geeks.

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


1 /* BlockActivityRenderer.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 import org.enhydra.jawe.*;
13
14 import org.jgraph.graph.*;
15 import java.awt.*;
16
17 /**
18 * Class used to display block activity object.
19 */

20 public class BlockActivityRenderer extends ActivityRenderer {
21
22    /**
23    * Paints block activity. Overrides super class paint
24    * to add specific painting.
25    */

26    public void paint(Graphics g) {
27       super.paint(g);
28       // drawing block activity lines
29
g.setColor(bordercolor);
30       g.drawLine(xOff-1,0,xOff-1,actH-2);
31       g.drawLine(xOff+innerW-1,0,xOff+innerW-1,actH-2);
32    }
33
34    protected Color getFillColor () {
35       Color c=Utils.getColor(JaWEConfig.getInstance().getBlockActivityColor());
36       return ActivityRenderer.getFillColor(c,(Activity)view.getCell());
37    }
38
39 }
40
Popular Tags