Package javax.swing

Examples of javax.swing.DefaultListModel.ensureCapacity()


   */
  public void test(TestHarness harness)     
  {
    harness.checkPoint("capacity()");
    DefaultListModel m1 = new DefaultListModel();
    m1.ensureCapacity(99);
    harness.check(m1.capacity() >= 99);
  }

}
View Full Code Here


   */
  public void test(TestHarness harness)     
  {
    harness.checkPoint("ensureCapacity()");
    DefaultListModel m1 = new DefaultListModel();
    m1.ensureCapacity(99);
    harness.check(m1.capacity() >= 99);
  }

}
View Full Code Here

     * @param node
     */
    public void insertNode(int index, DisplayNode node){
        if (node != null){
            DefaultListModel model = (DefaultListModel) this.list.getModel();
            model.ensureCapacity(index+1);
            model.insertElementAt(node, index);
            if (index >= this.tableModel.getRowCount()){
                this.tableModel.addRow(node);
            }
            else {
View Full Code Here

     * @param node
     */
    public void insertNode(int index, DisplayNode node){
        if (node != null){
            DefaultListModel model = (DefaultListModel) this.list.getModel();
            model.ensureCapacity(index+1);
            model.insertElementAt(node, index);
            if (index >= this.tableModel.getRowCount()){
                this.tableModel.addRow(node);
            }
            else {
View Full Code Here

     * @param node
     */
    public void insertNode(int index, DisplayNode node){
        if (node != null){
            DefaultListModel model = (DefaultListModel) this.list.getModel();
            model.ensureCapacity(index+1);
            model.insertElementAt(node, index);
            if (index >= this.tableModel.getRowCount()){
                this.tableModel.addRow(node);
            }
            else {
View Full Code Here

    // In the old days, one by one updates to active Swing components gave dreadful performance, so
    // I changed that, but that wasn't really the problem, it was that the if part didn't honor
    // maxMatches!
    removeAllMatches();
    final DefaultListModel newModel = new DefaultListModel();
    newModel.ensureCapacity(matches.size());

    //Two cases:
    // 1) Trees contain file and sentence annotations -> we can display differences
    // 2) Trees do not contain file and sentence annotations -> we display all matches with no differences
    //
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.