Package javax.swing

Examples of javax.swing.JList.repaint()


    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) {
    this.width = width;
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

    }
    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 ReportRenderContext activeContext = getActiveContext();
      if (activeContext != null)
View Full Code Here

    DefaultListModel model = (DefaultListModel) list.getModel();
    if(!model.contains(obj))
      model.addElement(obj);
    SwingUtilities.invokeLater(new Runnable(){
      public void run(){
        llist.repaint();
      }
    });
  }
 
  /**
 
View Full Code Here

    DefaultListModel model = (DefaultListModel) list.getModel();
    if(!model.contains(obj))
      model.addElement(obj);
    SwingUtilities.invokeLater(new Runnable(){
      public void run(){
        llist.repaint();
      }
    });
  }
 
  /**
 
View Full Code Here

            // Toggle selected state
            item.setSelected(!item.isSelected());

            // Repaint cell
            list.repaint(list.getCellBounds(index, index));
          }
        }
      }
    });
  }
View Full Code Here

                @Override
                public void propertyChanged(Object propertyParent,
                    String propertyName, Object value) {
                  list.revalidate();
                  list.repaint();
                }
              });

              Map<String, IVariableModifier<?>> modifierMap = new HashMap<>();
View Full Code Here

        // standard checkboxes but not e.g. for arabic oritented ones etc.)
        CheckListItem<F> item =
            (CheckListItem<F>) list.getModel().getElementAt(index);
        item.setSelected(!item.isSelected());

        list.repaint();
      }
    });

    JScrollPane scroll;
    multiSelection.add(scroll = new JScrollPane(list), BorderLayout.LINE_START);
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.