Lines 63-69
Link Here
|
63 |
import javax.swing.BorderFactory; |
63 |
import javax.swing.BorderFactory; |
64 |
import javax.swing.Icon; |
64 |
import javax.swing.Icon; |
65 |
import javax.swing.JPanel; |
65 |
import javax.swing.JPanel; |
66 |
|
66 |
import org.netbeans.swing.plaf.LFCustoms; |
67 |
|
67 |
|
68 |
/** |
68 |
/** |
69 |
* |
69 |
* |
Lines 101-109
Link Here
|
101 |
"", " ", "[]", "(", ")", ", ", "String", THROWS // NOI18N |
101 |
"", " ", "[]", "(", ")", ", ", "String", THROWS // NOI18N |
102 |
}; |
102 |
}; |
103 |
|
103 |
|
104 |
private static final Color KEYWORD_COLOR = Color.darkGray; |
104 |
private final static Color KEYWORD_COLOR = Color.gray; |
105 |
private static final Color TYPE_COLOR = Color.black; |
105 |
private final static Color POSTFIX_COLOR = Color.lightGray; |
106 |
private static final Color POSTFIX_COLOR = Color.gray; |
|
|
107 |
|
106 |
|
108 |
private Icon icon; |
107 |
private Icon icon; |
109 |
|
108 |
|
Lines 128-148
Link Here
|
128 |
@Override |
127 |
@Override |
129 |
public void paintComponent(Graphics g) { |
128 |
public void paintComponent(Graphics g) { |
130 |
// clear background |
129 |
// clear background |
|
|
130 |
Color postfixColor = LFCustoms.shiftColor(POSTFIX_COLOR); |
131 |
g.setColor(getBackground()); |
131 |
g.setColor(getBackground()); |
132 |
java.awt.Rectangle r = g.getClipBounds(); |
132 |
java.awt.Rectangle r = g.getClipBounds(); |
133 |
g.fillRect(r.x, r.y, r.width, r.height); |
133 |
g.fillRect(r.x, r.y, r.width, r.height); |
134 |
draw(g); |
134 |
draw(g); |
135 |
|
135 |
|
136 |
if(!postfixes.isEmpty()) { |
136 |
if(!postfixes.isEmpty()) { |
137 |
drawString(g, " (", POSTFIX_COLOR); // NOI18N |
137 |
drawString(g, " (", postfixColor); // NOI18N |
138 |
Iterator iter = postfixes.iterator(); |
138 |
Iterator iter = postfixes.iterator(); |
139 |
while(iter.hasNext()) { |
139 |
while(iter.hasNext()) { |
140 |
((PostfixString) iter.next()).Draw(g); |
140 |
((PostfixString) iter.next()).Draw(g); |
141 |
if(iter.hasNext()) { |
141 |
if(iter.hasNext()) { |
142 |
drawString(g, ", ", POSTFIX_COLOR); // NOI18N |
142 |
drawString(g, ", ", postfixColor); // NOI18N |
143 |
} |
143 |
} |
144 |
} |
144 |
} |
145 |
drawString(g, ")", POSTFIX_COLOR); // NOI18N |
145 |
drawString(g, ")", postfixColor); // NOI18N |
146 |
} |
146 |
} |
147 |
} |
147 |
} |
148 |
|
148 |
|
Lines 372-378
Link Here
|
372 |
} |
372 |
} |
373 |
|
373 |
|
374 |
public PostfixString(String text, int fontStyle) { |
374 |
public PostfixString(String text, int fontStyle) { |
375 |
this(text, CsmPaintComponent.POSTFIX_COLOR, fontStyle); |
375 |
this(text, LFCustoms.shiftColor(CsmPaintComponent.POSTFIX_COLOR), fontStyle); |
376 |
} |
376 |
} |
377 |
|
377 |
|
378 |
void Draw(Graphics g) { |
378 |
void Draw(Graphics g) { |
Lines 397-403
Link Here
|
397 |
|
397 |
|
398 |
private String pkgName; |
398 |
private String pkgName; |
399 |
private boolean displayFullNamespacePath; |
399 |
private boolean displayFullNamespacePath; |
400 |
private Color NAMESPACE_COLOR = Color.green.darker().darker().darker(); |
400 |
private Color NAMESPACE_COLOR = LFCustoms.shiftColor(new Color(64,255,64)); |
401 |
|
401 |
|
402 |
public NamespacePaintComponent(){ |
402 |
public NamespacePaintComponent(){ |
403 |
super(); |
403 |
super(); |
Lines 436-442
Link Here
|
436 |
public static class NamespaceAliasPaintComponent extends CsmPaintComponent{ |
436 |
public static class NamespaceAliasPaintComponent extends CsmPaintComponent{ |
437 |
|
437 |
|
438 |
private String aliasName; |
438 |
private String aliasName; |
439 |
private Color NAMESPACE_COLOR = Color.green.darker().darker().darker(); |
439 |
private Color NAMESPACE_COLOR = LFCustoms.shiftColor(new Color(64,255,64)); |
440 |
|
440 |
|
441 |
public NamespaceAliasPaintComponent(){ |
441 |
public NamespaceAliasPaintComponent(){ |
442 |
super(); |
442 |
super(); |
Lines 467-473
Link Here
|
467 |
public static class EnumPaintComponent extends CsmPaintComponent { |
467 |
public static class EnumPaintComponent extends CsmPaintComponent { |
468 |
|
468 |
|
469 |
String formatEnumName; |
469 |
String formatEnumName; |
470 |
private Color ENUM_COLOR = Color.red.darker().darker().darker().darker(); |
470 |
private Color ENUM_COLOR = LFCustoms.shiftColor(new Color(255,64,64)); |
471 |
private boolean displayFQN; |
471 |
private boolean displayFQN; |
472 |
|
472 |
|
473 |
public void EnumPaintComponent(String formatEnumName){ |
473 |
public void EnumPaintComponent(String formatEnumName){ |
Lines 504-510
Link Here
|
504 |
public static class EnumeratorPaintComponent extends CsmPaintComponent { |
504 |
public static class EnumeratorPaintComponent extends CsmPaintComponent { |
505 |
|
505 |
|
506 |
String formatEnumeratorName; |
506 |
String formatEnumeratorName; |
507 |
private Color ENUMERATOR_COLOR = Color.blue.darker().darker().darker().darker(); |
507 |
private Color ENUMERATOR_COLOR = LFCustoms.shiftColor(new Color(64,64,255)); |
508 |
private boolean displayFQN; |
508 |
private boolean displayFQN; |
509 |
|
509 |
|
510 |
public void EnumeratorPaintComponent(String formatEnumeratorName){ |
510 |
public void EnumeratorPaintComponent(String formatEnumeratorName){ |
Lines 542-548
Link Here
|
542 |
public static class ClassPaintComponent extends CsmPaintComponent{ |
542 |
public static class ClassPaintComponent extends CsmPaintComponent{ |
543 |
|
543 |
|
544 |
String formatClassName; |
544 |
String formatClassName; |
545 |
private Color CLASS_COLOR = Color.red.darker().darker().darker(); |
545 |
private Color CLASS_COLOR = LFCustoms.shiftColor(new Color(255,64,64)); |
546 |
private boolean displayFQN; |
546 |
private boolean displayFQN; |
547 |
|
547 |
|
548 |
public void setFormatClassName(String formatClassName){ |
548 |
public void setFormatClassName(String formatClassName){ |
Lines 576-582
Link Here
|
576 |
public static class TypedefPaintComponent extends CsmPaintComponent{ |
576 |
public static class TypedefPaintComponent extends CsmPaintComponent{ |
577 |
|
577 |
|
578 |
String formatTypedefName; |
578 |
String formatTypedefName; |
579 |
private final Color TYPEDEF_COLOR = CsmFontColorManager.instance().getColor(FontColorProvider.Entity.TYPEDEF); //Color.blue.darker().darker().darker(); |
579 |
private final Color TYPEDEF_COLOR = CsmFontColorManager.instance().getColor(FontColorProvider.Entity.TYPEDEF); //new Color(64,64,255).darker().darker().darker(); |
580 |
//private boolean displayFQN; |
580 |
//private boolean displayFQN; |
581 |
|
581 |
|
582 |
public void setFormatTypedefName(String formatTypedefName){ |
582 |
public void setFormatTypedefName(String formatTypedefName){ |
Lines 609-615
Link Here
|
609 |
|
609 |
|
610 |
public static class StructPaintComponent extends ClassPaintComponent{ |
610 |
public static class StructPaintComponent extends ClassPaintComponent{ |
611 |
|
611 |
|
612 |
private Color STRUCT_COLOR = Color.red.darker().darker(); |
612 |
private Color STRUCT_COLOR = LFCustoms.shiftColor(new Color(255,64,64)); |
613 |
|
613 |
|
614 |
@Override |
614 |
@Override |
615 |
protected Color getColor(){ |
615 |
protected Color getColor(){ |
Lines 623-629
Link Here
|
623 |
|
623 |
|
624 |
public static class UnionPaintComponent extends ClassPaintComponent{ |
624 |
public static class UnionPaintComponent extends ClassPaintComponent{ |
625 |
|
625 |
|
626 |
private Color UNION_COLOR = Color.red.darker(); |
626 |
private Color UNION_COLOR = LFCustoms.shiftColor(new Color(255,64,64)); |
627 |
|
627 |
|
628 |
@Override |
628 |
@Override |
629 |
protected Color getColor(){ |
629 |
protected Color getColor(){ |
Lines 636-642
Link Here
|
636 |
} |
636 |
} |
637 |
|
637 |
|
638 |
public static class FieldPaintComponent extends CsmPaintComponent{ |
638 |
public static class FieldPaintComponent extends CsmPaintComponent{ |
639 |
private Color FIELD_COLOR = CsmFontColorManager.instance().getColor(FontColorProvider.Entity.CLASS_FIELD);//Color.blue.darker(); |
639 |
private Color FIELD_COLOR = CsmFontColorManager.instance().getColor(FontColorProvider.Entity.CLASS_FIELD);//new Color(64,64,255).darker(); |
640 |
protected String typeName; |
640 |
protected String typeName; |
641 |
protected Color typeColor; |
641 |
protected Color typeColor; |
642 |
protected String fldName; |
642 |
protected String fldName; |
Lines 720-726
Link Here
|
720 |
} |
720 |
} |
721 |
|
721 |
|
722 |
public static class LocalVariablePaintComponent extends FieldPaintComponent { |
722 |
public static class LocalVariablePaintComponent extends FieldPaintComponent { |
723 |
private Color VARIABLE_COLOR = Color.red.darker().darker().darker(); |
723 |
private Color VARIABLE_COLOR = LFCustoms.shiftColor(new Color(255,64,64)); |
724 |
|
724 |
|
725 |
public LocalVariablePaintComponent(){ |
725 |
public LocalVariablePaintComponent(){ |
726 |
super(); |
726 |
super(); |
Lines 739-745
Link Here
|
739 |
} |
739 |
} |
740 |
|
740 |
|
741 |
public static class FileLocalVariablePaintComponent extends FieldPaintComponent { |
741 |
public static class FileLocalVariablePaintComponent extends FieldPaintComponent { |
742 |
private Color VARIABLE_COLOR = Color.blue.darker().darker().darker(); |
742 |
private Color VARIABLE_COLOR = LFCustoms.shiftColor(new Color(64,64,255)); |
743 |
|
743 |
|
744 |
public FileLocalVariablePaintComponent(){ |
744 |
public FileLocalVariablePaintComponent(){ |
745 |
super(); |
745 |
super(); |
Lines 752-758
Link Here
|
752 |
} |
752 |
} |
753 |
|
753 |
|
754 |
public static class GlobalVariablePaintComponent extends FieldPaintComponent { |
754 |
public static class GlobalVariablePaintComponent extends FieldPaintComponent { |
755 |
private Color VARIABLE_COLOR = Color.blue.darker().darker().darker(); |
755 |
private Color VARIABLE_COLOR = LFCustoms.shiftColor(new Color(64,64,255)); |
756 |
|
756 |
|
757 |
public GlobalVariablePaintComponent(){ |
757 |
public GlobalVariablePaintComponent(){ |
758 |
super(); |
758 |
super(); |
Lines 765-772
Link Here
|
765 |
} |
765 |
} |
766 |
|
766 |
|
767 |
public static class MacroPaintComponent extends CsmPaintComponent{ |
767 |
public static class MacroPaintComponent extends CsmPaintComponent{ |
768 |
private Color MACRO_NAME_COLOR = CsmFontColorManager.instance().getColor(FontColorProvider.Entity.DEFINED_MACRO);//Color.green.darker().darker(); |
768 |
private Color MACRO_NAME_COLOR = CsmFontColorManager.instance().getColor(FontColorProvider.Entity.DEFINED_MACRO);//new Color(64,255,64).darker().darker(); |
769 |
private Color MACRO_PARAMETER_NAME_COLOR = new Color(163, 102, 10);//Color.magenta.darker(); |
769 |
private Color MACRO_PARAMETER_NAME_COLOR = LFCustoms.shiftColor(new Color(227, 166, 74));//Color.magenta.darker(); |
770 |
private List params = null; |
770 |
private List params = null; |
771 |
private String name; |
771 |
private String name; |
772 |
|
772 |
|
Lines 848-854
Link Here
|
848 |
} |
848 |
} |
849 |
|
849 |
|
850 |
public static class TemplateParameterPaintComponent extends CsmPaintComponent{ |
850 |
public static class TemplateParameterPaintComponent extends CsmPaintComponent{ |
851 |
private Color PARAMETER_NAME_COLOR = Color.BLACK.darker().darker(); |
851 |
private Color PARAMETER_NAME_COLOR = LFCustoms.getTextFgColor(); |
852 |
private List params = null; |
852 |
private List params = null; |
853 |
private String name; |
853 |
private String name; |
854 |
|
854 |
|
Lines 897-903
Link Here
|
897 |
} |
897 |
} |
898 |
|
898 |
|
899 |
public static class LabelPaintComponent extends CsmPaintComponent { |
899 |
public static class LabelPaintComponent extends CsmPaintComponent { |
900 |
private Color LABEL_NAME_COLOR = Color.BLACK.darker().darker(); |
900 |
private Color LABEL_NAME_COLOR = LFCustoms.getTextFgColor(); |
901 |
private List params = null; |
901 |
private List params = null; |
902 |
private String name; |
902 |
private String name; |
903 |
|
903 |
|
Lines 947-954
Link Here
|
947 |
|
947 |
|
948 |
public static class ConstructorPaintComponent extends CsmPaintComponent{ |
948 |
public static class ConstructorPaintComponent extends CsmPaintComponent{ |
949 |
|
949 |
|
950 |
private Color CONSTRUCTOR_COLOR = Color.orange.darker().darker(); |
950 |
private Color CONSTRUCTOR_COLOR = LFCustoms.shiftColor(Color.orange); |
951 |
private Color PARAMETER_NAME_COLOR = new Color(163, 102, 10);//Color.magenta.darker(); |
951 |
private Color PARAMETER_NAME_COLOR = LFCustoms.shiftColor(new Color(227, 166, 74));//Color.magenta.darker(); |
952 |
private List params = new ArrayList(); |
952 |
private List params = new ArrayList(); |
953 |
private List excs = new ArrayList(); |
953 |
private List excs = new ArrayList(); |
954 |
private String name; |
954 |
private String name; |
Lines 1020-1026
Link Here
|
1020 |
|
1020 |
|
1021 |
protected void drawExceptions(Graphics g, List exc, boolean strike) { |
1021 |
protected void drawExceptions(Graphics g, List exc, boolean strike) { |
1022 |
if (exc.size() > 0) { |
1022 |
if (exc.size() > 0) { |
1023 |
drawString(g, THROWS, KEYWORD_COLOR, null, strike); |
1023 |
drawString(g, THROWS, LFCustoms.shiftColor(KEYWORD_COLOR), null, strike); |
1024 |
for (Iterator it = exc.iterator(); it.hasNext();) { |
1024 |
for (Iterator it = exc.iterator(); it.hasNext();) { |
1025 |
ExceptionStr ex = (ExceptionStr) it.next(); |
1025 |
ExceptionStr ex = (ExceptionStr) it.next(); |
1026 |
drawString(g, ex.getName(), ex.getTypeColor(), null, strike); |
1026 |
drawString(g, ex.getName(), ex.getTypeColor(), null, strike); |
Lines 1106-1112
Link Here
|
1106 |
public static class MethodPaintComponent extends ConstructorPaintComponent { |
1106 |
public static class MethodPaintComponent extends ConstructorPaintComponent { |
1107 |
|
1107 |
|
1108 |
//private Color PARAMETER_NAME_COLOR = Color.magenta.darker(); |
1108 |
//private Color PARAMETER_NAME_COLOR = Color.magenta.darker(); |
1109 |
private Color METHOD_COLOR = Color.black;//red.darker().darker(); |
1109 |
private Color METHOD_COLOR = LFCustoms.getTextFgColor(); |
1110 |
private String typeName; |
1110 |
private String typeName; |
1111 |
private Color typeColor; |
1111 |
private Color typeColor; |
1112 |
private boolean drawTypeAsPrefix = false; |
1112 |
private boolean drawTypeAsPrefix = false; |
Lines 1191-1197
Link Here
|
1191 |
} |
1191 |
} |
1192 |
|
1192 |
|
1193 |
public static class FileLocalFunctionPaintComponent extends MethodPaintComponent { |
1193 |
public static class FileLocalFunctionPaintComponent extends MethodPaintComponent { |
1194 |
private Color FUN_COLOR = Color.black;//red.darker().darker(); |
1194 |
private Color FUN_COLOR = LFCustoms.getTextFgColor(); |
1195 |
|
1195 |
|
1196 |
public FileLocalFunctionPaintComponent(){ |
1196 |
public FileLocalFunctionPaintComponent(){ |
1197 |
super(); |
1197 |
super(); |
Lines 1204-1210
Link Here
|
1204 |
} |
1204 |
} |
1205 |
|
1205 |
|
1206 |
public static class GlobalFunctionPaintComponent extends MethodPaintComponent { |
1206 |
public static class GlobalFunctionPaintComponent extends MethodPaintComponent { |
1207 |
private Color FUN_COLOR = Color.black;//.red.darker().darker(); |
1207 |
private Color FUN_COLOR = LFCustoms.getTextFgColor(); |
1208 |
|
1208 |
|
1209 |
public GlobalFunctionPaintComponent(){ |
1209 |
public GlobalFunctionPaintComponent(){ |
1210 |
super(); |
1210 |
super(); |
Lines 1278-1284
Link Here
|
1278 |
@Override |
1278 |
@Override |
1279 |
protected void draw(Graphics g){ |
1279 |
protected void draw(Graphics g){ |
1280 |
drawIcon(g, null); |
1280 |
drawIcon(g, null); |
1281 |
drawString(g, str, TYPE_COLOR); |
1281 |
drawString(g, str, LFCustoms.getTextFgColor()); |
1282 |
} |
1282 |
} |
1283 |
|
1283 |
|
1284 |
@Override |
1284 |
@Override |