/ Forside / Teknologi / Udvikling / Java / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
Java
#NavnPoint
molokyle 3688
Klaudi 855
strarup 740
Forvirret 660
gøgeungen 500
Teil 373
Stouenberg 360
vnc 360
pmbruun 341
10  mccracken 320
Cut Action og ActionMap bøvl
Fra : Mikael Flensborg


Dato : 24-10-06 09:51

Hi..

I have an annoying problem in a Swing based application framework, I am
working on, and hope some have a useful hint.

The way the clipboard enabling/disabling works, is that when keyboard
focus changes, I ask the ActionMap focused component which of the
copy/cut/paste operations are on the ActionMap. If the given clipoard
aciton is on the map, I enable the action, otherwise I disable it.

The given problem is that when a JTextArea is focused, the Cut action is
obviously supported, since the user can cut with the usual CTRL-X
keybinding, however the Cut Action is NOT in the ActionMap, and
therefore I disable the Action. Works fine with copy/paste, since these
are on the ActionMap. Could some kind soul tell me the difference... WHY
WHY WHY is the cut action on on the JTextAreas ActionMap?

Kindest Regards
Mikael Flensborg (CLC bio)

 
 
Søg
Reklame
Statistik
Spørgsmål : 177577
Tips : 31968
Nyheder : 719565
Indlæg : 6409071
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste