Getting keyboard events with Group
Hi all,
I'm new to JavaFX and I'm trying to handle keyboard events in a group but it doesn't seem to respond when I press the keyboard.
As I understand this is because Group doesn't receive the focus. If that is the case, how can I make it receive focus? I tried calling setFocusTraversable(true) and setFocused(true) but both haven't helped.
If it's not the focus, what is it?
Thanks!
Use requestFocus() instead of setFocused(true).
Keyboards events work as expected with a group.
@Override
public void start(Stage primaryStage) {
Button btn = new Button();
btn.setText("Say 'Hello World'");
Group root = new Group();
root.addEventFilter(KeyEvent.KEY_PRESSED, new EventHandler<KeyEvent>() {
public void handle(KeyEvent event) {
System.out.println(event.getCode());
event.consume();
root.getChildren().add(btn);
Scene scene = new Scene(root, 300, 250);
primaryStage.setTitle("Hello World!");
primaryStage.setScene(scene);
primaryStage.show();
root.requestFocus();
Similar Messages
-
Getting keyboard events on ALV grid
Hi,
I have an ALV Grid where it is possible to edit data. If user selects a row and presses delete/cut button with mouse event is triggered and I can access those events in code. Although if user selects a row and presses "Del" or "Ctrl + X" then I can't access those events in code. Is there a way to access keyboard events inside my code?Have a look at BCALV_GRID_EDIT -> if you select the first checkbox (p_cell = Update on cell change) then you will find that "data_changed" event can catch the line deletion via the keystrokes described.. in the event in this program, you could get the rows deleted from "rr_data_changed->mt_deleted_rows".
if p_cell = 'X'.
call method grid1->register_edit_event
exporting
i_event_id = cl_gui_alv_grid=>mc_evt_modified.
else.
Jonathan -
Problem getting calendar event with recurring using EWS Java client API 1.2
I am using EWS 1.2 Java client API for getting calendar events. I am able to get Recurring information of the event which is created through API's
appointment.save(), but not able to get recurring information of the event created in OWA interface, I get following error during the bind:
===================================
Exception: Connection not established
microsoft.exchange.webservices.data.EWSHttpException: Connection not established
at microsoft.exchange.webservices.data.HttpClientWebRequest.throwIfConnIsNull(HttpClientWebRequest.java:394)
at microsoft.exchange.webservices.data.HttpClientWebRequest.getResponseHeaders(HttpClientWebRequest.java:280)
at microsoft.exchange.webservices.data.ExchangeServiceBase.processHttpResponseHeaders(ExchangeServiceBase.java:1045)
at microsoft.exchange.webservices.data.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:58)
at microsoft.exchange.webservices.data.MultiResponseServiceRequest.execute(MultiResponseServiceRequest.java:144)
at microsoft.exchange.webservices.data.ExchangeService.internalBindToItems(ExchangeService.java:1364)
at microsoft.exchange.webservices.data.ExchangeService.bindToItem(ExchangeService.java:1407)
at microsoft.exchange.webservices.data.ExchangeService.bindToItem(ExchangeService.java:1430)
at microsoft.exchange.webservices.data.Appointment.bind(Appointment.java:70)
at microsoft.exchange.webservices.data.Appointment.bindToRecurringMaster(Appointment.java:176)
at microsoft.exchange.webservices.data.Appointment.bindToRecurringMaster(Appointment.java:152)
============================
This happens if I use: Appointment.bindToRecurringMaster or Item.bind(service, id, appointmentProps) or findAppointments().
Works fine for events which doesn't have recurring. Only issue with events containing recurrence created through OWA. These are the propertySet:
new PropertySet(BasePropertySet.IdOnly,
ItemSchema.Subject,
AppointmentSchema.AppointmentType,
AppointmentSchema.DeletedOccurrences,
AppointmentSchema.FirstOccurrence,
AppointmentSchema.LastOccurrence,
AppointmentSchema.IsRecurring,
AppointmentSchema.Location,
AppointmentSchema.ModifiedOccurrences,
AppointmentSchema.OriginalStart,
AppointmentSchema.Recurrence,
AppointmentSchema.Start,
AppointmentSchema.End);
If I remove Recurrence it gives the response.
Thanks.I am using EWS 1.2 Java client API for getting calendar events. I am able to get Recurring information of the event which is created through API's
appointment.save(), but not able to get recurring information of the event created in OWA interface, I get following error during the bind:
===================================
Exception: Connection not established
microsoft.exchange.webservices.data.EWSHttpException: Connection not established
at microsoft.exchange.webservices.data.HttpClientWebRequest.throwIfConnIsNull(HttpClientWebRequest.java:394)
at microsoft.exchange.webservices.data.HttpClientWebRequest.getResponseHeaders(HttpClientWebRequest.java:280)
at microsoft.exchange.webservices.data.ExchangeServiceBase.processHttpResponseHeaders(ExchangeServiceBase.java:1045)
at microsoft.exchange.webservices.data.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:58)
at microsoft.exchange.webservices.data.MultiResponseServiceRequest.execute(MultiResponseServiceRequest.java:144)
at microsoft.exchange.webservices.data.ExchangeService.internalBindToItems(ExchangeService.java:1364)
at microsoft.exchange.webservices.data.ExchangeService.bindToItem(ExchangeService.java:1407)
at microsoft.exchange.webservices.data.ExchangeService.bindToItem(ExchangeService.java:1430)
at microsoft.exchange.webservices.data.Appointment.bind(Appointment.java:70)
at microsoft.exchange.webservices.data.Appointment.bindToRecurringMaster(Appointment.java:176)
at microsoft.exchange.webservices.data.Appointment.bindToRecurringMaster(Appointment.java:152)
============================
This happens if I use: Appointment.bindToRecurringMaster or Item.bind(service, id, appointmentProps) or findAppointments().
Works fine for events which doesn't have recurring. Only issue with events containing recurrence created through OWA. These are the propertySet:
new PropertySet(BasePropertySet.IdOnly,
ItemSchema.Subject,
AppointmentSchema.AppointmentType,
AppointmentSchema.DeletedOccurrences,
AppointmentSchema.FirstOccurrence,
AppointmentSchema.LastOccurrence,
AppointmentSchema.IsRecurring,
AppointmentSchema.Location,
AppointmentSchema.ModifiedOccurrences,
AppointmentSchema.OriginalStart,
AppointmentSchema.Recurrence,
AppointmentSchema.Start,
AppointmentSchema.End);
If I remove Recurrence it gives the response.
Thanks.
I am also facing the same problem.. If anyone can help, it would be helpful. I can see the response xml has the data, but while parsing the xml the error is generated in getResponseCode() in HttpClientWebRequest -
Dispatch loaded clip's keyboard event with parent's mouse click
Hi. I'm building a swf wrapper which loads third-party swf games. The client would like a button in the wrapper which will dispatch a keyboard event in the loaded swf.
Can anyone give me hand on how to construct a dispatch event in the wrapper that reaches into the loaded swf?
Many thanks!after loading is complete:
MovieClip(yourloader.content).dispatchEvent(new KeyboardEvent(somekeyboardevent)); // if the loaded swf is a movieclip -
Firefox 9.0.1 with Flash player not catch keyboard event with mouse click.
In a flash application, I need select mutil items using shite key and mouse click, it is not working. looks like firefox didn't pass the keyboard even alone with the click event. This happen on Window 7, IE and Chrome have no problem. only FF
i have the same problem everytime i open a website with flashcontent firefox freezes and i have to kill the flash process to unfreeze the browser the only way i can see a youtube video is in html5 mode.
Hardware
Acer aspire 4553
Turion X2 p520
3gb of ddr3 ram
Ati Mobility Radeon 4250 -
How can I get column totals with group breaks
We manually generate a report of file groups and their associated data files each day for each of our databases.
For each database we take data from dbcc showfilestats and assemble it into an Excel spreadsheet (see below).
I would like to use a SQL job to generate the reports (results do not need to be in Excel format). I can insert the data from the DBCC into a table; but, I'm stuck on how to write a select statement that will break on file group and provide column totals.
I've been looking at group by; but, I don't see how to make it work.
Suggestions?
FileGroup
FileID
Volume
Allocated(MB)
Used space(MB)
Free space(MB)
Used %
1
1
Data1
100
50
50
50%
1
15
Data2
200
175
125
87.50%
1
21
Data3
300
200
100
6.60%
600
425
275
70.80%
FileGroup
FileID
Volume
Allocated(MB)
Used space(MB)
Free space(MB)
Used %
2
1
index1
100
50
50
50%
2
15
index2
200
175
125
87.50%
2
21
index3
300
200
100
6.60%
600
425
275
70.80%Take a look at the following blog on subtotal, total & grand total:
http://www.sqlusa.com/bestpractices2005/subtotaltotalgrandtotal/
It appears that you need only 1 level of totals.
BOL:
Summarizing Data Using ROLLUP
Kalman Toth Database & OLAP Architect
SELECT Video Tutorials 4 Hours
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
No keyboard Events on a Window
Hello Java community,
I can't understand why, if you build a simple Window (not a Frame), all keyboard Events are simply ignored !! Everything acts as if the Window can't get the focus, because no LOST_ or GOT_ FOCUS events are triggered. This means that you can't handle keyboard events with a Window and therefore a Textfield will not work (however it still receive mouse events ??). BUT it perfectly works with a Frame , which extends from Window! Strange isn't it ?
I've heard on other forums that , to be eligible for focus a Window must have:
- its owner Frame (the one given in the constructor) :
* displayed on screen,
* containing a focusable component.
- itself, containing a focusable component.
thus i respect theses limitations, i still can't get any keyboard events
pleaze help, i am writing a text area component and without keyboard events ...Thanks for the answers BUT,
I have already read the javadoc in every ways and I am sure I respect perfectly all the conditions to have my WINDOW focusable.
No, there is another problem, a strange one. In fact, my program works fine under Windows I can type characters into my Textfields but once executed under Linux : no keyboard events! Therefore, no character type allowed. I display in the console, all events that are incomming into my Window, and ALL events are ok (mouse, windows..) except keyboards ones. When I press a key, nothing appears in my console, that's why I think keyboards events are caught and not dispatched to the Window.
I noticed an interresting fact when using my app in Applet. For example, I launched my application with Mozilla (Netscape 4, JRE 1.1). I displayed an empty Window on screen, when my mouse passes over it or when I click, the Java console showed me these events. When I try to hit some keyboard keys, nothing except for certain keys such as F, G, D, J and numeric keys. In fact, these keys are shortcuts to some of the System class (F calls Finalization, G=Garbage Collector, D=Debug Mode...). I truely think that on a Window, all keyboard events are send to the console. Another fact that proved me that i was right : I tried my app with JRE 1.2, and when I wanted to type characters into my TextField (which is on my Window), the typed characters appeared in the console !!!!
A JAVA-experimented person told me to redirect the standard input to my own inputStream... but how ?
Any ideas of solutions ? -
[SOLVED] PgUp/PgDown Improperly Spawn Two Keyboard Events
After doing an upgrade (pacman -Syu), I can no longer use the following keys on my keyboard without unappreciated consequences:
- PgUp
- PgDown
- now, apparently, the Left arrow
When I use xev, I get two separate events for every one real keyboard event, with two keycodes.
For example, this is what happens when I press PgUp:
KeyPress event, serial 24, synthetic NO, window 0x1800001,
root 0xae, subw 0x0, time 1850204, (679,556), root:(680,571),
state 0x0, keycode 112 (keysym 0xffaf, KP_Divide), same_screen YES,
XLookupString gives 1 bytes: (2f) "/"
XmbLookupString gives 1 bytes: (2f) "/"
XFilterEvent returns: False
KeyPress event, serial 24, synthetic NO, window 0x1800001,
root 0xae, subw 0x0, time 1850204, (679,556), root:(680,571),
state 0x0, keycode 99 (keysym 0xff55, Prior), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
MappingNotify event, serial 27, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
KeyRelease event, serial 27, synthetic NO, window 0x1800001,
root 0xae, subw 0x0, time 1850306, (679,556), root:(680,571),
state 0x0, keycode 112 (keysym 0xffaf, KP_Divide), same_screen YES,
XLookupString gives 1 bytes: (2f) "/"
XFilterEvent returns: False
MappingNotify event, serial 27, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
KeyRelease event, serial 27, synthetic NO, window 0x1800001,
root 0xae, subw 0x0, time 1850306, (679,556), root:(680,571),
state 0x0, keycode 99 (keysym 0xff55, Prior), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
I've checked xmodmap -pke, but I have no idea what it means:
keycode 99 = Prior NoSymbol Prior
keycode 112 = KP_Divide XF86_Ungrab KP_Divide XF86_Ungrab
Any help would be appreciated. Needless to say, this is pretty annoying when I'm trying to edit code and it searches my document instead of scrolling up, or capitalizes words (some vim feature I had previously never known about, and will most likely never use).
Last edited by secretrobotron (2010-06-24 15:09:05)I'm pretty sure I'm using the latest xorg. I installed a fresh version of arch a couple months ago.
My xorg.conf has about six lines concerning keyboards, most of which are
Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbLayout" "us"
EndSection
and the other being
InputDevice "Keyboard0"
in the ServerLayout section.
Is there a newer way to do this? Perhaps omitting it altogether?
I'm using xmonad, and I checked my keybindings in xmonad.hs to see if I had anything hilarious. Alas, I found nothing. -
My client uses IrfanView to play SWF files. Unfortunately, he does not use Flashplayer. In Flashplayer, I can crossover mouse and keyboard events with no problem. In IrfanView, the second I click a button, the keyboard events are disabled. Is there a fix?
Hi Ned. I may have posted this issue a bit early, but this problem is also happening in Flashplayer 10. It's not exclusive to IrfanView.
Here is something that I encountered during my testing, when I jump to scene 6 using the menu button, I have a play button to jump from one frame to the next frame that stops -- the keyboard events start working. But if all I am doing is jumping scene to scene with the mouse button, the keyboard events are disabled.
I feel as if the keyboard events only work if I am playing frames in the scene. And if all I am doing is jumping scene to scene using the buttons, the keys will disable.
I set up the mouse buttons inside a movieclip that all the scenes share. The mouse actionscript is in the movieclip. On the main timeline of each scene is an actionscript for the keyboard events, even though I had to change each function name.
I feel the actionscript is setup pretty simple. I just wish clicking the buttons would not disable the keyboard events. This may sound redundant, but the keyboard events do the same thing if you use the mouse buttons. It's just preference for the client even though he will need to understand that using the mouse buttons override the keyboard events. He doesn't really lose functionality.
Keyboard actionscripting below:
import flash.events.KeyboardEvent;
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyEvent);
function onKeyEvent(e:KeyboardEvent):void {
var character:String=String.fromCharCode(e.charCode);
if (e.keyCode==72) {
gotoAndStop(1,"master");
if (e.charCode==49) {
gotoAndPlay(1,"Distributor");
if (e.charCode==50) {
gotoAndPlay(1,"Mirka");
if (e.charCode==51) {
gotoAndPlay(1,"Farm");
if (e.charCode==52) {
gotoAndPlay(1,"Check2");
if (e.charCode==53) {
gotoAndPlay(1,"Check3");
if (e.charCode==54) {
gotoAndPlay(1,"Scene2");
if (e.charCode==55) {
gotoAndPlay(1,"Scene1"); -
in ical I just added new calendars to a pre-existing calendar group, I can make events with these calendars, but not reminders, any suggestions?
Hi,
Lion has changed the way reminders (todos as was) work. They now seem to need to be in a seperate calendar.
In iCal open the File menu and select New Reminder List... and select where to put it.
Best wishes
John M -
Analytical Services failed to get user's parent group tree with Error
Hi,
We have a frequent errror during our weekly batch for an application.
The context:
- Essbase Administration Services we are using is version is 9.3.1.
- 8 applications are calculated during the week-end. The scripts executed are exactly the same for the 8 applications.
- For example let's say that 5 scripts are launched during the night in the batch for each application (script 1, script 2 ... script 5)
- App1 and App2 are launched alone and before the 6 others applications as these applications database are 3 x bigger (App1 is calculated alone, then app2 is calculated alone, then app3 to app8 scripts are launched in the same time).
The issue :
- We don't see any issue for app3 to app8, the calculation are executed without any problem from script1 to script5.
- But we have an error in App1 and App2 log when the bath execute script 4 and we see the following error in the server log **
"Analytical Services failed to get user's parent group tree with Error".
(** : we don't see any log for script 4 in the application log - it's like the server bypass script 4 to go directly from script 3 to script 5 )
Nothing special is done in script 4 but just an aggregation of the Year dimension (using a @SUM(@RELATIVE(Year,0)) calculation.
I think that there is may be a synchronization error with Shared Services but what is strange is that it's always for the same script 4 and the batch is launched at different time every week-end.
Can the issue be linked to the size of the database of applications (8 Gb) and difficulties for the processor to executes aggregation in a large database volume ?Hi,
According to your description, my understanding is that the error occurred when sending an email to the user in workflow.
Did you delete the existing Connections before setting NetBiosDomainNamesEnabled?
If not, I recommend to delete and recreate your AD connections, then set NetBiosDomainNamesEnabled to true.
Or you can delete the original User Profile Service Application and create a new one, then set the NetBiosDomainNamesEnabled to true and start the User Profile Service Application
synchronization.
More reference:
http://social.technet.microsoft.com/wiki/contents/articles/18060.sharepoint-20xx-what-if-the-domain-netbios-name-is-different-than-the-fqdn-of-the-domain-with-user-profile.aspx
Best regards.
Thanks
Victoria Xia
TechNet Community Support -
How do I get new events on my phone to sync with my desktop ical?
How do I get new events on my phone to sync with my desktop ical?
Hello juliebgerstel,
I read your post, and it sounds as though you'd like to learn about calendar syncing. I have linked to an article that will instruct you on how to do that:
iOS: How to transfer or sync content to your computer
Thank you for contributing to Apple Support Communities.
Cheers,
BobbyD -
Initial Load - AS ABAP - getting only user with a group
Hi,
when i start initial load, i just get users with groups. Is that standard?
Br,
PhilipFirst of all - you'll need to familiarize yourself with the database for effective learning and debugging. I'm talking about the MS-SQL or Oracle-DB where you installed the IC-schema. It often helps me to understand whats going on behind the scenes.
Secondly - I read some of your posts - I would advise you to install the dispatcher and everything on the server where the DB is hosted - at least as long as you're in development. The MMC can still be on your local pc/laptop, although some things won't work well there (Import, Dispatcher-Status, ...). This'll ease things a lot I suppose.
About the service-user... SAP delivers a role you can import into PFCG (SAP_BC_SEC_IDM_.SAP-File in misc-folder of installation media). This role should be sufficient for your communication user, is updated every now and then and contains only the necessary permissions. Maybe you'll have to extend it (Z_SAP_) in case you want to read special tables not supported by the SAP framework (e.g. license data).
I can hardly believe that the current role assigned to your user only has permissions to users with groups != empty
By now I have no clue why you only see users in IdM with groups assigned in SU01... look up the SQL-table I mentioned if there are more users.
BR
Michael -
how do I get keyboard from white keys with black letters to black keys with white letters. This OS7 keyboard is very annoying to type with
Go to System Preferences > Universal Access > Seeing tab > Turn voiceover off.
Captfred -
My iCal used to default to one hour when I posted an event with a start time and no end time. The user guide says it will default to one hour. Since I started using OS Lion, my calendar doesn't do that. Can anyone suggest a way for me to get the calendar to default to one hour again? Thanks.
Dana,
Here are some iCal data entry tips from iCal Help:
Enter a name, date, and time duration for the event, and then press Return.
For example, you can enter “Super Bowl Party Feb 5,” “Movie with Rebecca on Friday at 7pm,” “Soccer Game on Saturday from 11am-1pm,” or “Breakfast with Jon,” and then press Return.
If you don’t enter a time duration for the event, iCal sets the event’s duration to 1 hour.
If you don’t enter any time information for the event, iCal makes the event an all-day event.
If you enter “breakfast” or “morning,” iCal sets the event to start at 9 a.m.
If you enter “lunch “ or “noon,” iCal sets the event to start at 12 p.m.
If you enter “dinner” or “night,” iCal sets the event to start at 8 p.m.
Maybe you are looking for
-
How do I script a listbox so multiple selections can be recognized?
I have a pdf project that lets the user make selections from a listbox, and then those selections determine which fields on the page are shown or hidden. I've made sure the listbox allows for multiple selections but I can't get the scripting to recog
-
How do I open a postscript file, like I open an excel file?
I'm trying to open a file that I saved as a .ps. I want to open it in the same maner as I open an excel file?
-
Converting AVI files to iPod M4V files?
I just purchased QTPro to convert AVI files to viewable files on my iPod nano. Is there a size limitation when converting these files. I was able to convert a smaller file and then import it to iTunes then to the iPod, but the larger file I really wa
-
ACS v4.2 for Windows multiple NICs?
Hi, I would like separate ACS traffics on 2 two separate NICs, one for front end AAA service related traffics, and another one for web, backup administrative traffic, is it possible? Leo
-
SQL task fails calling procedure but only change was adding an insert
Have a SQL task that calls a procedure. Works fine until I added a block of code that does an insert. Then I get an error such as this ssis procedure Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, paramet