Skip to content

Commit f0ecbb2

Browse files
committed
Cleanup Code
1 parent 26600f9 commit f0ecbb2

2 files changed

Lines changed: 2 additions & 15 deletions

File tree

src/main/java/org/glavo/viewer/file/types/classfile/ParsedViewerPane.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
*/
4949
public class ParsedViewerPane extends BorderPane {
5050

51-
private Viewer viewer;
51+
private final Viewer viewer;
5252

5353
private final TreeView<FileComponent> tree;
5454
private final SearchBar searchBar;

src/main/java/org/glavo/viewer/file/types/classfile/SearchBar.java

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,7 @@ public String toString() {
151151
}
152152
}
153153

154-
private static final Pattern textFill = Pattern.compile("-fx-text-fill:[^;]*;");
155-
156-
private ParsedViewerPane pane;
154+
private final ParsedViewerPane pane;
157155

158156
private ListIterator<ClassFileComponent> iterator = null;
159157
private ClassFileComponent selected = null;
@@ -257,15 +255,4 @@ public void search(ActionEvent event) {
257255
this.iterator = ans.listIterator();
258256
}
259257

260-
public void setColor(String color) {
261-
String style = textField.getStyle() == null ? "" : textField.getStyle();
262-
Matcher m = textFill.matcher(style);
263-
if (!m.find()) {
264-
style += "-fx-text-fill: " + color + ";";
265-
} else {
266-
style = m.replaceAll("-fx-text-fill: " + color + ";");
267-
}
268-
textField.setStyle(style);
269-
}
270-
271258
}

0 commit comments

Comments
 (0)