Package java.awt.event

Examples of java.awt.event.AdjustmentListener


        assertEquals(1, test.size());
    }

    public void testGetAdjustmentListeners() throws Exception {
        assertEquals(0, bar.getAdjustmentListeners().length);
        AdjustmentListener l = new AdjustmentListener() {
            public void adjustmentValueChanged(final AdjustmentEvent e) {
            }
        };
        bar.addAdjustmentListener(l);
        assertEquals(1, bar.getAdjustmentListeners().length);
View Full Code Here


        chatPane.setBorder(CommonElements.createBorder("Chat history"));

        chatPane.setViewportView(chatHistory);
        chatPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);

        chatPane.getVerticalScrollBar().addAdjustmentListener(new AdjustmentListener() {
            @Override
            public void adjustmentValueChanged(AdjustmentEvent e) {
                e.getAdjustable().setValue(e.getAdjustable().getMaximum());
            }
        });
View Full Code Here

        .addPropertyChangeListener(this.substancePropertyListener);

    this.mySecondDecreaseButton.addMouseListener(this.buttonListener);
    this.mySecondIncreaseButton.addMouseListener(this.buttonListener);

    this.substanceAdjustmentListener = new AdjustmentListener() {
      public void adjustmentValueChanged(AdjustmentEvent e) {
        SubstanceCoreUtilities
            .testComponentStateChangeThreadingViolation(scrollbar);
        Component parent = SubstanceScrollBarUI.this.scrollbar
            .getParent();
View Full Code Here

      setOpaque(true);
      add(scrollPane, BorderLayout.CENTER);
    }

    scrollPane.getVerticalScrollBar().addAdjustmentListener(
        new AdjustmentListener()
        {

          public void adjustmentValueChanged(AdjustmentEvent e)
          {
            graphContainer.refresh();
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    protected void doInit ( final JScrollBar scrollBar )
    {
        adjustmentListener = new AdjustmentListener ()
        {
            @Override
            public void adjustmentValueChanged ( final AdjustmentEvent e )
            {
                save ();
View Full Code Here

    setDirty(false, false);


    m_sourceTreeComponent.setDropStrategy(new SourceTreeFileDropStrategy(this));
    AdjustmentListener adjustmentListener = new AdjustmentListener() {

            @Override
            public void adjustmentValueChanged(AdjustmentEvent e) {
                m_mapArea.repaint();
            }
View Full Code Here

                                               MUTATE_PERCENTAGE[choice.getSelectedIndex()]));
                                       scrollbar.setValue(MUTATE_PERCENTAGE[choice.getSelectedIndex()]);
                                   }
                               }
        );
        scrollbar.addAdjustmentListener(new AdjustmentListener() {
                                            public void adjustmentValueChanged(AdjustmentEvent evt) {
                                                MUTATE_PERCENTAGE[choice.getSelectedIndex()] =
                                                        scrollbar.getValue();
                                                mutateLabel.setText(Integer.toString(scrollbar.getValue()));
                                                mutateLabel.repaint();
View Full Code Here

                (int) (weighting[0] * 100)));
        panel.add(new Label("Note Density", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[0] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[0] = getValue() / 100.0;
                        F1Label.setText(Integer.toString(getValue()));
                        F1Label.repaint();
                    }
                }
                );
            }
        }
        );
        panel.add(F1Label);

        F2Label = new Label(Integer.toString(
                (int) (weighting[1] * 100)));
        panel.add(new Label("Pitch Variety", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[1] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[1] = getValue() / 100.0;
                        F2Label.setText(Integer.toString(getValue()));
                        F2Label.repaint();
                    }
                }
                );
            }
        }
        );
        panel.add(F2Label);

        F3Label = new Label(Integer.toString(
                (int) (weighting[1] * 100)));
        panel.add(new Label("Rhythmic Variety", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[2] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[2] = getValue() / 100.0;
                        F3Label.setText(Integer.toString(getValue()));
                        F3Label.repaint();
                    }
                }
                );
            }
        }
        );
        panel.add(F3Label);

        F4Label = new Label(Integer.toString(
                (int) (weighting[3] * 100)));
        panel.add(new Label("Climax Strength", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[3] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[3] = getValue() / 100.0;
                        F4Label.setText(Integer.toString(getValue()));
                        F4Label.repaint();
                    }
                }
                );
            }
        }
        );
        panel.add(F4Label);

        F5Label = new Label(Integer.toString(
                (int) (weighting[4] * 100)));
        panel.add(new Label("Rest Density", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[4] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[4] = getValue() / 100.0;
                        F5Label.setText(Integer.toString(getValue()));
                        F5Label.repaint();
                    }
                }
                );
            }
        }
        );
        panel.add(F5Label);

        F6Label = new Label(Integer.toString(
                (int) (weighting[5] * 100)));
        panel.add(new Label("Tonal Deviation", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[5] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[5] = getValue() / 100.0;
                        F6Label.setText(Integer.toString(getValue()));
                        F6Label.repaint();
                    }
                }
                );
            }
        }
        );
        panel.add(F6Label);

        F7Label = new Label(Integer.toString(
                (int) (weighting[6] * 100)));
        panel.add(new Label("Key Centeredness", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[6] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[6] = getValue() / 100.0;
                        F7Label.setText(Integer.toString(getValue()));
                        F7Label.repaint();
                    }
                }
                );
            }
        }
        );
        panel.add(F7Label);

        F8Label = new Label(Integer.toString(
                (int) (weighting[7] * 100)));
        panel.add(new Label("Pitch Range", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[7] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[7] = getValue() / 100.0;
                        F8Label.setText(Integer.toString(getValue()));
                        F8Label.repaint();
                    }
                }
                );
            }
        }
        );
        panel.add(F8Label);

        F9Label = new Label(Integer.toString(
                (int) (weighting[8] * 100)));
        panel.add(new Label("Rhythm Range", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[8] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[8] = getValue() / 100.0;
                        F9Label.setText(Integer.toString(getValue()));
                        F9Label.repaint();
                    }
                }
                );
            }
        }
        );
        panel.add(F9Label);

        F10Label = new Label(Integer.toString(
                (int) (weighting[9] * 100)));
        panel.add(new Label("Repeated Pitch Density", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[9] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[9] = getValue() / 100.0;
                        F10Label.setText(Integer.toString(getValue()));
                        F10Label.repaint();
                    }
                }
                );
            }
        }
        );
        panel.add(F10Label);

        F11Label = new Label(Integer.toString(
                (int) (weighting[10] * 100)));
        panel.add(new Label("Repeated Rhythm Density", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[10] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[10] = getValue() / 100.0;
                        F11Label.setText(Integer.toString(getValue()));
                        F11Label.repaint();
                    }
                }
                );
            }
        }
        );
        panel.add(F11Label);

        F12Label = new Label(Integer.toString(
                (int) (weighting[11] * 100)));
        panel.add(new Label("Melodic Direction Stability", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[11] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[11] = getValue() / 100.0;
                        F12Label.setText(Integer.toString(getValue()));
                        F12Label.repaint();
                    }
                }
                );
            }
        }
        );
        panel.add(F12Label);

        F13Label = new Label(Integer.toString(
                (int) (weighting[12] * 100)));
        panel.add(new Label("Overall Pitch Direction", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[12] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[12] = getValue() / 100.0;
                        F13Label.setText(Integer.toString(getValue()));
                        F13Label.repaint();
                    }
                }
                );
            }
        }
        );
        panel.add(F13Label);

        F14Label = new Label(Integer.toString(
                (int) (weighting[13] * 100)));
        panel.add(new Label("Pitch Movement", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[13] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[13] = getValue() / 100.0;
                        F14Label.setText(Integer.toString(getValue()));
                        F14Label.repaint();
                    }
                }
                );
            }
        }
        );
        panel.add(F14Label);

        F15Label = new Label(Integer.toString(
                (int) (weighting[14] * 100)));
        panel.add(new Label("Dissonance", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[14] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[14] = getValue() / 100.0;
                        F15Label.setText(Integer.toString(getValue()));
                        F15Label.repaint();
                    }
                }
                );
            }
        }
        );
        panel.add(F15Label);

        F16Label = new Label(Integer.toString(
                (int) (weighting[15] * 100)));
        panel.add(new Label("Leap Compensation", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[15] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[15] = getValue() / 100.0;
                        F16Label.setText(Integer.toString(getValue()));
                        F16Label.repaint();
                    }
                }
                );
            }
        }
        );
        panel.add(F16Label);

        F17Label = new Label(Integer.toString(
                (int) (weighting[16] * 100)));
        panel.add(new Label("Syncopation", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[16] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[16] = getValue() / 100.0;
                        F17Label.setText(Integer.toString(getValue()));
                        F17Label.repaint();
                    }
                }
                );
            }
        }
        );
        panel.add(F17Label);

        F18Label = new Label(Integer.toString(
                (int) (weighting[17] * 100)));
        panel.add(new Label("Repeated Pitch Patterns of 3", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[17] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[17] = getValue() / 100.0;
                        F18Label.setText(Integer.toString(getValue()));
                        F18Label.repaint();
                    }
                }
                );
            }
        }
        );
        panel.add(F18Label);

        F19Label = new Label(Integer.toString(
                (int) (weighting[18] * 100)));
        panel.add(new Label("Repeated Pitch Patterns of 4", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[18] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[18] = getValue() / 100.0;
                        F19Label.setText(Integer.toString(getValue()));
                        F19Label.repaint();
                    }
                }
                );
            }
        }
        );
        panel.add(F19Label);

        F20Label = new Label(Integer.toString(
                (int) (weighting[19] * 100)));
        panel.add(new Label("Repeated Rhythm Patterns of 3", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[19] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[19] = getValue() / 100.0;
                        F20Label.setText(Integer.toString(getValue()));
                        F20Label.repaint();
                    }
                }
                );
            }
        }
        );
        panel.add(F20Label);

        F21Label = new Label(Integer.toString(
                (int) (weighting[20] * 100)));
        panel.add(new Label("Repeated Rhythm Patterns of 4", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[20] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[20] = getValue() / 100.0;
                        F21Label.setText(Integer.toString(getValue()));
                        F21Label.repaint();
                    }
                }
                );
            }
        }
        );
        panel.add(F21Label);

        F22Label = new Label(Integer.toString(
                (int) (weighting[21] * 100)));
        panel.add(new Label("Climax Position", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[21] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[21] = getValue() / 100.0;
                        F22Label.setText(Integer.toString(getValue()));
                        F22Label.repaint();
                    }
                }
                );
            }
        }
        );
        panel.add(F22Label);

        F23Label = new Label(Integer.toString(
                (int) (weighting[22] * 100)));
        panel.add(new Label("Climax Tonality", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL,
                                 (int) (weighting[22] * 100), 1, 0, 100) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        weighting[22] = getValue() / 100.0;
                        F23Label.setText(Integer.toString(getValue()));
                        F23Label.repaint();
                    }
View Full Code Here

                            MUTATE_PERCENTAGE[choice.getSelectedIndex()]));
                    scrollbar.setValue(MUTATE_PERCENTAGE[choice.getSelectedIndex()]);
                }
        }
        );
        scrollbar.addAdjustmentListener(new AdjustmentListener() {
                public void adjustmentValueChanged(AdjustmentEvent evt) {
                    MUTATE_PERCENTAGE[choice.getSelectedIndex()] =
                            scrollbar.getValue();
                    mutateLabel.setText(Integer.toString(scrollbar.getValue()));
                    mutateLabel.repaint();
View Full Code Here

        populationLabel = new Label(Integer.toString(populationSize));
        panel.add(new Label("Population Size", Label.RIGHT));
        panel.add(new Scrollbar(Scrollbar.HORIZONTAL, populationSize, 1,
                                MIN_POPULATION_SIZE, MAX_POPULATION_SIZE) {
            {
                addAdjustmentListener(new AdjustmentListener() {
                    public void adjustmentValueChanged(AdjustmentEvent evt) {
                        populationSize = getValue();
                        populationLabel.setText(Integer.toString(getValue()));
                        populationLabel.repaint();
                    }
View Full Code Here

TOP

Related Classes of java.awt.event.AdjustmentListener

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.