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 > UI , Look and Feel, Colors, Navigation, font, Locale Post New Topic   Post A Reply
Change default cell Navigation printer friendly version
next newest post | next oldest post
Author Messages
aurelio7
Private

Gender: Unspecified
Location:
Registered: Jul 2005
Status: Offline
Posts: 5

Click here to see the profile for aurelio7 Send email to aurelio7 Send private message to aurelio7 Find more posts by aurelio7 Edit or delete this message Reply w/Quote
Posted Thursday, July 14, 2005 @ 07:45:44  

I would like to change the default cell navigation behaviour. Actually if I press enter the selection move from the top to the bottom and from the left to the right of the table. When I press vk_enter i would like change the behaviour so the navigations wil be from the left to thwe right and from the top to the bottom. I add a keylistener waiting for the vk_enter with this code but without luck......
Now the cursor move well fro the left to the right but everytime I press vk_enter the row change to the next.
So I invented the "table diagonal navigation"
How can I do this ??

class moveKey implements java.awt.event.KeyListener{
public void keyPressed(java.awt.event.KeyEvent e){

}
public void keyTyped(java.awt.event.KeyEvent e){

}
public void keyReleased(java.awt.event.KeyEvent e){
if(e.getKeyCode()==10){
table.selectCell(table.getSelectedRow(), table.getSelectedColumn()+1);
table.getTable().changeSelection(table.getSelectedRow(), table.getSelectedColumn()+1,false,false);
}
}
}

RYAN
Unregistered
Edit or delete this message Reply w/Quote
Posted Thursday, July 14, 2005 @ 14:50:10  

I dont really know if this is what your asking for but this is what i used to make ENTER mimmick the TAB on the table

KeyStroke enterKey = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0);
KeyStroke tab = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0);
InputMap tableInputMap = dBTable1.getTable().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
tableInputMap.put(enterKey, tableInputMap.get(tab));

aurelio7
Private

Gender: Unspecified
Location:
Registered: Jul 2005
Status: Offline
Posts: 5

Click here to see the profile for aurelio7 Send email to aurelio7 Send private message to aurelio7 Find more posts by aurelio7 Edit or delete this message Reply w/Quote
Posted Thursday, July 14, 2005 @ 16:20:41  

You have understand my problem. This is the behaviour I want. Enter key == Tab key.
Very Thanks. Great support
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