public String getEditWord() { return tfEditWord.getText(); }
public CritisizeWords(Gui gui) { this.set_gui(gui); this.setBackground(null); this.setBounds(0, 0, gui.getWidth(), gui.getHeight()); this.setLayout(null); // welkom tekst JLabel welkomText = new JLabel("Criticise words"); welkomText.setForeground(Color.white); welkomText.setBounds(500, 120, 350, 55); welkomText.setFont(FontController.getInstance().getFont("segoeuil")); welkomText.setFont(new Font(welkomText.getFont().getName(), Font.PLAIN, 42)); this.add(welkomText); // welkom tekst lbledit // wat is deze? // JLabel lblEditText = new JLabel("Edit"); // lblEditText.setForeground(Color.white); // lblEditText.setBounds(400,200,200,55); // lblEditText.setFont(FontController.getInstance().getFont("segoeuil")); // lblEditText.setFont(new Font(lblEditText.getFont().getName(), // Font.BOLD, 20)); // this.add(lblEditText); // Layed word label JLabel lblLayedWords = new JLabel("Words"); lblLayedWords.setForeground(Color.white); lblLayedWords.setBounds(20, 200, 200, 55); lblLayedWords.setFont(FontController.getInstance().getFont("segoeuil")); lblLayedWords.setFont(new Font(lblLayedWords.getFont().getName(), Font.BOLD, 22)); this.add(lblLayedWords); // Heart icon (button) ImageIcon likeLogo = new ImageIcon(getClass().getResource("/Assets/Images/like.png")); likeButton = new JButton(likeLogo); likeButton.setBackground(this.getBackground()); likeButton.setBounds(560, 400, 70, 70); likeButton.setName("btnLike"); likeButton.setBorder(null); likeButton.setCursor(new Cursor(Cursor.HAND_CURSOR)); // addclickevent likeButton.addActionListener(logics); this.add(likeButton); // Cross icon (dislike) (button) ImageIcon dislikeLogo = new ImageIcon(getClass().getResource("/Assets/Images/dislike.png")); dislikeButton = new JButton(dislikeLogo); dislikeButton.setBackground(this.getBackground()); dislikeButton.setBounds(645, 400, 70, 70); dislikeButton.setName("btnDislike"); dislikeButton.setBorder(null); dislikeButton.setCursor(new Cursor(Cursor.HAND_CURSOR)); // addclickevent dislikeButton.addActionListener(logics); this.add(dislikeButton); // Pass passBtn = new MyButton("Pass"); passBtn.setBounds(600, 486, 80, 24); passBtn.setFont(FontController.getInstance().getFont("seguisb")); passBtn.setFont(new Font(passBtn.getFont().getName(), Font.BOLD, 12)); passBtn.setName("btnPass"); passBtn.addActionListener(logics); this.add(passBtn); // /edit word initialization // add label edit words (right side of screen) JLabel lblEditWord = new JLabel("Edit word"); lblEditWord.setForeground(Color.white); lblEditWord.setBounds(1000, 205, 260, 55); lblEditWord.setFont(FontController.getInstance().getFont("segoeuil")); lblEditWord.setFont(new Font(lblEditWord.getFont().getName(), Font.BOLD, 20)); this.add(lblEditWord); // create textfield for edit word (right side of screen) tfEditWord = new TextFieldSL(""); tfEditWord.setBounds(1000, 250, 250, 30); tfEditWord.setFont(FontController.getInstance().getFont("seguisb")); tfEditWord.setBackground(Color.black); tfEditWord.setFont(new Font(tfEditWord.getFont().getName(), Font.BOLD, 12)); tfEditWord.setFocusStatus(false); this.add(tfEditWord); // create edit word button update (right side of screen) MyButton btnUpdate = new MyButton("Update and approve"); btnUpdate.setBounds(1000, 285, 250, 25); btnUpdate.setFont(FontController.getInstance().getFont("seguisb")); btnUpdate.setFont(new Font(btnUpdate.getFont().getName(), Font.BOLD, 12)); btnUpdate.setName("btnUpdate"); btnUpdate.addActionListener(logics); this.add(btnUpdate); // load pending wordlist fillWordList(); logics.showNextWord(); }
public void setEditWordTextField(String woord) { tfEditWord.setText(woord); }