KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > fractal > gui > Constants


1 /***
2  * FractalGUI: a graphical tool to edit Fractal component configurations.
3  * Copyright (C) 2003 France Telecom R&D
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Contact: fractal@objectweb.org
20  *
21  * Authors: Eric Bruneton, Patrice Fauvel
22  */

23
24 package org.objectweb.fractal.gui;
25
26 import java.awt.BasicStroke JavaDoc;
27 import java.awt.Color JavaDoc;
28 import java.awt.Font JavaDoc;
29 import java.awt.Stroke JavaDoc;
30
31 /**
32  * Defines font and color constants used in FractalGUI.
33  */

34
35 public interface Constants {
36
37   /**
38    * Font used to draw component names.
39    */

40
41   Font JavaDoc NAME_FONT = new Font JavaDoc("MonoSpaced", Font.BOLD, 12);
42
43   /**
44    * Font used to draw server interfaces.
45    */

46
47   Font JavaDoc PROVIDED_FONT = new Font JavaDoc("MonoSpaced", Font.PLAIN, 12);
48
49   /**
50    * Font used to draw client interfaces.
51    */

52
53   Font JavaDoc REQUIRED_FONT = new Font JavaDoc("MonoSpaced", Font.ITALIC, 12);
54
55   /**
56    * Color used to draw server interfaces.
57    */

58
59   Color JavaDoc PROVIDED_COLOR = Color.black; //Color.red;
60

61   /**
62    * Color used to draw client interfaces.
63    */

64
65   Color JavaDoc REQUIRED_COLOR = Color.black; //new Color(0, 128, 0);
66

67   /**
68    * Color used to draw component's controller part.
69    */

70
71 // Color COMPONENT_COLOR = new Color(153, 204, 153); // Color.lightGray;
72
Color JavaDoc COMPONENT_COLOR = new Color JavaDoc(255, 255, 183);
73
74   /**
75    * Color used to draw bindings.
76    */

77
78   Color JavaDoc BINDING_COLOR = new Color JavaDoc(0, 128, 0);
79
80   /**
81    * Color used to show errors (in graph, dialog, or tree views).
82    */

83
84   Color JavaDoc ERROR_COLOR = Color.red;
85
86   /**
87    * Color used to show warnings (especially for bindings).
88    */

89
90   Color JavaDoc WARNING_COLOR = new Color JavaDoc (153, 0, 0);
91
92   /**
93    * Color used to draw selected components or interfaces.
94    */

95
96   Color JavaDoc SELECTION_COLOR = new Color JavaDoc(255, 102, 51); //new Color(128, 128, 255);
97

98   /**
99    * Default stroke.
100    */

101
102   Stroke JavaDoc NORMAL_STROKE = new BasicStroke JavaDoc();
103
104   /**
105    * Bold stroke.
106    */

107
108   Stroke JavaDoc BOLD_STROKE = new BasicStroke JavaDoc(2);
109
110   /**
111    * Dashed stroke.
112    */

113
114   Stroke JavaDoc DASHED_STROKE = new BasicStroke JavaDoc(
115     1,
116     BasicStroke.CAP_SQUARE,
117     BasicStroke.JOIN_MITER,
118     10,
119     new float[] { 5, 5 },
120     0);
121 }
122
Popular Tags