Examples of ensureIndexIsVisible()


Examples of javax.swing.JList.ensureIndexIsVisible()

    mudListSelector.setVisibleRowCount(3);
    mudListSelector.addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent evt) {
        JList list = (JList) evt.getSource();
  list.ensureIndexIsVisible(list.getSelectedIndex());
        String item = (String) list.getSelectedValue();
        mudName.setText(item);
        Object mud[] = (Object[]) mudList.get(item);
        mudAddr.setText((String) mud[0]);
        mudPort.setText(((Integer) mud[1]).toString());
View Full Code Here

Examples of javax.swing.JList.ensureIndexIsVisible()

  }
 
  private void setIndex(KeyEvent e, int index) {
    JList list = (JList)e.getComponent();
    list.setSelectedIndex(index);
    list.ensureIndexIsVisible(index);
    e.consume();
    list.repaint();
  }

  public void keyReleased(KeyEvent e) {
View Full Code Here

Examples of javax.swing.JList.ensureIndexIsVisible()

    JList list = (JList) e.getComponent();
    int clickedIndex = list.locationToIndex(e.getPoint());
    int index = this.renderer.getIndex(clickedIndex, e);
    this.selectionModel.setSelectedIndex(index);
    list.setSelectedIndex(index / this.width);
    list.ensureIndexIsVisible(index / this.width);
    list.repaint();
    e.consume();   
  }

  public void mouseReleased(MouseEvent e) {
View Full Code Here

Examples of javax.swing.JList.ensureIndexIsVisible()

    JList list = (JList) e.getComponent();
    int clickedIndex = list.locationToIndex(e.getPoint());
    int index = this.renderer.getIndex(clickedIndex, e);
    this.selectionModel.setSelectedIndex(index);
    list.setSelectedIndex(index / this.width);
    list.ensureIndexIsVisible(index / this.width);
    list.repaint();
    e.consume();   
  }
 
  public void setWidth(int width) {
View Full Code Here

Examples of javax.swing.JList.ensureIndexIsVisible()

            }
            int index = src.getNextMatch(prefix, startIndex,
                                         Position.Bias.Forward);
            if (index >= 0) {
                src.setSelectedIndex(index);
                src.ensureIndexIsVisible(index);
            } else if (startingFromSelection) { // wrap
                index = src.getNextMatch(prefix, 0,
                                         Position.Bias.Forward);
                if (index >= 0) {
                    src.setSelectedIndex(index);
View Full Code Here

Examples of javax.swing.JList.ensureIndexIsVisible()

            } else if (startingFromSelection) { // wrap
                index = src.getNextMatch(prefix, 0,
                                         Position.Bias.Forward);
                if (index >= 0) {
                    src.setSelectedIndex(index);
                    src.ensureIndexIsVisible(index);
                }
            }
        }
       
        /**
 
View Full Code Here

Examples of javax.swing.JList.ensureIndexIsVisible()

    private void refreshJlistQuadrants() {
        this.doRefreshJlistQuadrants = false;
        for (int i = 0;  i < 4;  ++i) {
            final JList jl = this.jlistQuadrants[i];
            jl.setSelectedIndex(this.board.getQuadrantNum(i));
            jl.ensureIndexIsVisible(jl.getSelectedIndex());
        }
        this.doRefreshJlistQuadrants = true;
    }

    private void makeFreestyleBoard() {
View Full Code Here

Examples of javax.swing.JList.ensureIndexIsVisible()

    private void refreshJlistQuadrants() {
        this.doRefreshJlistQuadrants = false;
        for (int i = 0;  i < 4;  ++i) {
            final JList jl = this.jlistQuadrants[i];
            jl.setSelectedIndex(this.board.getQuadrantNum(i));
            jl.ensureIndexIsVisible(jl.getSelectedIndex());
        }
        this.doRefreshJlistQuadrants = true;
    }

    private void makeFreestyleBoard() {
View Full Code Here

Examples of javax.swing.JList.ensureIndexIsVisible()

    private void refreshJlistQuadrants() {
        this.doRefreshJlistQuadrants = false;
        for (int i = 0;  i < 4;  ++i) {
            final JList jl = this.jlistQuadrants[i];
            jl.setSelectedIndex(this.board.getQuadrantNum(i));
            jl.ensureIndexIsVisible(jl.getSelectedIndex());
        }
        this.doRefreshJlistQuadrants = true;
    }

    private void makeFreestyleBoard() {
View Full Code Here

Examples of javax.swing.JList.ensureIndexIsVisible()

    private void refreshJlistQuadrants() {
        this.doRefreshJlistQuadrants = false;
        for (int i = 0;  i < 4;  ++i) {
            final JList jl = this.jlistQuadrants[i];
            jl.setSelectedIndex(this.board.getQuadrantNum(i));
            jl.ensureIndexIsVisible(jl.getSelectedIndex());
        }
        this.doRefreshJlistQuadrants = true;
    }

    private void makeFreestyleBoard() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.