Package net.sourceforge.squirrel_sql.fw.gui

Examples of net.sourceforge.squirrel_sql.fw.gui.SortableTableModel


   
    // Do not try to be fancy and insert the data where the user is looking,
    // just stuff it into the actual model and re-paint the table
    // when the 'table changed' event is fired.
   
    SortableTableModel sortedModel =
      (SortableTableModel)((JTable)getComponent()).getModel();
     
    sortedModel.insertRow(values);
   
    // everything is ok
    return null;
  }
View Full Code Here


   public ProcessListPanel()
   {
      setLayout(new BorderLayout());


      tblProcessList = new SortableTable(new SortableTableModel(null));
      tblProcessList.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
      tblProcessList.getTableHeader().setResizingAllowed(true);
      tblProcessList.getTableHeader().setReorderingAllowed(true);
      tblProcessList.setAutoCreateColumnsFromModel(false);
      tblProcessList.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
View Full Code Here

               return ProcessData.getColumns().length;
            }

         };

      SortableTableModel stm = (SortableTableModel) _pnlProcessList.tblProcessList.getModel();
      stm.setActualModel(dtm);

      DefaultTableCellRenderer dtcr =
         new DefaultTableCellRenderer()
         {
            public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
View Full Code Here

         old = _procData[selectedRow];
      }

      _procData = _processListTabListener.refreshRequested(_session);

      SortableTableModel stm = (SortableTableModel) _pnlProcessList.tblProcessList.getModel();
      ((DefaultTableModel)stm.getActualModel()).fireTableDataChanged();
      stm.fireTableDataChanged();

      ButtonTableHeader bth = (ButtonTableHeader) _pnlProcessList.tblProcessList.getTableHeader();

      if(-1 != bth.getCurrentlySortedColumnIdx())
      {
         stm.sortByColumn(bth.getCurrentlySortedColumnIdx(), bth.isAscending());
      }


      _pnlProcessList.tblProcessList.repaint();
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.fw.gui.SortableTableModel

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.