001: package net.sourceforge.squirrel_sql.plugins.syntax;
002:
003: /*
004: * Copyright (C) 2003 Colin Bell
005: * colbell@users.sourceforge.net
006: *
007: * This program is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU General Public License
009: * as published by the Free Software Foundation; either version 2
010: * of the License, or any later version.
011: *
012: * This program is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
015: * GNU General Public License for more details.
016: *
017: * You should have received a copy of the GNU General Public License
018: * along with this program; if not, write to the Free Software
019: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
020: */
021: import java.awt.Color;
022: import java.beans.PropertyChangeListener;
023: import java.io.Serializable;
024:
025: import net.sourceforge.squirrel_sql.fw.util.PropertyChangeReporter;
026:
027: /**
028: * This JavaBean class represents the user specific
029: * preferences for this plugin.
030: *
031: * @author <A HREF="mailto:colbell@users.sourceforge.net">Colin Bell</A>
032: */
033: public class SyntaxPreferences implements Serializable, Cloneable {
034: private static final long serialVersionUID = 1L;
035:
036: public interface IPropertyNames {
037: // String BLINK_CARET = "blinkCaret";
038: // String BLOCK_CARET_ENABLED = "blockCaretEnabled";
039: // String BRACKET_HIGHLIGHTING = "bracketHighlighting";
040: // String BRACKET_HIGHLIGHT_COLOR = "bracketHighlightColor";
041: // String CARET_COLOR = "caretColor";
042: String COLUMN_STYLE = "columnStyle";
043: String COMMENT_STYLE = "commentStyle";
044: // String CURRENT_LINE_HIGHLIGHTING = "currentLineHighlighting";
045: // String CURRENT_LINE_HIGHLIGHT_COLOR = "currentLineHighlightColor";
046: String DATA_TYPE_STYLE = "dataTypeStyle";
047: // String EOL_MARKERS = "eolMarkers";
048: // String EOL_MARKER_COLOR = "eolMarkerColor";
049: String ERROR_STYLE = "errorStyle";
050: String FUNCTION_STYLE = "functionStyle";
051: String IDENTIFIER_STYLE = "identifierStyle";
052: String LITERAL_STYLE = "literalStyle";
053: String OPERATOR_STYLE = "operatorStyle";
054: String RESERVED_WORD_STYLE = "reservedWordStyle";
055: String SEPARATOR_STYLE = "separatorStyle";
056: // String LINE_NUMBER_COLOR = "lineNumberColor";
057: // String SELECTION_COLOR = "selectionColor";
058: // String SHOW_LINE_NBRS = "showLineNumbers";
059: String TABLE_STYLE = "tableStyle";
060: String USE_OSTER_CONTROL = "useOsterControl";
061: String USE_NETBEANS_CONTROL = "useNetbeansControl";
062: String USE_PLAIN_CONTROL = "usePlainControl";
063: String WHITE_SPACE_STYLE = "whiteSpaceStyle";
064: String TEXT_LIMIT_LINE_VISIBLE = "textLimitLineVisible";
065: String TEXT_LIMIT_LINE_WIDTH = "textLimitLineWidth";
066: }
067:
068: /** Object to handle property change events. */
069: private transient PropertyChangeReporter _propChgReporter;
070:
071: /** If <TT>true</TT> use the Oster text control else use the standard Java control. */
072: private boolean _useOsterTextControl = false;
073: private boolean _useNetbeansTextControl = true;
074: private boolean _usePlainTextControl = false;
075:
076: /** If <TT>true</TT> use the block caret. */
077: // private boolean _blockCaretEnabled = false;
078: /** If <TT>true</TT> caret should blink. */
079: // private boolean _blinkCaret = true;
080: /** If <TT>true</TT> show EOL markers. */
081: // private boolean _showEndOfLineMarkers = false;
082: /** If <TT>true</TT> show matching brackets. */
083: // private boolean _bracketHighlighting = true;
084: /** If <TT>true</TT> the current line should be highlighted. */
085: // private boolean _currentLineHighlighting = true;
086: /** If <TT>true</TT> line numbers should be displayed. */
087: // private boolean _showLineNumbers = false;
088: private SyntaxStyle _columnStyle = new SyntaxStyle();
089: private SyntaxStyle _commentStyle = new SyntaxStyle();
090: private SyntaxStyle _dataTypeStyle = new SyntaxStyle();
091: private SyntaxStyle _errorStyle = new SyntaxStyle();
092: private SyntaxStyle _functionStyle = new SyntaxStyle();
093: private SyntaxStyle _identifierStyle = new SyntaxStyle();
094: private SyntaxStyle _literalStyle = new SyntaxStyle();
095: private SyntaxStyle _operatorStyle = new SyntaxStyle();
096: private SyntaxStyle _reservedWordStyle = new SyntaxStyle();
097: private SyntaxStyle _separatorStyle = new SyntaxStyle();
098: private SyntaxStyle _tableStyle = new SyntaxStyle();
099: private SyntaxStyle _whiteSpaceStyle = new SyntaxStyle();
100:
101: // private int _caretRGB = Color.red.getRGB();
102: // private int _selectionRGB = 0xccccff;
103: // private int _lineHighlightRGB = Color.lightGray.getRGB();
104: // private int _eolMarkerRGB = 0x009999;
105: // private int _bracketHighlightRGB = Color.black.getRGB();
106: // private int _lineNumberRGB = Color.black.getRGB();
107:
108: private boolean _textLimitLineVisible = false;
109: private int _textLimitLineWidth = 80;
110:
111: public SyntaxPreferences() {
112: super ();
113:
114: _columnStyle.setName(IConstants.IStyleNames.COLUMN);
115: _columnStyle.setBackgroundRGB(Color.white.getRGB());
116: _columnStyle.setTextRGB(-10066432);
117: _columnStyle.setBold(false);
118: _columnStyle.setItalic(false);
119:
120: _commentStyle.setName(IConstants.IStyleNames.COMMENT);
121: _commentStyle.setBackgroundRGB(Color.white.getRGB());
122: _commentStyle.setTextRGB(Color.lightGray.darker().getRGB());
123: _commentStyle.setBold(false);
124: _commentStyle.setItalic(false);
125:
126: _dataTypeStyle.setName(IConstants.IStyleNames.DATA_TYPE);
127: _dataTypeStyle.setBackgroundRGB(Color.white.getRGB());
128: _dataTypeStyle.setTextRGB(Color.yellow.darker().getRGB());
129: _dataTypeStyle.setBold(false);
130: _dataTypeStyle.setItalic(false);
131:
132: _errorStyle.setName(IConstants.IStyleNames.ERROR);
133: _errorStyle.setBackgroundRGB(Color.white.getRGB());
134: _errorStyle.setTextRGB(Color.red.getRGB());
135: _errorStyle.setBold(false);
136: _errorStyle.setItalic(false);
137:
138: _functionStyle.setName(IConstants.IStyleNames.FUNCTION);
139: _functionStyle.setBackgroundRGB(Color.white.getRGB());
140: _functionStyle.setTextRGB(Color.black.getRGB());
141: _functionStyle.setBold(false);
142: _functionStyle.setItalic(false);
143:
144: _identifierStyle.setName(IConstants.IStyleNames.IDENTIFIER);
145: _identifierStyle.setBackgroundRGB(Color.white.getRGB());
146: _identifierStyle.setTextRGB(Color.black.getRGB());
147: _identifierStyle.setBold(false);
148: _identifierStyle.setItalic(false);
149:
150: _literalStyle.setName(IConstants.IStyleNames.LITERAL);
151: _literalStyle.setBackgroundRGB(Color.white.getRGB());
152: _literalStyle.setTextRGB(11546720);
153: _literalStyle.setBold(false);
154: _literalStyle.setItalic(false);
155:
156: _operatorStyle.setName(IConstants.IStyleNames.OPERATOR);
157: _operatorStyle.setBackgroundRGB(Color.white.getRGB());
158: _operatorStyle.setTextRGB(Color.black.getRGB());
159: _operatorStyle.setBold(true);
160: _operatorStyle.setItalic(false);
161:
162: _reservedWordStyle
163: .setName(IConstants.IStyleNames.RESERVED_WORD);
164: _reservedWordStyle.setBackgroundRGB(Color.white.getRGB());
165: _reservedWordStyle.setTextRGB(Color.blue.getRGB());
166: _reservedWordStyle.setBold(false);
167: _reservedWordStyle.setItalic(false);
168:
169: _separatorStyle.setName(IConstants.IStyleNames.SEPARATOR);
170: _separatorStyle.setBackgroundRGB(Color.white.getRGB());
171: _separatorStyle.setTextRGB(0x000080); // Navy.
172: _separatorStyle.setBold(false);
173: _separatorStyle.setItalic(false);
174:
175: _tableStyle.setName(IConstants.IStyleNames.TABLE);
176: _tableStyle.setBackgroundRGB(Color.white.getRGB());
177: _tableStyle.setTextRGB(-16738048);
178: _tableStyle.setBold(false);
179: _tableStyle.setItalic(false);
180:
181: _whiteSpaceStyle.setName(IConstants.IStyleNames.WHITESPACE);
182: _whiteSpaceStyle.setBackgroundRGB(Color.white.getRGB());
183: _whiteSpaceStyle.setTextRGB(Color.black.getRGB());
184: _whiteSpaceStyle.setBold(false);
185: _whiteSpaceStyle.setItalic(false);
186:
187: // final TextAreaDefaults dfts = TextAreaDefaults.getDefaults();
188: // _columnStyle = dfts.styles[Token.COLUMN];
189: // _commentStyle = dfts.styles[Token.COMMENT1];
190: // _keyword1Style = dfts.styles[Token.KEYWORD];
191: // _keyword2Style = dfts.styles[Token.DATA_TYPE];
192: // _keyword3Style = dfts.styles[Token.FUNCTION];
193: // _labelStyle = dfts.styles[Token.LABEL];
194: // _literalStyle = dfts.styles[Token.LITERAL1];
195: // _operatorStyle = dfts.styles[Token.OPERATOR];
196: // _otherStyle = dfts.styles[Token.NULL];
197: // _tableStyle = dfts.styles[Token.TABLE];
198: }
199:
200: public Object clone() throws CloneNotSupportedException {
201: try {
202: SyntaxPreferences prefs = (SyntaxPreferences) super .clone();
203: prefs._propChgReporter = null;
204:
205: return prefs;
206: } catch (CloneNotSupportedException ex) {
207: throw new InternalError(ex.getMessage()); // Impossible.
208: }
209: }
210:
211: public void addPropertyChangeListener(
212: PropertyChangeListener listener) {
213: getPropertyChangeReporter().addPropertyChangeListener(listener);
214: }
215:
216: public void removePropertyChangeListener(
217: PropertyChangeListener listener) {
218: getPropertyChangeReporter().removePropertyChangeListener(
219: listener);
220: }
221:
222: public boolean getUseOsterTextControl() {
223: return _useOsterTextControl;
224: }
225:
226: public void setUseOsterTextControl(boolean data) {
227: if (_useOsterTextControl != data) {
228: getPropertyChangeReporter().firePropertyChange(
229: IPropertyNames.USE_OSTER_CONTROL,
230: _useOsterTextControl, data);
231: _useOsterTextControl = data;
232: }
233: }
234:
235: public boolean getUseNetbeansTextControl() {
236: return _useNetbeansTextControl;
237: }
238:
239: public void setUseNetbeansTextControl(boolean data) {
240: if (_useNetbeansTextControl != data) {
241: getPropertyChangeReporter().firePropertyChange(
242: IPropertyNames.USE_NETBEANS_CONTROL,
243: _useNetbeansTextControl, data);
244: _useNetbeansTextControl = data;
245: }
246: }
247:
248: public boolean getUsePlainTextControl() {
249: return _usePlainTextControl;
250: }
251:
252: public void setUsePlainTextControl(boolean data) {
253: if (_usePlainTextControl != data) {
254: getPropertyChangeReporter().firePropertyChange(
255: IPropertyNames.USE_PLAIN_CONTROL,
256: _usePlainTextControl, data);
257: _usePlainTextControl = data;
258: }
259: }
260:
261: // public boolean getBracketHighlighting()
262: // {
263: // return _bracketHighlighting;
264: // }
265: //
266: // public void setBracketHighlighting(boolean data)
267: // {
268: // if (_bracketHighlighting != data)
269: // {
270: // final boolean oldValue = _bracketHighlighting;
271: // _bracketHighlighting = data;
272: // getPropertyChangeReporter().firePropertyChange(IPropertyNames.BRACKET_HIGHLIGHTING,
273: // oldValue, _bracketHighlighting);
274: // }
275: // }
276: //
277: // public boolean isBlockCaretEnabled()
278: // {
279: // return _blockCaretEnabled;
280: // }
281: //
282: // public void setBlockCaretEnabled(boolean data)
283: // {
284: // if (_blockCaretEnabled != data)
285: // {
286: // final boolean oldValue = _blockCaretEnabled;
287: // _blockCaretEnabled = data;
288: // getPropertyChangeReporter().firePropertyChange(IPropertyNames.BLOCK_CARET_ENABLED,
289: // oldValue, _blockCaretEnabled);
290: // }
291: // }
292: //
293: // public boolean getEOLMarkers()
294: // {
295: // return _showEndOfLineMarkers;
296: // }
297: //
298: // public void setEOLMarkers(boolean data)
299: // {
300: // if (_showEndOfLineMarkers != data)
301: // {
302: // final boolean oldValue = _showEndOfLineMarkers;
303: // _showEndOfLineMarkers = data;
304: // getPropertyChangeReporter().firePropertyChange(IPropertyNames.EOL_MARKERS,
305: // oldValue, _showEndOfLineMarkers);
306: // }
307: // }
308: //
309: // public boolean getCurrentLineHighlighting()
310: // {
311: // return _currentLineHighlighting;
312: // }
313: //
314: // public void setCurrentLineHighlighting(boolean data)
315: // {
316: // if (_currentLineHighlighting != data)
317: // {
318: // final boolean oldValue = _currentLineHighlighting;
319: // _currentLineHighlighting = data;
320: // getPropertyChangeReporter().firePropertyChange(IPropertyNames.CURRENT_LINE_HIGHLIGHTING,
321: // oldValue, _currentLineHighlighting);
322: // }
323: // }
324: //
325: // public boolean getBlinkCaret()
326: // {
327: // return _blinkCaret;
328: // }
329: //
330: // public void setBlinkCaret(boolean data)
331: // {
332: // if (_blinkCaret != data)
333: // {
334: // final boolean oldValue = _blinkCaret;
335: // _blinkCaret = data;
336: // getPropertyChangeReporter().firePropertyChange(IPropertyNames.BLINK_CARET,
337: // oldValue, _blinkCaret);
338: // }
339: // }
340: //
341: // public boolean getShowLineNumbers()
342: // {
343: // return _showLineNumbers;
344: // }
345: //
346: // public void setShowLineNumbers(boolean data)
347: // {
348: // if (_showLineNumbers != data)
349: // {
350: // final boolean oldValue = _showLineNumbers;
351: // _showLineNumbers = data;
352: // getPropertyChangeReporter().firePropertyChange(IPropertyNames.SHOW_LINE_NBRS,
353: // oldValue, _showLineNumbers);
354: // }
355: // }
356:
357: public boolean isTextLimitLineVisible() {
358: return _textLimitLineVisible;
359: }
360:
361: public void setTextLimitLineVisible(boolean data) {
362: if (_textLimitLineVisible != data) {
363: final Boolean oldValue = Boolean
364: .valueOf(_textLimitLineVisible);
365: _textLimitLineVisible = data;
366: getPropertyChangeReporter().firePropertyChange(
367: IPropertyNames.TEXT_LIMIT_LINE_VISIBLE, oldValue,
368: Boolean.valueOf(_textLimitLineVisible));
369: }
370: }
371:
372: public int getTextLimitLineWidth() {
373: return _textLimitLineWidth;
374: }
375:
376: public void setTextLimitLineWidth(int data) {
377: if (_textLimitLineWidth != data) {
378: final Integer oldValue = Integer
379: .valueOf(_textLimitLineWidth);
380: _textLimitLineWidth = data;
381: getPropertyChangeReporter().firePropertyChange(
382: IPropertyNames.TEXT_LIMIT_LINE_WIDTH, oldValue,
383: Integer.valueOf(_textLimitLineWidth));
384: }
385:
386: }
387:
388: public SyntaxStyle getCommentStyle() {
389: return _commentStyle;
390: }
391:
392: public void setCommentStyle(SyntaxStyle data) {
393: if (data == null) {
394: throw new IllegalArgumentException("SyntaxStyle==null");
395: }
396:
397: if (_commentStyle != data) {
398: final SyntaxStyle oldValue = _commentStyle;
399: _commentStyle = data;
400: getPropertyChangeReporter().firePropertyChange(
401: IPropertyNames.COMMENT_STYLE, oldValue,
402: _commentStyle);
403: }
404: }
405:
406: public SyntaxStyle getDataTypeStyle() {
407: return _dataTypeStyle;
408: }
409:
410: public void setDataTypeStyle(SyntaxStyle data) {
411: if (data == null) {
412: throw new IllegalArgumentException("SyntaxStyle==null");
413: }
414:
415: if (_dataTypeStyle != data) {
416: final SyntaxStyle oldValue = _dataTypeStyle;
417: _dataTypeStyle = data;
418: getPropertyChangeReporter().firePropertyChange(
419: IPropertyNames.DATA_TYPE_STYLE, oldValue,
420: _dataTypeStyle);
421: }
422: }
423:
424: public SyntaxStyle getErrorStyle() {
425: return _errorStyle;
426: }
427:
428: public void setErrorStyle(SyntaxStyle data) {
429: if (data == null) {
430: throw new IllegalArgumentException("SyntaxStyle==null");
431: }
432:
433: if (_errorStyle != data) {
434: final SyntaxStyle oldValue = _errorStyle;
435: _errorStyle = data;
436: getPropertyChangeReporter().firePropertyChange(
437: IPropertyNames.ERROR_STYLE, oldValue, _errorStyle);
438: }
439: }
440:
441: public SyntaxStyle getFunctionStyle() {
442: return _functionStyle;
443: }
444:
445: public void setFunctionStyle(SyntaxStyle data) {
446: if (data == null) {
447: throw new IllegalArgumentException("SyntaxStyle==null");
448: }
449:
450: if (_functionStyle != data) {
451: final SyntaxStyle oldValue = _functionStyle;
452: _functionStyle = data;
453: getPropertyChangeReporter().firePropertyChange(
454: IPropertyNames.FUNCTION_STYLE, oldValue,
455: _functionStyle);
456: }
457: }
458:
459: public SyntaxStyle getIdentifierStyle() {
460: return _identifierStyle;
461: }
462:
463: public void setIdentifierStyle(SyntaxStyle data) {
464: if (data == null) {
465: throw new IllegalArgumentException("SyntaxStyle==null");
466: }
467:
468: if (_identifierStyle != data) {
469: final SyntaxStyle oldValue = _identifierStyle;
470: _identifierStyle = data;
471: getPropertyChangeReporter().firePropertyChange(
472: IPropertyNames.IDENTIFIER_STYLE, oldValue,
473: _identifierStyle);
474: }
475: }
476:
477: public SyntaxStyle getLiteralStyle() {
478: return _literalStyle;
479: }
480:
481: public void setLiteralStyle(SyntaxStyle data) {
482: if (data == null) {
483: throw new IllegalArgumentException("SyntaxStyle==null");
484: }
485:
486: if (_literalStyle != data) {
487: final SyntaxStyle oldValue = _literalStyle;
488: _literalStyle = data;
489: getPropertyChangeReporter().firePropertyChange(
490: IPropertyNames.LITERAL_STYLE, oldValue,
491: _literalStyle);
492: }
493: }
494:
495: public SyntaxStyle getTableStyle() {
496: return _tableStyle;
497: }
498:
499: public void setTableStyle(SyntaxStyle data) {
500: if (data == null) {
501: throw new IllegalArgumentException("SyntaxStyle==null");
502: }
503:
504: if (_tableStyle != data) {
505: final SyntaxStyle oldValue = _tableStyle;
506: _tableStyle = data;
507: getPropertyChangeReporter().firePropertyChange(
508: IPropertyNames.TABLE_STYLE, oldValue, _tableStyle);
509: }
510: }
511:
512: public SyntaxStyle getColumnStyle() {
513: return _columnStyle;
514: }
515:
516: public void setColumnStyle(SyntaxStyle data) {
517: if (data == null) {
518: throw new IllegalArgumentException("SyntaxStyle==null");
519: }
520:
521: if (_columnStyle != data) {
522: final SyntaxStyle oldValue = _columnStyle;
523: _columnStyle = data;
524: getPropertyChangeReporter()
525: .firePropertyChange(IPropertyNames.COLUMN_STYLE,
526: oldValue, _columnStyle);
527: }
528: }
529:
530: public SyntaxStyle getOperatorStyle() {
531: return _operatorStyle;
532: }
533:
534: public void setOperatorStyle(SyntaxStyle data) {
535: if (data == null) {
536: throw new IllegalArgumentException("SyntaxStyle==null");
537: }
538:
539: if (_operatorStyle != data) {
540: final SyntaxStyle oldValue = _operatorStyle;
541: _operatorStyle = data;
542: getPropertyChangeReporter().firePropertyChange(
543: IPropertyNames.OPERATOR_STYLE, oldValue,
544: _operatorStyle);
545: }
546: }
547:
548: public SyntaxStyle getReservedWordStyle() {
549: return _reservedWordStyle;
550: }
551:
552: public void setReservedWordStyle(SyntaxStyle data) {
553: if (data == null) {
554: throw new IllegalArgumentException("SyntaxStyle==null");
555: }
556:
557: if (_reservedWordStyle != data) {
558: final SyntaxStyle oldValue = _reservedWordStyle;
559: _reservedWordStyle = data;
560: getPropertyChangeReporter().firePropertyChange(
561: IPropertyNames.RESERVED_WORD_STYLE, oldValue,
562: _reservedWordStyle);
563: }
564: }
565:
566: public SyntaxStyle getSeparatorStyle() {
567: return _separatorStyle;
568: }
569:
570: public void setSeparatorStyle(SyntaxStyle data) {
571: if (data == null) {
572: throw new IllegalArgumentException("SyntaxStyle==null");
573: }
574:
575: if (_separatorStyle != data) {
576: final SyntaxStyle oldValue = _separatorStyle;
577: _separatorStyle = data;
578: getPropertyChangeReporter().firePropertyChange(
579: IPropertyNames.SEPARATOR_STYLE, oldValue,
580: _separatorStyle);
581: }
582: }
583:
584: public SyntaxStyle getWhiteSpaceStyle() {
585: return _whiteSpaceStyle;
586: }
587:
588: public void setWhiteSpaceStyle(SyntaxStyle data) {
589: if (data == null) {
590: throw new IllegalArgumentException("SyntaxStyle==null");
591: }
592:
593: if (_whiteSpaceStyle != data) {
594: final SyntaxStyle oldValue = _whiteSpaceStyle;
595: _whiteSpaceStyle = data;
596: getPropertyChangeReporter().firePropertyChange(
597: IPropertyNames.WHITE_SPACE_STYLE, oldValue,
598: _whiteSpaceStyle);
599: }
600: }
601:
602: // public int getCaretRGB()
603: // {
604: // return _caretRGB;
605: // }
606: //
607: // public void setCaretRGB(int data)
608: // {
609: // if (_caretRGB != data)
610: // {
611: // final int oldValue = _caretRGB;
612: // _caretRGB = data;
613: // getPropertyChangeReporter().firePropertyChange(IPropertyNames.CARET_COLOR,
614: // oldValue, _caretRGB);
615: // }
616: // }
617: //
618: // public int getSelectionRGB()
619: // {
620: // return _selectionRGB;
621: // }
622: //
623: // public void setSelectionRGB(int data)
624: // {
625: // if (_selectionRGB != data)
626: // {
627: // final int oldValue = _selectionRGB;
628: // _selectionRGB = data;
629: // getPropertyChangeReporter().firePropertyChange(IPropertyNames.SELECTION_COLOR,
630: // oldValue, _selectionRGB);
631: // }
632: // }
633: //
634: // public int getCurrentLineHighlightRGB()
635: // {
636: // return _lineHighlightRGB;
637: // }
638: //
639: // public void setCurrentLineHighlightRGB(int data)
640: // {
641: // if (_lineHighlightRGB != data)
642: // {
643: // final int oldValue = _lineHighlightRGB;
644: // _lineHighlightRGB = data;
645: // getPropertyChangeReporter().firePropertyChange(IPropertyNames.CURRENT_LINE_HIGHLIGHT_COLOR,
646: // oldValue, _lineHighlightRGB);
647: // }
648: // }
649: //
650: // public int getEOLMarkerRGB()
651: // {
652: // return _eolMarkerRGB;
653: // }
654: //
655: // public void setEOLMarkerRGB(int data)
656: // {
657: // if (_eolMarkerRGB != data)
658: // {
659: // final int oldValue = _eolMarkerRGB;
660: // _eolMarkerRGB = data;
661: // getPropertyChangeReporter().firePropertyChange(IPropertyNames.EOL_MARKER_COLOR,
662: // oldValue, _eolMarkerRGB);
663: // }
664: // }
665: //
666: // public int getBracketHighlightRGB()
667: // {
668: // return _bracketHighlightRGB;
669: // }
670: //
671: // public void setBracketHighlightRGB(int data)
672: // {
673: // if (_bracketHighlightRGB != data)
674: // {
675: // final int oldValue = _bracketHighlightRGB;
676: // _bracketHighlightRGB = data;
677: // getPropertyChangeReporter().firePropertyChange(IPropertyNames.BRACKET_HIGHLIGHT_COLOR,
678: // oldValue, _bracketHighlightRGB);
679: // }
680: // }
681: //
682: // public int getLineNumberRGB()
683: // {
684: // return _lineNumberRGB;
685: // }
686: //
687: // public void setLineNumberRGB(int data)
688: // {
689: // if (_lineNumberRGB != data)
690: // {
691: // final int oldValue = _lineNumberRGB;
692: // _lineNumberRGB = data;
693: // getPropertyChangeReporter().firePropertyChange(IPropertyNames.LINE_NUMBER_COLOR,
694: // oldValue, _lineNumberRGB);
695: // }
696: // }
697:
698: private synchronized PropertyChangeReporter getPropertyChangeReporter() {
699: if (_propChgReporter == null) {
700: _propChgReporter = new PropertyChangeReporter(this);
701: }
702:
703: return _propChgReporter;
704: }
705: }
|