forked from processing/processing4
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTabLine.java
More file actions
55 lines (47 loc) · 1.32 KB
/
TabLine.java
File metadata and controls
55 lines (47 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package processing.mode.java;
/**
* Identifier of a line within a tab.
*/
public class TabLine {
private final int tab;
private final int globalLine;
private final int lineInTab;
/**
* Create a new tab line identifier.
*
* @param newTab The zero indexed tab number in which the line of code appears.
* @param newGlobalLine The line of that code within the concatenated "global" java file version
* of the sketch.
* @param newLineIntTab The line of the code within the tab.
*/
public TabLine(int newTab, int newGlobalLine, int newLineIntTab) {
tab = newTab;
globalLine = newGlobalLine;
lineInTab = newLineIntTab;
}
/**
* The tab number within the sketch in which the line of code appears.
*
* @return The tab number on which the code appears.
*/
public int getTab() {
return tab;
}
/**
* Get the location of the source as a line within the "global" concatenated java file.
*
* @return Line within the concatenated java file version of this sketch.
*/
public int getGlobalLine() {
return globalLine;
}
/**
* Get the location of the source within the tab.
*
* @return The "local" line for the source or, in other words, the line number within the tab
* housing the code.
*/
public int getLineInTab() {
return lineInTab;
}
}