1 package com.bonevich.erj;
2
3 import com.bonevich.util.ResourceUtilities;
4
5 import java.awt.*;
6 import javax.swing.Icon;
7 import javax.swing.ImageIcon;
8 import javax.swing.plaf.metal.MetalLookAndFeel;
9
10 /*** An interface holding all the constants relevant to the ERJ
11 * application, mostly across classes. App classes may either
12 * "implement" or just import this interface and use the constants.
13 */
14 public interface ErjConstants
15 {
16 public static final String EMPTY_STR = "";
17
18 public static final Dimension INITIAL_FRAME_SIZE
19 = new Dimension(800, 700);
20
21 // fonts and colors
22 public static final Font STATUSBAR_FONT =
23 MetalLookAndFeel.getSubTextFont();
24 public static final Font STATUSBAR_FONT_ITALIC =
25 new Font(
26 STATUSBAR_FONT.getFamily(),
27 Font.ITALIC, STATUSBAR_FONT.getSize()
28 );
29 public static final Color STATUSBAR_COLOR = Color.black;
30 public static final Color STATUSBAR_MOD_FILL = Color.red;
31
32 public static final Font LABEL_FONT =
33 MetalLookAndFeel.getSubTextFont();
34 public static final FontMetrics LABEL_FONTMETRICS =
35 Toolkit.getDefaultToolkit().getFontMetrics(LABEL_FONT);
36 public static final Font LABEL_FONT_ITALIC =
37 new Font(
38 LABEL_FONT.getFamily(),
39 Font.ITALIC, LABEL_FONT.getSize()
40 );
41 public static final Color LABEL_COLOR = Color.black;
42 public static final Color LABEL_FILL = Color.lightGray;
43 public static final Color SUBLABEL_FILL = Color.white;
44 public static final int LABEL_FONT_SIZE = 10;
45
46 public static final Font EDITOR_FONT =
47 MetalLookAndFeel.getControlTextFont();
48 public static final Color EDITOR_COLOR = Color.black;
49
50 // icons
51 public static final Icon ICON_NULL =
52 new ImageIcon(
53 ResourceUtilities.getResourceAsURL("com/bonevich/erj/images/null.gif")
54 );
55 public static final Icon ICON_NOTNULL =
56 new ImageIcon(
57 ResourceUtilities.getResourceAsURL("com/bonevich/erj/images/notnull.gif")
58 );
59 public static final Icon ICON_PK =
60 new ImageIcon(
61 ResourceUtilities.getResourceAsURL("com/bonevich/erj/images/key_yellow.jpg")
62 );
63 public static final Icon ICON_AK =
64 new ImageIcon(
65 ResourceUtilities.getResourceAsURL("com/bonevich/erj/images/key_blue.jpg")
66 );
67 public static final Icon ICON_FK =
68 new ImageIcon(
69 ResourceUtilities.getResourceAsURL("com/bonevich/erj/images/key_red.jpg")
70 );
71
72 public static final Icon ICON_SCHEMA =
73 new ImageIcon(
74 ResourceUtilities.getResourceAsURL("com/bonevich/erj/images/Schema.gif")
75 );
76 public static final Icon ICON_RELATION =
77 new ImageIcon(
78 ResourceUtilities.getResourceAsURL("com/bonevich/erj/images/Relation.gif")
79 );
80 public static final Icon ICON_FOREIGNKEY =
81 new ImageIcon(
82 ResourceUtilities.getResourceAsURL("com/bonevich/erj/images/ForeignKey.gif")
83 );
84 public static final Icon ICON_DOMAIN =
85 new ImageIcon(
86 ResourceUtilities.getResourceAsURL("com/bonevich/erj/images/Domain.gif")
87 );
88
89 public static final Icon ICON_SPLASH =
90 new ImageIcon(
91 ResourceUtilities.getResourceAsURL("com/bonevich/erj/images/splash.gif")
92 );
93
94 }
This page was automatically generated by Maven