Last change
on this file since 25584 was 25584, checked in by davidb, 12 years ago |
Initial cut an a text edit area for GLI that supports color syntax highlighting
|
File size:
1.4 KB
|
Line | |
---|
1 | /*
|
---|
2 | * 10/28/2004
|
---|
3 | *
|
---|
4 | * VisibleWhitespaceTokenFactory.java - Visible whitespace token factory.
|
---|
5 | *
|
---|
6 | * This library is distributed under a modified BSD license. See the included
|
---|
7 | * RSyntaxTextArea.License.txt file for details.
|
---|
8 | */
|
---|
9 | package org.fife.ui.rsyntaxtextarea;
|
---|
10 |
|
---|
11 |
|
---|
12 | /**
|
---|
13 | * Token factory that generates tokens that display special symbols for the
|
---|
14 | * whitespace characters space and tab.<p>
|
---|
15 | *
|
---|
16 | * NOTE: This class should only be used by {@link TokenMaker}; nobody else
|
---|
17 | * needs it!
|
---|
18 | *
|
---|
19 | * @author Robert Futrell
|
---|
20 | * @version 0.1
|
---|
21 | */
|
---|
22 | class VisibleWhitespaceTokenFactory extends DefaultTokenFactory {
|
---|
23 |
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * Cosnstructor.
|
---|
27 | */
|
---|
28 | public VisibleWhitespaceTokenFactory() {
|
---|
29 | this(DEFAULT_START_SIZE, DEFAULT_INCREMENT);
|
---|
30 | }
|
---|
31 |
|
---|
32 |
|
---|
33 | /**
|
---|
34 | * Constructor.
|
---|
35 | *
|
---|
36 | * @param size The initial number of tokens in this factory.
|
---|
37 | * @param increment How many tokens to increment by when the stack gets
|
---|
38 | * empty.
|
---|
39 | */
|
---|
40 | public VisibleWhitespaceTokenFactory(int size, int increment) {
|
---|
41 | super(size, increment);
|
---|
42 | }
|
---|
43 |
|
---|
44 | /**
|
---|
45 | * Creates a token for use internally by this token factory. This method
|
---|
46 | * should NOT be called externally; only by this class and possibly
|
---|
47 | * subclasses.
|
---|
48 | *
|
---|
49 | * @return A token to add to this token factory's internal stack.
|
---|
50 | */
|
---|
51 | protected Token createInternalUseOnlyToken() {
|
---|
52 | return new VisibleWhitespaceToken();
|
---|
53 | }
|
---|
54 |
|
---|
55 |
|
---|
56 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.