diff --git a/SmartNotes/src/com/madeorsk/smartnotes/ExplorerItem.java b/SmartNotes/src/com/madeorsk/smartnotes/ExplorerItem.java index ca4cf49..71a6ea6 100644 --- a/SmartNotes/src/com/madeorsk/smartnotes/ExplorerItem.java +++ b/SmartNotes/src/com/madeorsk/smartnotes/ExplorerItem.java @@ -1,9 +1,16 @@ package com.madeorsk.smartnotes; import com.madeorsk.smartnotes.notes.Note; +import com.madeorsk.smartnotes.notes.TextNote; import com.madeorsk.smartnotes.paths.FolderPath; +import javafx.event.EventHandler; +import javafx.geometry.Pos; +import javafx.scene.Cursor; import javafx.scene.control.Label; +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; +import javafx.scene.input.MouseEvent; import javafx.scene.layout.HBox; public class ExplorerItem extends HBox @@ -11,24 +18,58 @@ public class ExplorerItem extends HBox private boolean folder; private Object item; - public ExplorerItem(boolean folder, Object item) + public ExplorerItem(boolean folder, Object item, final NotesExplorer explorer) { this.folder = folder; this.item = item; + this.setCursor(Cursor.HAND); + this.setOnMouseClicked(new EventHandler() + { + @Override + public void handle(MouseEvent event) + { + if (ExplorerItem.this.folder) + explorer.goToFolder((FolderPath) ExplorerItem.this.item); + else + { + explorer.requestLoad((Note) ExplorerItem.this.item); + SmartNotes.instance.setContent(((TextNote) ExplorerItem.this.item).getNoteBox(explorer)); + } + } + }); + + this.setAlignment(Pos.CENTER_LEFT); + this.setSpacing(10); + if (this.folder) { FolderPath folderPath = (FolderPath) this.item; - this.getChildren().add(new Label("FOLDER")); - this.getChildren().add(new Label(folderPath.getName())); + this.getChildren().add(new ImageView(new Image("/com/madeorsk/smartnotes/res/FolderIcon.png"))); + Label folderNameLabel = new Label(folderPath.getName()); + folderNameLabel.setId("noteItemName"); + this.getChildren().add(folderNameLabel); } else { Note note = (Note) this.item; - Label img = new Label("NOTE"); - img.setTextFill(note.getNoteColor().getColor()); - this.getChildren().add(img); - this.getChildren().add(new Label(note.getName())); + this.getChildren().add(new ImageView(new Image("/com/madeorsk/smartnotes/res/TextNoteIcon-" + note.getNoteColor().name() + ".png"))); + Label noteNameLabel = new Label(note.getName()); + noteNameLabel.setId("noteItemName"); + this.getChildren().add(noteNameLabel); } } + + public ExplorerItem setFolderIcon(String path) + { + this.getChildren().clear(); + + FolderPath folderPath = (FolderPath) this.item; + this.getChildren().add(new ImageView(new Image(path))); + Label folderNameLabel = new Label(folderPath.getName()); + folderNameLabel.setId("noteItemName"); + this.getChildren().add(folderNameLabel); + + return this; + } } diff --git a/SmartNotes/src/com/madeorsk/smartnotes/NoteColorSelector.java b/SmartNotes/src/com/madeorsk/smartnotes/NoteColorSelector.java new file mode 100644 index 0000000..1aa3341 --- /dev/null +++ b/SmartNotes/src/com/madeorsk/smartnotes/NoteColorSelector.java @@ -0,0 +1,81 @@ +package com.madeorsk.smartnotes; + +import java.util.ArrayList; +import java.util.List; + +import com.madeorsk.smartnotes.notes.Note.NoteColor; + +import javafx.beans.property.ObjectProperty; +import javafx.beans.property.SimpleObjectProperty; +import javafx.beans.value.ObservableValue; +import javafx.event.EventHandler; +import javafx.scene.Cursor; +import javafx.scene.canvas.Canvas; +import javafx.scene.canvas.GraphicsContext; +import javafx.scene.input.MouseEvent; +import javafx.scene.layout.HBox; +import javafx.scene.paint.Color; + +public class NoteColorSelector extends HBox +{ + private List noteColors = new ArrayList(); + private ObjectProperty selectedColor = new SimpleObjectProperty(); + + public NoteColorSelector() + { + this.setSpacing(10); + } + + public void addColor(NoteColor color) + { + this.noteColors.add(color); + if (this.noteColors.size() == 1) + this.setSelectedColor(color); + else + this.updateBox(); + } + + public void setSelectedColor(NoteColor color) + { + this.selectedColor.set(color); + this.updateBox(); + } + public NoteColor getSelectedColor() + { + return this.selectedColor.getValue(); + } + public ObservableValue selectedColorProperty() + { + return this.selectedColor; + } + + private void updateBox() + { + this.getChildren().clear(); + for(final NoteColor color : this.noteColors) + { + Canvas canvas = new Canvas(); + canvas.setCursor(Cursor.HAND); + canvas.setHeight(50); canvas.setWidth(50); + GraphicsContext gc = canvas.getGraphicsContext2D(); + if (color.equals(this.getSelectedColor())) + { + gc.setFill(new Color(color.getColor().getRed(), color.getColor().getGreen(), color.getColor().getBlue(), 0.5)); + gc.fillOval(0, 0, 50, 50); + } + gc.setFill(color.getColor()); + gc.fillOval(3, 3, 44, 44); + + canvas.setOnMouseClicked(new EventHandler() + { + @Override + public void handle(MouseEvent event) + { + NoteColorSelector.this.setSelectedColor(color); + } + }); + + this.getChildren().add(canvas); + } + } +} diff --git a/SmartNotes/src/com/madeorsk/smartnotes/NotesExplorer.java b/SmartNotes/src/com/madeorsk/smartnotes/NotesExplorer.java index 88bbc71..ccdb695 100644 --- a/SmartNotes/src/com/madeorsk/smartnotes/NotesExplorer.java +++ b/SmartNotes/src/com/madeorsk/smartnotes/NotesExplorer.java @@ -4,14 +4,23 @@ import java.util.Arrays; import java.util.Map; import com.madeorsk.smartnotes.notes.Note; +import com.madeorsk.smartnotes.notes.TextNote; import com.madeorsk.smartnotes.paths.FolderPath; import com.madeorsk.smartnotes.paths.NotePath; import com.madeorsk.smartnotes.paths.Path; -import javafx.scene.control.Button; +import javafx.animation.FadeTransition; +import javafx.event.EventHandler; +import javafx.geometry.Insets; +import javafx.geometry.Pos; +import javafx.scene.Cursor; import javafx.scene.control.Label; +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; +import javafx.scene.input.MouseEvent; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; +import javafx.util.Duration; public class NotesExplorer extends VBox { @@ -19,6 +28,7 @@ public class NotesExplorer extends VBox private Map notes; private HBox titleBox; + private FolderPath currentFolder; public NotesExplorer() { @@ -26,59 +36,160 @@ public class NotesExplorer extends VBox this.notes = this.saves.loadIndex(); this.titleBox = new HBox(); { - this.titleBox.getChildren().add(new Label("SmartNotes")); + this.titleBox.setPadding(new Insets(10, 0, 0, 0)); + ImageView logoView = new ImageView(new Image("/com/madeorsk/smartnotes/res/Logo.png")); + this.titleBox.setAlignment(Pos.CENTER); + this.titleBox.getChildren().add(logoView); } - this.updateList(); + this.updateList(this.genRoot()); } - private void updateList() + private void updateList(FolderPath folder) { this.getChildren().clear(); this.getChildren().add(this.titleBox); - FolderPath root = this.genRoot(); - for (Path p : root.getContent()) + this.setSpacing(50); + + this.currentFolder = folder; + + VBox notesList = new VBox(); + notesList.setPadding(new Insets(0, 20, 0, 20)); + notesList.setSpacing(15); + this.getChildren().add(notesList); + + if (folder.getParent() != null) + notesList.getChildren().add(new ExplorerItem(true, folder.getParent().setName("Previous folder"), this).setFolderIcon("/com/madeorsk/smartnotes/res/ReturnIcon.png")); + + for (Path p : folder.getContent()) { if (p.isFolder()) - { - System.out.println("Folder : " + ((FolderPath) p).getName()); - this.getChildren().add(new ExplorerItem(true, p)); - } + notesList.getChildren().add(new ExplorerItem(true, p, this)); else { - System.out.println("Note : " + ((NotePath) p).getNoteId()); - this.getChildren().add(new ExplorerItem(false, this.notes.get(((NotePath) p).getNoteId()))); + this.notes.get(((NotePath) p).getNoteId()).load(this.saves, ((NotePath) p).getNoteId()); + notesList.getChildren().add(new ExplorerItem(false, this.notes.get(((NotePath) p).getNoteId()), this)); } } + + final HBox addNoteBox = new HBox(); + { + addNoteBox.setCursor(Cursor.HAND); + addNoteBox.setOpacity(0.4); + addNoteBox.setOnMouseEntered(new EventHandler() + { + @Override + public void handle(MouseEvent e) + { + FadeTransition transition = new FadeTransition(Duration.millis(200), addNoteBox); + transition.setFromValue(0.4); + transition.setToValue(1.0); + transition.play(); + } + }); + addNoteBox.setOnMouseExited(new EventHandler() + { + @Override + public void handle(MouseEvent e) + { + FadeTransition transition = new FadeTransition(Duration.millis(200), addNoteBox); + transition.setFromValue(1.0); + transition.setToValue(0.4); + transition.play(); + } + }); + addNoteBox.setOnMouseClicked(new EventHandler() + { + @Override + public void handle(MouseEvent event) + { + TextNote note = new TextNote(); + SmartNotes.instance.setContent(note.getNoteBox(NotesExplorer.this)); + int id = NotesExplorer.this.getNextId(); + NotesExplorer.this.notes.put(id, note); + + NotesExplorer.this.saves.saveIndex(NotesExplorer.this.notes); + note.save(NotesExplorer.this.saves, id); + } + }); + + addNoteBox.setAlignment(Pos.CENTER_LEFT); + addNoteBox.getChildren().add(new ImageView(new Image("/com/madeorsk/smartnotes/res/AddIcon.png"))); + addNoteBox.setSpacing(10); + Label newNoteLabel = new Label("New note..."); + newNoteLabel.setId("noteItemName"); + addNoteBox.getChildren().add(newNoteLabel); + } + notesList.getChildren().add(addNoteBox); } private FolderPath genRoot() { - FolderPath root = new FolderPath("/"); - for(int key : notes.keySet()) + FolderPath root = new FolderPath("/", null); + for(int key : this.notes.keySet()) { - Note note = notes.get(key); - for(String path : note.getPaths()) + Note note = this.notes.get(key); + if (note.getPaths().isEmpty()) + root.addPath(new NotePath(key)); + else { - FolderPath putIn = root; - String[] foldersString = (path.substring(1).contains("#")) ? path.substring(1).split("#") : Arrays.asList(path.substring(1)).toArray(new String[1]); - for(String folderString : foldersString) + for(String path : note.getPaths()) { - if (putIn.containsFolder(folderString)) - putIn = putIn.getFolder(folderString); - else + FolderPath putIn = root; + String[] foldersString = (path.substring(1).contains("#")) ? path.substring(1).split("#") : Arrays.asList(path.substring(1)).toArray(new String[1]); + for(String folderString : foldersString) { - FolderPath newFolder = new FolderPath(folderString); - putIn.addPath(newFolder); - putIn = newFolder; + if (putIn.containsFolder(folderString)) + putIn = putIn.getFolder(folderString); + else + { + FolderPath newFolder = new FolderPath(folderString, putIn); + putIn.addPath(newFolder); + putIn = newFolder; + } } + putIn.addPath(new NotePath(key)); } - putIn.addPath(new NotePath(key)); } } return root; } + public void goToFolder(FolderPath path) + { + this.updateList(this.getUpdatedFolder(path)); + } + public void updateCurrentFolder() + { + this.updateList(this.getUpdatedFolder(this.currentFolder)); + } + private FolderPath getUpdatedFolder(FolderPath path) + { + if (path.getParent() == null) + return this.genRoot(); + else + { + FolderPath updatedFolder = this.getUpdatedFolder(path.getParent()).getFolder(path.getName()); + if (updatedFolder == null) + return this.getUpdatedFolder(path.getParent()); + else + return updatedFolder; + } + } + + public void requestSave(Note note) + { + for (int key : this.notes.keySet()) + if (this.notes.get(key).equals(note)) + note.save(this.saves, key); + } + public void requestLoad(Note note) + { + for (int key : this.notes.keySet()) + if (this.notes.get(key).equals(note)) + note.load(this.saves, key); + } + private int getNextId() { int i = 0; diff --git a/SmartNotes/src/com/madeorsk/smartnotes/SavesManager.java b/SmartNotes/src/com/madeorsk/smartnotes/SavesManager.java index 6073857..4ac0c7f 100644 --- a/SmartNotes/src/com/madeorsk/smartnotes/SavesManager.java +++ b/SmartNotes/src/com/madeorsk/smartnotes/SavesManager.java @@ -56,7 +56,8 @@ public class SavesManager try { Note note = (Note) this.getClass().getClassLoader().loadClass(decomposed[1]).newInstance(); - notes.put(Integer.parseInt(decomposed[0]), note); + if (note.load(this, Integer.parseInt(decomposed[0]))) + notes.put(Integer.parseInt(decomposed[0]), note); } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) { diff --git a/SmartNotes/src/com/madeorsk/smartnotes/SmartNotes.java b/SmartNotes/src/com/madeorsk/smartnotes/SmartNotes.java index 2c4a249..a4847db 100644 --- a/SmartNotes/src/com/madeorsk/smartnotes/SmartNotes.java +++ b/SmartNotes/src/com/madeorsk/smartnotes/SmartNotes.java @@ -3,6 +3,8 @@ package com.madeorsk.smartnotes; import javafx.application.Application; import javafx.event.EventHandler; import javafx.scene.Scene; +import javafx.scene.control.ScrollPane; +import javafx.scene.layout.Region; import javafx.scene.layout.VBox; import javafx.scene.text.Font; import javafx.stage.Stage; @@ -20,19 +22,25 @@ public class SmartNotes extends Application System.out.println("SmartNotes closed."); } + public static SmartNotes instance; private Scene scene; private VBox root; + private NotesExplorer explorer; @Override public void start(Stage stage) throws Exception { + instance = this; + Font.loadFont(this.getClass().getResourceAsStream("/com/madeorsk/smartnotes/res/CutiveMono-Regular.ttf"), 10); this.root = new VBox(); this.root.setStyle("-fx-background-color: #282828;"); - NotesExplorer explorer = new NotesExplorer(); - this.root.getChildren().add(explorer); + this.explorer = new NotesExplorer(); + ScrollPane scrollPane = new ScrollPane(this.explorer); + scrollPane.setFitToHeight(true); scrollPane.setFitToWidth(true); + this.root.getChildren().add(scrollPane); this.scene = new Scene(this.root, 800, 600); this.scene.getStylesheets().add("/com/madeorsk/smartnotes/style.css"); @@ -42,7 +50,7 @@ public class SmartNotes extends Application @Override public void handle(WindowEvent e) { - explorer.close(); + SmartNotes.this.explorer.close(); } }); @@ -50,4 +58,24 @@ public class SmartNotes extends Application stage.setTitle("SmartNotes " + version); stage.show(); } + + public void setContent(Region region) + { + this.setContent(region, false); + } + public void setContent(Region region, boolean useScrollPane) + { + this.root.getChildren().clear(); + if (useScrollPane) + { + ScrollPane scrollPane = new ScrollPane(region); + scrollPane.setFitToHeight(true); scrollPane.setFitToWidth(true); + this.root.getChildren().add(scrollPane); + } + else + { + region.prefHeightProperty().bind(this.root.heightProperty()); + this.root.getChildren().add(region); + } + } } diff --git a/SmartNotes/src/com/madeorsk/smartnotes/notes/Note.java b/SmartNotes/src/com/madeorsk/smartnotes/notes/Note.java index 1ccabb6..49d6dfe 100644 --- a/SmartNotes/src/com/madeorsk/smartnotes/notes/Note.java +++ b/SmartNotes/src/com/madeorsk/smartnotes/notes/Note.java @@ -1,19 +1,22 @@ package com.madeorsk.smartnotes.notes; +import java.util.ArrayList; import java.util.List; +import com.madeorsk.smartnotes.NotesExplorer; + import javafx.scene.layout.VBox; import javafx.scene.paint.Color; -public abstract class Note +public abstract class Note implements SavableNote { public enum NoteColor { WHITE(255, 255, 255), - BLUE(0, 0, 0), - YELLOW(0, 0, 0), - RED(0, 0, 0), - GREEN(0, 0, 0); + BLUE(109, 140, 169), + YELLOW(212, 208, 97), + RED(214, 102, 90), + GREEN(100, 181, 106); private double r; private double g; @@ -26,13 +29,13 @@ public abstract class Note } public Color getColor() { - return new Color(this.r, this.g, this.b, 1); + return new Color(this.r/255, this.g/255, this.b/255, 1); } } private String name; private NoteColor color = NoteColor.WHITE; - protected List paths; + protected List paths = new ArrayList(); public void setName(String name) { @@ -56,5 +59,5 @@ public abstract class Note return this.paths; } - public abstract VBox getNoteBox(); + public abstract VBox getNoteBox(NotesExplorer explorer); } diff --git a/SmartNotes/src/com/madeorsk/smartnotes/notes/SavableNote.java b/SmartNotes/src/com/madeorsk/smartnotes/notes/SavableNote.java index 37b1954..cfec795 100644 --- a/SmartNotes/src/com/madeorsk/smartnotes/notes/SavableNote.java +++ b/SmartNotes/src/com/madeorsk/smartnotes/notes/SavableNote.java @@ -5,5 +5,5 @@ import com.madeorsk.smartnotes.SavesManager; public interface SavableNote { public void save(SavesManager saves, int id); - public void load(SavesManager saves, int id); + public boolean load(SavesManager saves, int id); } diff --git a/SmartNotes/src/com/madeorsk/smartnotes/notes/TextNote.java b/SmartNotes/src/com/madeorsk/smartnotes/notes/TextNote.java index 96ac70e..6874eef 100644 --- a/SmartNotes/src/com/madeorsk/smartnotes/notes/TextNote.java +++ b/SmartNotes/src/com/madeorsk/smartnotes/notes/TextNote.java @@ -2,32 +2,74 @@ package com.madeorsk.smartnotes.notes; import java.util.Calendar; +import com.madeorsk.smartnotes.NoteColorSelector; +import com.madeorsk.smartnotes.NotesExplorer; import com.madeorsk.smartnotes.SavesManager; +import com.madeorsk.smartnotes.SmartNotes; +import javafx.beans.value.ChangeListener; +import javafx.beans.value.ObservableValue; +import javafx.event.EventHandler; +import javafx.geometry.Insets; import javafx.geometry.Pos; +import javafx.scene.Cursor; import javafx.scene.control.TextArea; import javafx.scene.control.TextField; +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; +import javafx.scene.input.MouseEvent; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; -public class TextNote extends Note implements SavableNote +public class TextNote extends Note { private String content; public TextNote() { - this.setName("Text_" + Calendar.YEAR + "." + Calendar.MONTH + "." + Calendar.DAY_OF_MONTH + "-" + Calendar.HOUR_OF_DAY + ":" + Calendar.MINUTE); + this.setName("Text_" + Calendar.getInstance().get(Calendar.YEAR) + "." + Calendar.getInstance().get(Calendar.MONTH) + "." + Calendar.getInstance().get(Calendar.DAY_OF_MONTH) + "-" + Calendar.getInstance().get(Calendar.HOUR_OF_DAY) + ":" + Calendar.getInstance().get(Calendar.MINUTE)); } @Override - public VBox getNoteBox() + public VBox getNoteBox(final NotesExplorer explorer) { VBox box = new VBox(); box.setFillWidth(true); HBox titleBox = new HBox(); { - // TODO Title box + titleBox.setPadding(new Insets(10, 0, 0, 0)); + + VBox returnButton = new VBox(); + returnButton.setId("imageButton"); + returnButton.setCursor(Cursor.HAND); + returnButton.getChildren().add(new ImageView(new Image("/com/madeorsk/smartnotes/res/ReturnIcon.png"))); + returnButton.setOnMouseClicked(new EventHandler() + { + @Override + public void handle(MouseEvent event) + { + explorer.updateCurrentFolder(); + SmartNotes.instance.setContent(explorer, true); + } + }); + titleBox.getChildren().add(returnButton); + + //TODO Type selector + + NoteColorSelector colorSelector = new NoteColorSelector(); + colorSelector.addColor(NoteColor.WHITE); colorSelector.addColor(NoteColor.BLUE); colorSelector.addColor(NoteColor.YELLOW); colorSelector.addColor(NoteColor.RED); colorSelector.addColor(NoteColor.GREEN); + colorSelector.setSelectedColor(this.getNoteColor()); + colorSelector.selectedColorProperty().addListener(new ChangeListener() + { + @Override + public void changed(ObservableValue ov, NoteColor oldValue, NoteColor newValue) + { + TextNote.this.setNoteColor(newValue); + explorer.requestSave(TextNote.this); + } + }); + titleBox.getChildren().add(colorSelector); } box.getChildren().add(titleBox); @@ -36,6 +78,15 @@ public class TextNote extends Note implements SavableNote nameField.setAlignment(Pos.CENTER); nameField.setId("nameField"); nameField.setText(this.getName()); + nameField.textProperty().addListener(new ChangeListener() + { + @Override + public void changed(ObservableValue ov, String oldValue, String newValue) + { + TextNote.this.setName(newValue); + explorer.requestSave(TextNote.this); + } + }); } box.getChildren().add(nameField); @@ -45,6 +96,15 @@ public class TextNote extends Note implements SavableNote textArea.setWrapText(true); textArea.prefHeightProperty().bind(box.heightProperty().subtract(nameField.heightProperty()).subtract(titleBox.heightProperty())); textArea.setText(this.getContent()); + textArea.textProperty().addListener(new ChangeListener() + { + @Override + public void changed(ObservableValue ov, String oldValue, String newValue) + { + TextNote.this.setContent(newValue); + explorer.requestSave(TextNote.this); + } + }); } box.getChildren().add(textArea); @@ -63,6 +123,7 @@ public class TextNote extends Note implements SavableNote private void updatePaths() { + this.paths.clear(); String text = this.getContent(); if (text.contains("\n")) { @@ -83,11 +144,26 @@ public class TextNote extends Note implements SavableNote @Override public void save(SavesManager saves, int id) { - saves.writeFile(saves.getSaveFile(id), this.getContent()); + saves.writeFile(saves.getSaveFile(id), this.getName() + "\n" + this.getNoteColor().name() + "\n" + this.getContent()); } @Override - public void load(SavesManager saves, int id) + public boolean load(SavesManager saves, int id) { - // TODO Auto-generated method stub + if (saves.getSaveFile(id).exists()) + { + String saved = saves.readFile(saves.getSaveFile(id)); + int separatorIndex = saved.indexOf('\n'); + this.setName(saved.substring(0, separatorIndex)); + saved = saved.substring(separatorIndex + 1); + separatorIndex = saved.indexOf('\n'); + this.setNoteColor(NoteColor.valueOf(saved.substring(0, separatorIndex))); + if (separatorIndex < saved.length() - 1) + this.setContent(saved.substring(separatorIndex + 1)); + else + this.setContent(""); + return true; + } + else + return false; } } diff --git a/SmartNotes/src/com/madeorsk/smartnotes/paths/FolderPath.java b/SmartNotes/src/com/madeorsk/smartnotes/paths/FolderPath.java index dfc9143..b562afe 100644 --- a/SmartNotes/src/com/madeorsk/smartnotes/paths/FolderPath.java +++ b/SmartNotes/src/com/madeorsk/smartnotes/paths/FolderPath.java @@ -6,11 +6,13 @@ import java.util.List; public class FolderPath implements Path { private String name; + private FolderPath parent; private List content = new ArrayList(); - public FolderPath(String name) + public FolderPath(String name, FolderPath parent) { this.name = name; + this.parent = parent; } public void addPath(Path path) @@ -35,10 +37,19 @@ public class FolderPath implements Path return false; } + public FolderPath setName(String name) + { + this.name = name; + return this; + } public String getName() { return this.name; } + public FolderPath getParent() + { + return this.parent; + } public List getContent() { return this.content; diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/AddIcon.png b/SmartNotes/src/com/madeorsk/smartnotes/res/AddIcon.png new file mode 100644 index 0000000..aae5897 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/AddIcon.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/DeleteIcon.png b/SmartNotes/src/com/madeorsk/smartnotes/res/DeleteIcon.png new file mode 100644 index 0000000..b6dd10f Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/DeleteIcon.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/FolderIcon.png b/SmartNotes/src/com/madeorsk/smartnotes/res/FolderIcon.png new file mode 100644 index 0000000..e0c818f Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/FolderIcon.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/ImageNoteChoice.png b/SmartNotes/src/com/madeorsk/smartnotes/res/ImageNoteChoice.png new file mode 100644 index 0000000..77ec1b8 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/ImageNoteChoice.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/ImageNoteIcon-BLUE.png b/SmartNotes/src/com/madeorsk/smartnotes/res/ImageNoteIcon-BLUE.png new file mode 100644 index 0000000..2a0142d Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/ImageNoteIcon-BLUE.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/ImageNoteIcon-GREEN.png b/SmartNotes/src/com/madeorsk/smartnotes/res/ImageNoteIcon-GREEN.png new file mode 100644 index 0000000..1b87b62 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/ImageNoteIcon-GREEN.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/ImageNoteIcon-RED.png b/SmartNotes/src/com/madeorsk/smartnotes/res/ImageNoteIcon-RED.png new file mode 100644 index 0000000..ff08031 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/ImageNoteIcon-RED.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/ImageNoteIcon-WHITE.png b/SmartNotes/src/com/madeorsk/smartnotes/res/ImageNoteIcon-WHITE.png new file mode 100644 index 0000000..19647fc Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/ImageNoteIcon-WHITE.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/ImageNoteIcon-YELLOW.png b/SmartNotes/src/com/madeorsk/smartnotes/res/ImageNoteIcon-YELLOW.png new file mode 100644 index 0000000..4168752 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/ImageNoteIcon-YELLOW.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/ListNoteChoice.png b/SmartNotes/src/com/madeorsk/smartnotes/res/ListNoteChoice.png new file mode 100644 index 0000000..5ea84dd Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/ListNoteChoice.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/ListNoteIcon-BLUE.png b/SmartNotes/src/com/madeorsk/smartnotes/res/ListNoteIcon-BLUE.png new file mode 100644 index 0000000..259ea6b Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/ListNoteIcon-BLUE.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/ListNoteIcon-GREEN.png b/SmartNotes/src/com/madeorsk/smartnotes/res/ListNoteIcon-GREEN.png new file mode 100644 index 0000000..2f8fbc9 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/ListNoteIcon-GREEN.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/ListNoteIcon-RED.png b/SmartNotes/src/com/madeorsk/smartnotes/res/ListNoteIcon-RED.png new file mode 100644 index 0000000..e2eae3e Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/ListNoteIcon-RED.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/ListNoteIcon-WHITE.png b/SmartNotes/src/com/madeorsk/smartnotes/res/ListNoteIcon-WHITE.png new file mode 100644 index 0000000..9b7a0fb Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/ListNoteIcon-WHITE.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/ListNoteIcon-YELLOW.png b/SmartNotes/src/com/madeorsk/smartnotes/res/ListNoteIcon-YELLOW.png new file mode 100644 index 0000000..47dc768 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/ListNoteIcon-YELLOW.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/Logo.png b/SmartNotes/src/com/madeorsk/smartnotes/res/Logo.png new file mode 100644 index 0000000..b88e478 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/Logo.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/PositionNoteChoice.png b/SmartNotes/src/com/madeorsk/smartnotes/res/PositionNoteChoice.png new file mode 100644 index 0000000..aa14040 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/PositionNoteChoice.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/PositionNoteIcon-BLUE.png b/SmartNotes/src/com/madeorsk/smartnotes/res/PositionNoteIcon-BLUE.png new file mode 100644 index 0000000..c323b08 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/PositionNoteIcon-BLUE.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/PositionNoteIcon-GREEN.png b/SmartNotes/src/com/madeorsk/smartnotes/res/PositionNoteIcon-GREEN.png new file mode 100644 index 0000000..da8b944 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/PositionNoteIcon-GREEN.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/PositionNoteIcon-RED.png b/SmartNotes/src/com/madeorsk/smartnotes/res/PositionNoteIcon-RED.png new file mode 100644 index 0000000..af27664 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/PositionNoteIcon-RED.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/PositionNoteIcon-WHITE.png b/SmartNotes/src/com/madeorsk/smartnotes/res/PositionNoteIcon-WHITE.png new file mode 100644 index 0000000..b9b2312 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/PositionNoteIcon-WHITE.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/PositionNoteIcon-YELLOW.png b/SmartNotes/src/com/madeorsk/smartnotes/res/PositionNoteIcon-YELLOW.png new file mode 100644 index 0000000..d195a42 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/PositionNoteIcon-YELLOW.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/ReturnIcon.png b/SmartNotes/src/com/madeorsk/smartnotes/res/ReturnIcon.png new file mode 100644 index 0000000..f1ddf98 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/ReturnIcon.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/SoundNoteChoice.png b/SmartNotes/src/com/madeorsk/smartnotes/res/SoundNoteChoice.png new file mode 100644 index 0000000..365ee0d Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/SoundNoteChoice.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/SoundNoteIcon-BLUE.png b/SmartNotes/src/com/madeorsk/smartnotes/res/SoundNoteIcon-BLUE.png new file mode 100644 index 0000000..dc186a9 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/SoundNoteIcon-BLUE.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/SoundNoteIcon-GREEN.png b/SmartNotes/src/com/madeorsk/smartnotes/res/SoundNoteIcon-GREEN.png new file mode 100644 index 0000000..8c3a7b5 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/SoundNoteIcon-GREEN.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/SoundNoteIcon-RED.png b/SmartNotes/src/com/madeorsk/smartnotes/res/SoundNoteIcon-RED.png new file mode 100644 index 0000000..c5c1288 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/SoundNoteIcon-RED.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/SoundNoteIcon-WHITE.png b/SmartNotes/src/com/madeorsk/smartnotes/res/SoundNoteIcon-WHITE.png new file mode 100644 index 0000000..011fc5b Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/SoundNoteIcon-WHITE.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/SoundNoteIcon-YELLOW.png b/SmartNotes/src/com/madeorsk/smartnotes/res/SoundNoteIcon-YELLOW.png new file mode 100644 index 0000000..474e987 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/SoundNoteIcon-YELLOW.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/TextNoteChoice.png b/SmartNotes/src/com/madeorsk/smartnotes/res/TextNoteChoice.png new file mode 100644 index 0000000..0455a33 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/TextNoteChoice.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/TextNoteIcon-BLUE.png b/SmartNotes/src/com/madeorsk/smartnotes/res/TextNoteIcon-BLUE.png new file mode 100644 index 0000000..403aa98 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/TextNoteIcon-BLUE.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/TextNoteIcon-GREEN.png b/SmartNotes/src/com/madeorsk/smartnotes/res/TextNoteIcon-GREEN.png new file mode 100644 index 0000000..1197e7f Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/TextNoteIcon-GREEN.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/TextNoteIcon-RED.png b/SmartNotes/src/com/madeorsk/smartnotes/res/TextNoteIcon-RED.png new file mode 100644 index 0000000..a11a093 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/TextNoteIcon-RED.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/TextNoteIcon-WHITE.png b/SmartNotes/src/com/madeorsk/smartnotes/res/TextNoteIcon-WHITE.png new file mode 100644 index 0000000..15113af Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/TextNoteIcon-WHITE.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/TextNoteIcon-YELLOW.png b/SmartNotes/src/com/madeorsk/smartnotes/res/TextNoteIcon-YELLOW.png new file mode 100644 index 0000000..bb9e0dd Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/TextNoteIcon-YELLOW.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/VideoNoteChoice.png b/SmartNotes/src/com/madeorsk/smartnotes/res/VideoNoteChoice.png new file mode 100644 index 0000000..07d4f3e Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/VideoNoteChoice.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/VideoNoteIcon-BLUE.png b/SmartNotes/src/com/madeorsk/smartnotes/res/VideoNoteIcon-BLUE.png new file mode 100644 index 0000000..b65193b Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/VideoNoteIcon-BLUE.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/VideoNoteIcon-GREEN.png b/SmartNotes/src/com/madeorsk/smartnotes/res/VideoNoteIcon-GREEN.png new file mode 100644 index 0000000..cfca4ef Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/VideoNoteIcon-GREEN.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/VideoNoteIcon-RED.png b/SmartNotes/src/com/madeorsk/smartnotes/res/VideoNoteIcon-RED.png new file mode 100644 index 0000000..84082d5 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/VideoNoteIcon-RED.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/VideoNoteIcon-WHITE.png b/SmartNotes/src/com/madeorsk/smartnotes/res/VideoNoteIcon-WHITE.png new file mode 100644 index 0000000..ed75363 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/VideoNoteIcon-WHITE.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/res/VideoNoteIcon-YELLOW.png b/SmartNotes/src/com/madeorsk/smartnotes/res/VideoNoteIcon-YELLOW.png new file mode 100644 index 0000000..8842c53 Binary files /dev/null and b/SmartNotes/src/com/madeorsk/smartnotes/res/VideoNoteIcon-YELLOW.png differ diff --git a/SmartNotes/src/com/madeorsk/smartnotes/style.css b/SmartNotes/src/com/madeorsk/smartnotes/style.css index f618ad4..fc1c196 100644 --- a/SmartNotes/src/com/madeorsk/smartnotes/style.css +++ b/SmartNotes/src/com/madeorsk/smartnotes/style.css @@ -17,16 +17,20 @@ -fx-border-radius: 0; } -#nameField, .scroll-pane, .scroll-pane .viewport, #textArea, #textArea .content +#nameField, .scroll-pane, .scroll-pane .viewport, #textArea, #textArea .content, #imageButton { -fx-background-color: transparent; } -#nameField, #textArea +#nameField, #textArea, #noteItemName { -fx-text-fill: white; -fx-font-family: 'Cutive Mono'; -fx-font-size: 32px; } +#noteItemName +{ + -fx-font-size: 24px; +} #textArea { -fx-font-size: 20px;