Package javax.swing.event

Examples of javax.swing.event.TableModelListener


  private void raffraichirListe(){
    try {   
      //On commence par enlever le listener pour ne pas le perturber
      for (int i=0; i<localParent.getListFilmModel().getTableModelListeners().length;i++){
        TableModelListener tmpListener = localParent.getListFilmModel().getTableModelListeners()[i];
        if(tmpListener.getClass().equals(ListeFilmListener.class)){
          localParent.getListFilmModel().removeTableModelListener(tmpListener);
        }
      }
           
      //Puis on vide la JTable
View Full Code Here


            null);
      }

      //On commence par enlever le listener pour ne pas le perturber
      for (int i=0; i<localParent.getListFilmModel().getTableModelListeners().length;i++){
        TableModelListener tmpListener = localParent.getListFilmModel().getTableModelListeners()[i];
        if(tmpListener.getClass().equals(ListeFilmListener.class)){
          localParent.getListFilmModel().removeTableModelListener(tmpListener);
        }
      }

      int nbLigneTable = localParent.getListFilmModel().getRowCount();
View Full Code Here

        final ObjRelationshipTableModel model = new ObjRelationshipTableModel(
                entity,
                mediator,
                this);

        model.addTableModelListener(new TableModelListener() {

            public void tableChanged(TableModelEvent e) {
                if (table.getSelectedRow() >= 0) {
                    ObjRelationship rel = model.getRelationship(table.getSelectedRow());
                    if (((ObjEntity) rel.getSourceEntity()).getDbEntity() != null) {
View Full Code Here

        tblParameters.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
        tblParameters.setFillsViewportHeight(true);
        defaultTableModel = new DefaultTableModel(new Object[][] { { null, null, null, null }, }, new String[] { "I/O",
                "Parameter Name", "Type", "Description" });
        tblParameters.setModel(defaultTableModel);
        defaultTableModel.addTableModelListener(new TableModelListener() {

            @Override
            public void tableChanged(TableModelEvent arg0) {
                if (!ignoreTableChanges) {
          int selectedRow = tblParameters.getSelectedRow();
View Full Code Here

      public Class getColumnClass(int columnIndex) {
                return columnTypes[columnIndex];
            }
        };
        tblEnv.setModel(defaultTableModel);
        defaultTableModel.addTableModelListener(new TableModelListener() {
            public void tableChanged(TableModelEvent arg0) {
                if (!tableModelChanging) {
                    addNewRowIfLastIsNotEmpty();
                }
            }
View Full Code Here

        tblParameters.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
        tblParameters.setFillsViewportHeight(true);
        defaultTableModel = new DefaultTableModel(new Object[][] { { null, null, null, null }, }, new String[] { "I/O",
                "Parameter Name", "Type", "Description" });
        tblParameters.setModel(defaultTableModel);
        defaultTableModel.addTableModelListener(new TableModelListener() {

            public void tableChanged(TableModelEvent arg0) {
                if (!ignoreTableChanges) {
          int selectedRow = tblParameters.getSelectedRow();
          if (selectedRow != -1
View Full Code Here

      final TableModelEvent event =
              new TableModelEvent(SubSetTableModel.this, firstRow, lastRow, column, type);

      for (int i = 0; i < listeners.size(); i++)
      {
        final TableModelListener l = (TableModelListener) listeners.get(i);
        l.tableChanged(event);
      }
    }
View Full Code Here

        final ObjRelationshipTableModel model = new ObjRelationshipTableModel(
                entity,
                mediator,
                this);

        model.addTableModelListener(new TableModelListener() {

            public void tableChanged(TableModelEvent e) {
                if (table.getSelectedRow() >= 0) {
                    ObjRelationship rel = model.getRelationship(table.getSelectedRow());
                    if (((ObjEntity) rel.getSourceEntity()).getDbEntity() != null) {
View Full Code Here

      column.setPreferredWidth((int) (tableDim.width * (percentages[i] / total)));
    }
  }

  public void addDialogListener(final PreferencesDialog dialog) {
    getModel().addTableModelListener(dialogListener = new TableModelListener() {     
      public void tableChanged(TableModelEvent e) {
        dialog.componentChanged(PrefTable.this);
      }
    });
  }
View Full Code Here

        final ObjRelationshipTableModel model = new ObjRelationshipTableModel(
                entity,
                mediator,
                this);

        model.addTableModelListener(new TableModelListener() {

            public void tableChanged(TableModelEvent e) {
                if (table.getSelectedRow() >= 0) {
                    ObjRelationship rel = model.getRelationship(table.getSelectedRow());
                    if (rel.getTargetEntity() != null
View Full Code Here

TOP

Related Classes of javax.swing.event.TableModelListener

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.