Package kanakata.domain

Examples of kanakata.domain.Kana


                    if (answer.length() == 0) {
                        executor.skip();
                    } else {
                        KanaType type = executor.getKana().getType();
                        Syllable syllable = Syllable.answer(answer);
                        executor.answer(new Kana(type, syllable));
                    }
                }
            }
        });
        textField.addFocusListener(new FocusListener() {
View Full Code Here


    protected final Logger log = Logger.getLogger(getClass().getName());

    public void renameImages(ImageNaming imageNaming) throws IOException {
        File root = new File("source/product/resource/media/images/hiragana");
        for (Hiragana hiragana : Hiragana.values()) {
            Kana kana = hiragana.getKana();
            String key = kana.getSyllable().key();
            File large = new File(root, key + ".png");
            if (large.exists()) {
                log.info("Renaming: " + large.getCanonicalPath());
                boolean renamed = large.renameTo(imageNaming.newNameFor(large, kana));
                if (renamed) {
View Full Code Here

            }
        });
        panel.add(checkBox, c);
        for (int i = 0; i < list.length; i++) {
            c.gridy = i + 1;
            Kana kana = list[i] != null ? list[i].getKana() : Kana.NULL;
            JLabel label = new JLabel(kana.getUnicodeString(), JLabel.CENTER);
            label.setFont(Fonts.kanaSmall());
            panel.add(label, c);
        }
        return panel;
    }
View Full Code Here

        if (iterator == null || !iterator.hasNext()) {
            List<Kana> kana = new ArrayList<Kana>(kata.getKana());
            Collections.shuffle(kana, random);
            iterator = kana.iterator();
        }
        Kana kana;
        do {
            kana = iterator.next();
        } while (Kana.isNull(kana));
        return kana;
    }
View Full Code Here

        Collections.shuffle(nonNull, random);
        int total = grid.numberOfCells();
        if (nonNull.size() > total) {
            List<Kana> sublist = new ArrayList<Kana>(total);
            for (int i = 0; i < total; i++) {
                Kana kana1 = nonNull.get(i);
                sublist.add(kana1);
            }
            if (!sublist.contains(kana)) {
                int replace = random.nextInt(total - 1);
                sublist.set(replace, kana);
View Full Code Here

TOP

Related Classes of kanakata.domain.Kana

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.