craftleft.gif (3002 bytes)QuickTable
Home | API | Tutorial | Download | Support | Contact topblack.gif (108 bytes)


QuickTable User Cp  |  Register  |  Members  |  Search  |  Help
    |- QuickTable Discussion Forums > CellEditor/Renderer Post New Topic   Post A Reply
drap and drop implementation in JTable printer friendly version
next newest post | next oldest post
Author Messages
khan379
Corporal

Gender: Male
Location:
Registered: Dec 2007
Status: Offline
Posts: 29

Click here to see the profile for khan379 Send email to khan379 Send private message to khan379 Find more posts by khan379 Edit or delete this message Reply w/Quote
Posted Tuesday, February 12, 2008 @ 16:29:11  

Hi,
I am implementating the drap and drop feature in my quicktable, http://java.sun.com/docs/books/tutorial/uiswing/dnd/intro.html

at the outset, if my column cell is editable, then quicktable behaves differntly from the default JTable. i mean on first click the cell should get highlighted, so that it can be dragged. on double click it should allow editing. but on single click, my quicktable implementation, goes in editing mode :(
how can i get the default behavior of JTable as above?

Note: i already have the drag and drop classes written.

Thanks,

--------------------
A H Khan

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Wednesday, February 13, 2008 @ 23:02:28  

single click edit is the default behaviour. we don't have a way to change it. If the columns need not be editable set editable false for those columns. In next release we will provide a way to modify the default behaviour.
khan379
Corporal

Gender: Male
Location:
Registered: Dec 2007
Status: Offline
Posts: 29

Click here to see the profile for khan379 Send email to khan379 Send private message to khan379 Find more posts by khan379 Edit or delete this message Reply w/Quote
Posted Thursday, February 14, 2008 @ 11:35:32  

done!! we have overridedn the isEditable() method, for our own filtered model

Thanks,

--------------------
A H Khan

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Thursday, February 14, 2008 @ 12:42:10  

You can also use

column.setReadOnly(true) for column by column or
dbTable.setEditable(false) for whole table.

If you want to change this behaviour per column, then use dbTable.getColumn(i).getCellEditor().setClickCountToStart(2);

Post New Topic   Post A Reply Jump to:
Contact Us | QuickTable - A Java DBGrid | Privacy Policy All times are GMT -5 Hours.
Welcome to QuickTable Forums, Guest!  
Login
Username :
Password :
In order to fully utilize the abilities of this board, you are required to register as a member. Registration is free, and allows you to do lots of things including turning on or off certain features of this board. Register now!
Powered by CuteCast v2.0 BETA 2
Copyright © 2001-2003 ArtsCore Studios