/***************************************************************************
                            QTable.java -  description
                             -------------------
    begin                : Wed Nov 21 17:05:56 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Nov 21 17:05:56 2001, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
***************************************************************************/

package org.kde.qt;

import java.util.*;
import java.lang.Error;

/**
 See {@link QTableSignals} for signals emitted by QTable.

 See {@link QTableEventHandling} for event handlers to override in subclasses of QTable.

*/
public class QTable extends QScrollView  {
	protected QTable(Class dummy){super((Class) null);}

	private native void newQTable( QWidget parent, String name);
	public QTable( QWidget parent, String name) {
		super((Class) null);
		newQTable( parent, name);
	}
	private native void newQTable();
	public QTable() {
		super((Class) null);
		newQTable();
	}
	private native void newQTable( int numRows, int numCols, QWidget parent, String name);
	public QTable( int numRows, int numCols, QWidget parent, String name) {
		super((Class) null);
		newQTable( numRows, numCols, parent, name);
	}
	private native void newQTable( int numRows, int numCols);
	public QTable( int numRows, int numCols) {
		super((Class) null);
		newQTable( numRows, numCols);
	}
	protected native void finalize() throws InternalError;
	public native QHeader horizontalHeader();
	public native QHeader verticalHeader();
	public native void setSelectionMode( int mode);
	public native int selectionMode();
	public native void setItem( int row, int col, QTableItem item);
	public native void setText( int row, int col, String text);
	public native void setPixmap( int row, int col, QPixmap pix);
	public native QTableItem item( int row, int col);
	public native String text( int row, int col);
	public native QPixmap pixmap( int row, int col);
	public native void clearCell( int row, int col);
	public native QRect cellGeometry( int row, int col);
	public native int columnWidth( int col);
	public native int rowHeight( int row);
	public native int columnPos( int col);
	public native int rowPos( int row);
	public native int columnAt( int x);
	public native int rowAt( int y);
	public native int numRows();
	public native int numCols();
	public native void updateCell( int row, int col);
	public native boolean eventFilter( QObject o, QEvent arg1);
	public native int currentRow();
	public native int currentColumn();
	public native void ensureCellVisible( int row, int col);
	public native boolean isSelected( int row, int col);
	public native boolean isRowSelected( int row, boolean full);
	public native boolean isRowSelected( int row);
	public native boolean isColumnSelected( int col, boolean full);
	public native boolean isColumnSelected( int col);
	public native int numSelections();
	public native QTableSelection selection( int num);
	public native int addSelection( QTableSelection s);
	public native void removeSelection( QTableSelection s);
	public native void removeSelection( int num);
	public native int currentSelection();
	public native boolean showGrid();
	public native boolean columnMovingEnabled();
	public native boolean rowMovingEnabled();
	public native void sortColumn( int col, boolean ascending, boolean wholeRows);
	public native void sortColumn( int col);
	public native boolean sorting();
	public native void takeItem( QTableItem i);
	public native void setCellWidget( int row, int col, QWidget e);
	public native QWidget cellWidget( int row, int col);
	public native void clearCellWidget( int row, int col);
	public native QRect cellRect( int row, int col);
	public native void paintCell( QPainter p, int row, int col, QRect cr, boolean selected);
	public native void paintCell( QPainter p, int row, int col, QRect cr, boolean selected, QColorGroup cg);
	public native void paintFocus( QPainter p, QRect r);
	public native QSize sizeHint();
	public native boolean isReadOnly();
	public native boolean isRowReadOnly( int row);
	public native boolean isColumnReadOnly( int col);
	public native void setEnabled( boolean b);
	public native void repaintSelections();
	public native void setFocusStyle( int fs);
	public native int focusStyle();
	public native void setNumRows( int r);
	public native void setNumCols( int r);
	public native void setShowGrid( boolean b);
	public native void hideRow( int row);
	public native void hideColumn( int col);
	public native void showRow( int row);
	public native void showColumn( int col);
	public native void setColumnWidth( int col, int w);
	public native void setRowHeight( int row, int h);
	public native void adjustColumn( int col);
	public native void adjustRow( int row);
	public native void setColumnStretchable( int col, boolean stretch);
	public native void setRowStretchable( int row, boolean stretch);
	public native boolean isColumnStretchable( int col);
	public native boolean isRowStretchable( int row);
	public native void setSorting( boolean b);
	public native void swapRows( int row1, int row2, boolean swapHeader);
	public native void swapRows( int row1, int row2);
	public native void swapColumns( int col1, int col2, boolean swapHeader);
	public native void swapColumns( int col1, int col2);
	public native void swapCells( int row1, int col1, int row2, int col2);
	public native void setLeftMargin( int m);
	public native void setTopMargin( int m);
	public native void setCurrentCell( int row, int col);
	public native void clearSelection( boolean repaint);
	public native void clearSelection();
	public native void setColumnMovingEnabled( boolean b);
	public native void setRowMovingEnabled( boolean b);
	public native void setReadOnly( boolean b);
	public native void setRowReadOnly( int row, boolean ro);
	public native void setColumnReadOnly( int col, boolean ro);
	public native void setDragEnabled( boolean b);
	public native boolean dragEnabled();
	public native void insertRows( int row, int count);
	public native void insertRows( int row);
	public native void insertColumns( int col, int count);
	public native void insertColumns( int col);
	public native void removeRow( int row);
	public native void removeColumn( int col);
	public native void editCell( int row, int col, boolean replace);
	public native void editCell( int row, int col);
	protected native void drawContents( QPainter p, int cx, int cy, int cw, int ch);
	protected native void setEditMode( int mode, int row, int col);
	protected native QDragObject dragObject();
	protected native void startDrag();
	protected native void paintEmptyArea( QPainter p, int cx, int cy, int cw, int ch);
	protected native void activateNextCell();
	protected native QWidget createEditor( int row, int col, boolean initFromCell);
	protected native void setCellContentFromEditor( int row, int col);
	protected native QWidget beginEdit( int row, int col, boolean replace);
	protected native void endEdit( int row, int col, boolean accept, boolean replace);
	protected native void resizeData( int len);
	protected native void insertWidget( int row, int col, QWidget w);
	protected native int indexOf( int row, int col);
	protected native void windowActivationChange( boolean arg1);
	protected native boolean isEditing();
	protected native int editMode();
	protected native int currEditRow();
	protected native int currEditCol();
	protected native void columnWidthChanged( int col);
	protected native void rowHeightChanged( int row);
	protected native void columnIndexChanged( int section, int fromIndex, int toIndex);
	protected native void rowIndexChanged( int section, int fromIndex, int toIndex);
	protected native void columnClicked( int col);
	public static final int Single = 0;
	public static final int Multi = 1;
	public static final int SingleRow = 2;
	public static final int MultiRow = 3;
	public static final int NoSelection = 4;
	public static final int FollowStyle = 0;
	public static final int SpreadSheet = 1;
	public static final int NotEditing = 0;
	public static final int Editing = 1;
	public static final int Replacing = 2;
}
