little change in BoardPanel.configureBoard

2005-08-31
2013-04-30
  • Kunnar Klauks

    Kunnar Klauks - 2005-08-31

    Hi,

    I added this code to BoardPanel.configureBoard method

    String flipBoardAction = "flipBoard";   contentPanel.getInputMap().put(KeyStroke.getKeyStroke("F2"), flipBoardAction);        
        contentPanel.getActionMap().put(flipBoardAction,
            new AbstractAction(flipBoardAction) {
                public void actionPerformed(ActionEvent evt) {
                  if(isFlipped)
                    setFlipped(false);
                  else
                    setFlipped(true);
                }
            }
        );

    It adds F2 keystroke for flipping board.

    Btw. is there any documentation about current acceleration keys in Jin?

    Kunnar

     
    • Alexander Maryanovsky

      No there is little documentation of anything currently - I have to get on it sometime.

       
    • Kunnar Klauks

      Kunnar Klauks - 2005-09-01

      What do you think, is this change worth adding official Jin?

      I of course dont know very well Jin API and im not sure if it is even right place and right way to add such code, but anyway change works for me an i like this feature.

       
      • Alexander Maryanovsky

        I've already built Jin 2.13.1, so it's not going to make it into that release, but I'll try to remember to add this functionality into 2.14.

         

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks