Package javax.swing

Examples of javax.swing.JList.repaint()


                        if (!(o instanceof DataSource)) {
                            return;
                        }
                        VariableConflict vc = (VariableConflict) list.getSelectedValue();
                        ((DataSource) o).getInformation().alias = vc.var;
                        list.repaint();
                        if (clm.resolved()) {
                            bok.setEnabled(true);
                        }
                        TreeNode tn = (TreeNode) (st.getSelectionPath().getLastPathComponent());
                        ((DefaultTreeModel) (st.getModel())).nodeChanged(tn);
View Full Code Here


                    public void valueChanged(TreeSelectionEvent e) {
                        Object o = st.getSelectedSourceOrCollection();
                        if ((o instanceof DataSource) && e.isAddedPath()) {
                            VariableConflict vc = (VariableConflict) list.getSelectedValue();
                            vc.ds = (DataSource) o;
                            list.repaint();
                            if (clm.resolved()) {
                                bok.setEnabled(true);
                            }
                            TreeNode tn = (TreeNode) (st.getSelectionPath().getLastPathComponent());
                            ((DefaultTreeModel) (st.getModel())).nodeChanged(tn);
View Full Code Here

          listModel.removeAllElements();
          for (int i = 0; i < recs.length; i++) {
            listModel.addElement(recs[i]);
          }
        }
        list.repaint();
      }
    });
    result.add(compressBox, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
        GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
            0, 0, 0), 0, 0));
View Full Code Here

        int index = list.locationToIndex(e.getPoint());
        CheckableItem item = (CheckableItem) list.getModel()
            .getElementAt(index);
        item.setSelected(!item.isSelected());
        Rectangle rect = list.getCellBounds(index, index);
        list.repaint(rect);
      }
    });
    JScrollPane sp = new JScrollPane(list);

    final JTextArea textArea = new JTextArea(3, 10);
View Full Code Here

    }
    else if (owner instanceof JList)
    {
      final JList list = (JList) owner;
      list.getSelectionModel().clearSelection();
      list.repaint();
    }
    else if (owner instanceof JTree)
    {
      final JTree list = (JTree) owner;
      list.clearSelection();
View Full Code Here

    }
    else if (owner instanceof JTree)
    {
      final JTree list = (JTree) owner;
      list.clearSelection();
      list.repaint();
    }
    else
    {
      final ReportDocumentContext activeContext = getActiveContext();
      if (activeContext != null)
View Full Code Here

    }
    else if (owner instanceof JList)
    {
      final JList list = (JList) owner;
      list.getSelectionModel().setSelectionInterval(0, list.getModel().getSize());
      list.repaint();
    }
    else if (owner instanceof JTree)
    {
      final JTree list = (JTree) owner;
      final int[] indices = new int[list.getRowCount()];
View Full Code Here

      for (int i = 0; i < indices.length; i++)
      {
        indices[i] = i;
      }
      list.setSelectionRows(indices);
      list.repaint();
    }
    else if (owner instanceof RootBandRenderComponent)
    {
      final RootBandRenderComponent rc = (RootBandRenderComponent) owner;
      final Section reportElement = rc.getRendererRoot().getElement();
View Full Code Here

  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) {
    // TODO Auto-generated method stub
View Full Code Here

    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) {
    JList list = (JList) e.getComponent();
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.