Package java.awt

Examples of java.awt.Scrollbar


        panel = new Panel();
        panel.setLayout(new GridLayout(23, 3));
        F1Label = new Label(Integer.toString(
                (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;
View Full Code Here


        populationSize = population;
        panel = new Panel();
        panel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
        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();
View Full Code Here

        panel = new Panel();
        GridBagLayout gbl = new GridBagLayout();
        GridBagConstraints gbc = new GridBagConstraints();
        panel.setLayout(gbl);
        mutateLabel = new Label(Integer.toString(MUTATE_PERCENTAGE[0]));
        scrollbar = new Scrollbar(Scrollbar.HORIZONTAL,
                                  MUTATE_PERCENTAGE[0], 1, 0, 100);
        choice = new Choice();
        choice.add("Random pitch change");
        choice.add("Bar sequence mutations");
        choice.add("Split and merge");
View Full Code Here

  private int iSbHeight;

  Tree()
  {
    setLayout(null);
    this.sbHoriz = new Scrollbar(0);
    add(this.sbHoriz);
    this.sbVert = new Scrollbar(1);
    add(this.sbVert);
  }
View Full Code Here

  private int iColDrag;

  public Grid()
  {
    setLayout(null);
    this.sbHoriz = new Scrollbar(0);
    add(this.sbHoriz);
    this.sbVert = new Scrollbar(1);
    add(this.sbVert);
  }
View Full Code Here

      startValue = startVal;
      value = startVal;
      Panel p1 = new Panel();
      p1.setLayout(new GridLayout(1, 2));
      p1.add(barLabel = new Label("GPS signal:"));
      p1.add(bar = new Scrollbar(Scrollbar.HORIZONTAL, value, 0, 0, 50));
      bar.setBlockIncrement(1);
      bar.addAdjustmentListener(this);
      add("Center", p1);

      Panel p2 = new Panel();
View Full Code Here

TOP

Related Classes of java.awt.Scrollbar

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.