Examples of SgfFileFilter


Examples of com.barrybecker4.game.common.ui.SgfFileFilter

    /**
     * restore a game from a previously saved file (in SGF = Smart Game Format)
     * Derived classes should implement the details of the open.
     */
    public void openGame() {
        JFileChooser chooser = FileChooserUtil.getFileChooser(new SgfFileFilter());
        int state = chooser.showOpenDialog( null );
        File file = chooser.getSelectedFile();
        if ( file != null && state == JFileChooser.APPROVE_OPTION )  {
            controller_.restoreFromFile(file.getAbsolutePath());
            sendGameChangedEvent(controller_.getLastMove());
View Full Code Here

Examples of com.barrybecker4.game.common.ui.SgfFileFilter

    /**
     * save the current game to the specified file (in SGF = Smart Game Format)
     * Derived classes should implement the details of the save
     */
    void saveGame( AssertionError ae ) {
        JFileChooser chooser = FileChooserUtil.getFileChooser(new SgfFileFilter());
        int state = chooser.showSaveDialog( null );
        File file = chooser.getSelectedFile();
        if ( file != null && state == JFileChooser.APPROVE_OPTION ) {
            // if it does not have the .sgf extension already then add it
            String fPath = file.getAbsolutePath();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.