Package javax.swing.event

Examples of javax.swing.event.TableModelEvent


            && model.getValueAt(i, m_CurrentCol).toString().equals(value) )
          model.setValueAt(valueNew, i, m_CurrentCol);
    }
    model.setUndoEnabled(true);
    model.setNotificationEnabled(true);
    model.notifyListener(new TableModelEvent(model, 0, model.getRowCount(), m_CurrentCol, TableModelEvent.UPDATE));
   
    // refresh
    m_TableArff.repaint();
  }
View Full Code Here


    if ( (columnIndex > 0) && (columnIndex < getColumnCount()) ) {
      if (!m_IgnoreChanges)
        addUndoPoint();
      m_Data.deleteAttributeAt(columnIndex - 1);
      if (notify)
        notifyListener(new TableModelEvent(this, TableModelEvent.HEADER_ROW));
    }
  }
View Full Code Here

    m_IgnoreChanges = true;
    for (i = columnIndices.length - 1; i >= 0; i--)
      deleteAttributeAt(columnIndices[i], false);
    m_IgnoreChanges = false;

    notifyListener(new TableModelEvent(this, TableModelEvent.HEADER_ROW));
  }
View Full Code Here

   */
  public void renameAttributeAt(int columnIndex, String newName) {
    if ( (columnIndex > 0) && (columnIndex < getColumnCount()) ) {
      addUndoPoint();
      m_Data.renameAttribute(columnIndex - 1, newName);
      notifyListener(new TableModelEvent(this, TableModelEvent.HEADER_ROW));
    }
  }
View Full Code Here

      catch (Exception e) {
        e.printStackTrace();
        undo();
      }
     
      notifyListener(new TableModelEvent(this, TableModelEvent.HEADER_ROW));
    }
  }
View Full Code Here

      if (!m_IgnoreChanges)
        addUndoPoint();
      m_Data.delete(rowIndex);
      if (notify)
        notifyListener(
            new TableModelEvent(
                this, rowIndex, rowIndex,
                TableModelEvent.ALL_COLUMNS, TableModelEvent.DELETE));
    }
  }
View Full Code Here

    for (i = rowIndices.length - 1; i >= 0; i--)
      deleteInstanceAt(rowIndices[i], false);
    m_IgnoreChanges = false;

    notifyListener(
        new TableModelEvent(
            this, rowIndices[0], rowIndices[rowIndices.length - 1],
            TableModelEvent.ALL_COLUMNS, TableModelEvent.DELETE));
  }
View Full Code Here

   */
  public void sortInstances(int columnIndex) {
    if ( (columnIndex > 0) && (columnIndex < getColumnCount()) ) {
      addUndoPoint();
      m_Data.sort(columnIndex - 1);
      notifyListener(new TableModelEvent(this));
    }
  }
View Full Code Here

      }
    }
   
    // notify only if the value has changed!
    if (notify && (!("" + oldValue).equals("" + aValue)) )
        notifyListener(new TableModelEvent(this, rowIndex, columnIndex));
  }
View Full Code Here

        inst = (Instances) ooi.readObject();
        ooi.close();
       
        // set instances
        setInstances(inst);
        notifyListener(new TableModelEvent(this, TableModelEvent.HEADER_ROW));
        notifyListener(new TableModelEvent(this));
      }
      catch (Exception e) {
        e.printStackTrace();
      }
      tempFile.delete();
View Full Code Here

TOP

Related Classes of javax.swing.event.TableModelEvent

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.