private void init_key() {
    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_ESCAPE,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            disposed();
          }
        });
  }
  private void initActionKey() {

    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_ESCAPE,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            setVisible(false);
          }
        });

    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_ENTER,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            do_save();
          }
        });
  }
Esempio n. 3
0
  private void init_key() {
    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_ESCAPE,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            //                btn_0.doClick();
            disposed();
          }
        });
    tf_message.addKeyListener(
        new KeyAdapter() {

          @Override
          public void keyPressed(KeyEvent e) {
            int total = 0;
          }
        });
  }
  private void init_key() {
    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_ESCAPE,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            //                btn_0.doClick();
            disposed();
          }
        });

    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_BACK_SPACE,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            tf_dummy.setText("");
            lb_endorse.setText(tf_dummy.getText());
          }
        });
    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_NUMPAD0,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_0.doClick();
          }
        });

    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_0,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_0.doClick();
          }
        });
    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_PERIOD,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_dot.doClick();
          }
        });

    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_NUMPAD1,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_1.doClick();
          }
        });
    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_1,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_1.doClick();
          }
        });

    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_NUMPAD2,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_2.doClick();
          }
        });
    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_2,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_2.doClick();
          }
        });

    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_NUMPAD3,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_3.doClick();
          }
        });
    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_3,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_3.doClick();
          }
        });
    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_NUMPAD4,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_4.doClick();
          }
        });
    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_4,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_4.doClick();
          }
        });
    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_NUMPAD5,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_5.doClick();
          }
        });
    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_5,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_5.doClick();
          }
        });
    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_NUMPAD6,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_6.doClick();
          }
        });
    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_6,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_6.doClick();
          }
        });
    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_NUMPAD7,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_7.doClick();
          }
        });
    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_7,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_7.doClick();
          }
        });

    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_NUMPAD8,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_8.doClick();
          }
        });
    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_8,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_8.doClick();
          }
        });
    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_NUMPAD9,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_9.doClick();
          }
        });
    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_9,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_9.doClick();
          }
        });
    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_DECIMAL,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_dot.doClick();
          }
        });

    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_ENTER,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_ok.doClick();
          }
        });

    KeyMapping.mapKeyWIFW(
        getSurface(),
        KeyEvent.VK_F5,
        new KeyAction() {

          @Override
          public void actionPerformed(ActionEvent e) {
            btn_clear.doClick();
          }
        });
  }