Package java.awt.event

Examples of java.awt.event.KeyListener


                public void mouseReleased(final MouseEvent event) {
                    Vis.this.gewKnot = null;
                }
            });

            this.addKeyListener(new KeyListener() {

                /**
                 * Die Key-Typed-Methode.
                 */
                public void keyTyped(final KeyEvent e) {
                    // throw new RuntimeException("Taste wurde gedr�ckt.");
                }

                /**
                 * Die Key-Released-Methode.
                 */
                public void keyReleased(final KeyEvent e) {
                    // throw new RuntimeException("Taste wurde losgelassen.");
                }

                /**
                 * Die Key-Pressed-Methode.
                 */
                public void keyPressed(final KeyEvent e) {
                    if (e.getKeyCode() == java.awt.event.KeyEvent.VK_C) {
                        if (e.isControlDown()) {
                            String copy = Vis.this.holeAktGrSeq();

                            SonstMeth.log(SonstMeth.LOG_DEBUG,
                                    "In Zwischenablage (" + copy + ")",
                                    Vis.this.pars);
                            Vis.this.zwischenablage.copyToClipboard(copy);
                        }
                    }
                }

            });

            this.addMouseMotionListener(new MouseMotionAdapter() {
                public void mouseDragged(final MouseEvent event) {
                    int x = event.getX();
                    int y = event.getY();

                    int un = Vis.this.getSize().height - 50;
                    int re = Vis.this.getSize().width - 50;
                    int li = 50;
                   
                    if (Vis.this.gewKnot != null) {
                        if (x < li) {
                            x = li;
                        }
                        if (x > re) {
                            x = re;
                        }
                        if (y < Konstanten.OBEN) {
                            y = Konstanten.OBEN;
                        }
                        if (y > un) {
                            y = un;
                        }

                        Vis.this.darstArten[Vis.this.aktAut].neueKoord(
                                Vis.this.gewKnot, x, y);

                        Vis.this.aktGraph = Vis.this.darstArten[Vis.this.aktAut]
                                .erzeuge(Vis.this.rob.vAuts()[Vis.this.aktAut],
                                        Vis.this.selKnot[Vis.this.aktAut]);
                        Vis.super.update(Vis.this.getGraphics());
                        Vis.this.repaint();
                    }
                }
            });
            return;
        }

        this.addKeyListener(new KeyListener() {

            /**
             * Die Key-Typed-Methode.
             */
            public void keyTyped(final KeyEvent e) {
View Full Code Here


                ZeichFen.this.zweiteEcke = null;
                ZeichFen.this.neuZeichnen();
            }
        });

        this.addKeyListener(new KeyListener() {

            /**
             * Die Key-Typed-Methode.
             */
            public void keyTyped(final KeyEvent e) {
View Full Code Here

                public void mouseReleased(final MouseEvent event) {
                    Vis.this.gewKnot = null;
                }
            });

            this.addKeyListener(new KeyListener() {

                /**
                 * Die Key-Typed-Methode.
                 */
                @Override
                public void keyTyped(final KeyEvent e) {
                    // throw new RuntimeException("Taste wurde gedrückt.");
                }

                /**
                 * Die Key-Released-Methode.
                 */
                @Override
                public void keyReleased(final KeyEvent e) {
                    // throw new RuntimeException("Taste wurde losgelassen.");
                }

                /**
                 * Die Key-Pressed-Methode.
                 */
                @Override
                public void keyPressed(final KeyEvent e) {
                    if (e.getKeyCode() == java.awt.event.KeyEvent.VK_C) {
                        if (e.isControlDown()) {
                            String copy = Vis.this.holeAktGrSeq();

                            StaticMethods.log(StaticMethods.LOG_DEBUG,
                                    "In Zwischenablage (" + copy + ")",
                                    Vis.this.pars);
                            Vis.this.zwischenablage.copyToClipboard(copy);
                        }
                    }
                }

            });

            this.addMouseMotionListener(new MouseMotionAdapter() {
                @Override
                public void mouseDragged(final MouseEvent event) {
                    int x = event.getX();
                    int y = event.getY();

                    int un = Vis.this.getSize().height - 50;
                    int re = Vis.this.getSize().width - 50;
                    int li = 50;
                   
                    if (Vis.this.gewKnot != null) {
                        if (x < li) {
                            x = li;
                        }
                        if (x > re) {
                            x = re;
                        }
                        if (y < ConstantsDarstellung.OBEN) {
                            y = ConstantsDarstellung.OBEN;
                        }
                        if (y > un) {
                            y = un;
                        }

                        Vis.this.darstArten[Vis.this.aktAut].neueKoord(
                                Vis.this.gewKnot, x, y);

                        Vis.this.aktGraph = Vis.this.darstArten[Vis.this.aktAut]
                                .erzeuge(Vis.this.rob.vAuts()[Vis.this.aktAut],
                                        Vis.this.selKnot[Vis.this.aktAut]);
                        Vis.super.update(Vis.this.getGraphics());
                        Vis.this.repaint();
                    }
                }
            });
            return;
        }

        this.addKeyListener(new KeyListener() {

            /**
             * Die Key-Typed-Methode.
             */
            @Override
View Full Code Here

                ZeichFen.this.zweiteEcke = null;
                ZeichFen.this.neuZeichnen();
            }
        });

        this.addKeyListener(new KeyListener() {

            /**
             * Die Key-Typed-Methode.
             */
            public void keyTyped(final KeyEvent e) {
View Full Code Here

                public void mouseReleased(final MouseEvent event) {
                    Vis.this.gewKnot = null;
                }
            });

            this.addKeyListener(new KeyListener() {

                /**
                 * Die Key-Typed-Methode.
                 */
                public void keyTyped(final KeyEvent e) {
                    // throw new RuntimeException("Taste wurde gedr�ckt.");
                }

                /**
                 * Die Key-Released-Methode.
                 */
                public void keyReleased(final KeyEvent e) {
                    // throw new RuntimeException("Taste wurde losgelassen.");
                }

                /**
                 * Die Key-Pressed-Methode.
                 */
                public void keyPressed(final KeyEvent e) {
                    if (e.getKeyCode() == java.awt.event.KeyEvent.VK_C) {
                        if (e.isControlDown()) {
                            String copy = Vis.this.holeAktGrSeq();

                            SonstMeth.log(SonstMeth.LOG_DEBUG,
                                    "In Zwischenablage (" + copy + ")",
                                    Vis.this.pars);
                            Vis.this.zwischenablage.copyToClipboard(copy);
                        }
                    }
                }

            });

            this.addMouseMotionListener(new MouseMotionAdapter() {
                public void mouseDragged(final MouseEvent event) {
                    int x = event.getX();
                    int y = event.getY();

                    int un = Vis.this.getSize().height - 50;
                    int re = Vis.this.getSize().width - 50;
                    int li = 50;
                   
                    if (Vis.this.gewKnot != null) {
                        if (x < li) {
                            x = li;
                        }
                        if (x > re) {
                            x = re;
                        }
                        if (y < Konstanten.OBEN) {
                            y = Konstanten.OBEN;
                        }
                        if (y > un) {
                            y = un;
                        }

                        Vis.this.darstArten[Vis.this.aktAut].neueKoord(
                                Vis.this.gewKnot, x, y);

                        Vis.this.aktGraph = Vis.this.darstArten[Vis.this.aktAut]
                                .erzeuge(Vis.this.rob.vAuts()[Vis.this.aktAut],
                                        Vis.this.selKnot[Vis.this.aktAut]);
                        Vis.super.update(Vis.this.getGraphics());
                        Vis.this.repaint();
                    }
                }
            });
            return;
        }

        this.addKeyListener(new KeyListener() {

            /**
             * Die Key-Typed-Methode.
             */
            public void keyTyped(final KeyEvent e) {
View Full Code Here

                ZeichFen.this.zweiteEcke = null;
                ZeichFen.this.neuZeichnen();
            }
        });

        this.addKeyListener(new KeyListener() {

            /**
             * Die Key-Typed-Methode.
             */
            @Override
View Full Code Here

               
            }
        }
        );

        this.addKeyListener(new KeyListener() {

            /**
             * Die Key-Typed-Methode.
             */
            @Override
View Full Code Here

    table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);

    //set valueisadjusting if holding down a key - don't process setdetail events
    table.addKeyListener(
      new KeyListener() {
        public void keyTyped(KeyEvent e) {
        }

        public void keyPressed(KeyEvent e) {
          synchronized (detail) {
View Full Code Here

      JLabel nameLabel = getBorderedLabel(i18n.PROPERTIES_NAME_LABEL, emptyBorder);

      _viewNameField = new JTextField();
      _viewNameField.setPreferredSize(mediumField);
      _viewNameField.addKeyListener(new KeyListener()
      {
        public void keyTyped(KeyEvent keyEvent)
        {
        }
View Full Code Here

      _definitionArea.setBorder(BorderFactory.createLineBorder(Color.black));
      _definitionArea.setPreferredSize(mediumField);
      _definitionArea.setLineWrap(true);
      _definitionArea.setWrapStyleWord(true);

      _definitionArea.addKeyListener(new KeyListener()
      {

        public void keyTyped(KeyEvent keyEvent)
        {
        }
View Full Code Here

TOP

Related Classes of java.awt.event.KeyListener

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.