-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInfoTile.java
More file actions
24 lines (16 loc) · 801 Bytes
/
InfoTile.java
File metadata and controls
24 lines (16 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import java.awt.Color;
import java.util.ArrayList;
import javax.swing.BorderFactory;
public abstract class InfoTile extends Tile {
// Contains the data to be processed by calculateConstraints and runLengthEncoding, this is stored as an integer and severs as a boolean array
// and as a RGB integer array depending on if the image has a bit depth of 1 or 24
public int[] constraintSlice;
public InfoTile(int x, int y) {
super(x, y, Color.gray);
constraintSlice = x == 0 ? new int[ParsedImage.getHeight()] : new int[ParsedImage.getWidth()];
calculateConstraints();
this.setBorder(BorderFactory.createLineBorder(Color.yellow));
}
public abstract void calculateConstraints();
public abstract ArrayList<Integer> runLengthEncoding();
}