Added color to TextNote name font
This commit is contained in:
parent
d68bd74617
commit
101b3f0dd9
@ -36,6 +36,8 @@ public class TextNote extends Note
|
||||
VBox box = new VBox();
|
||||
box.setFillWidth(true);
|
||||
|
||||
TextField nameField = new TextField();
|
||||
|
||||
HBox titleBox = new HBox();
|
||||
{
|
||||
titleBox.setPadding(new Insets(10, 0, 0, 0));
|
||||
@ -66,6 +68,7 @@ public class TextNote extends Note
|
||||
public void changed(ObservableValue<? extends NoteColor> ov, NoteColor oldValue, NoteColor newValue)
|
||||
{
|
||||
TextNote.this.setNoteColor(newValue);
|
||||
nameField.setStyle("-fx-text-fill: rgb(" + newValue.getColor().getRed()*255 + "," + newValue.getColor().getGreen()*255 + "," + newValue.getColor().getBlue()*255 + ");");
|
||||
explorer.requestSave(TextNote.this);
|
||||
}
|
||||
});
|
||||
@ -73,10 +76,11 @@ public class TextNote extends Note
|
||||
}
|
||||
box.getChildren().add(titleBox);
|
||||
|
||||
TextField nameField = new TextField();
|
||||
// NAME FIELD
|
||||
{
|
||||
nameField.setAlignment(Pos.CENTER);
|
||||
nameField.setId("nameField");
|
||||
nameField.setStyle("-fx-text-fill: rgb(" + this.getNoteColor().getColor().getRed()*255 + "," + this.getNoteColor().getColor().getGreen()*255 + "," + this.getNoteColor().getColor().getBlue()*255 + ");");
|
||||
nameField.setText(this.getName());
|
||||
nameField.textProperty().addListener(new ChangeListener<String>()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user