Ejemplo n.º 1
0
  public void clearTable() {
    tableEntry.clearTable();

    //		int columnCount = tableEntry.getColumnCount();
    //		for(int y=0; y<columnCount; y++){
    //			removeColumn(0,tableEntry);
    //		}
  }
Ejemplo n.º 2
0
  public void setTable(Object[][] tableValues, Object[] columnNames) {

    tableEntry.setTable(tableValues, columnNames);

    //		int columnCount = tableEntry.getColumnCount();
    //		for(int y=0; y<columnCount; y++){
    //			removeColumn(0,tableEntry);
    //		}
    //
    //		for(int x=0; x<columnNames.length; x++){
    //			model.addColumn(columnNames[x], tableValues[x]);
    //
    //			if(x!=0){
    //				TableColumn soprtColumn=tableEntry.getColumnModel().getColumn(x);
    //				soprtColumn.setCellEditor(new DefaultCellEditor (new JTextField()));
    //				tableEntry.setCellSelectionEnabled(true);
    //			}
    //		}
    //
    ////		tableEntry.addFocusListener(new FocusListener() {
    ////			public void focusGained(FocusEvent e) {
    ////		       int row = tableEntry.getEditingRow();
    ////		       int col = tableEntry.getEditingColumn();
    ////
    ////		       if (row >= 1 && col >= 1) {
    ////		           fieldHelp.showUrl(helpUrls.get(col-1));
    ////		        }
    ////		        else if(row ==0 && col ==0){
    ////		        	fieldHelp.showUrl(helpUrls.get(0));
    ////		        }
    ////		    }
    ////
    ////			@Override
    ////			public void focusLost(FocusEvent e) {
    ////				// TODO Auto-generated method stub
    ////
    ////			}
    ////		});
    //
    //
    //		 tableEntry.setCellSelectionEnabled(true);
    //		    ListSelectionModel cellSelectionModel = tableEntry.getSelectionModel();
    //		    cellSelectionModel.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    //
    //		    cellSelectionModel.addListSelectionListener(new ListSelectionListener() {
    //		      public void valueChanged(ListSelectionEvent e) {
    //
    //
    //		        int row = tableEntry.getSelectedRow();
    //		        int col = tableEntry.getSelectedColumn();
    //		        if (row >= 1 && col >= 1) {
    //			           fieldHelp.showUrl(helpUrls.get(col-1));
    //			        }
    //			        else if(row ==0 && col ==0){
    //			        	fieldHelp.showUrl(helpUrls.get(0));
    //			        }
    //		      }
    //		    });
    //
    ////		tableEntry.addMouseListener(new java.awt.event.MouseAdapter() {
    ////		    @Override
    ////		    public void mouseClicked(java.awt.event.MouseEvent evt) {
    ////		        int row = tableEntry.rowAtPoint(evt.getPoint());
    ////		        int col = tableEntry.columnAtPoint(evt.getPoint());
    ////		        if (row >= 1 && col >= 1) {
    ////		           fieldHelp.showUrl(helpUrls.get(col-1));
    ////		        }
    ////		        else if(row ==0 && col ==0){
    ////		        	fieldHelp.showUrl(helpUrls.get(0));
    ////		        }
    ////		    }
    ////		});
  }