Posts

Showing posts from October, 2012

GVD 2012 - Bird Watching Awareness

Image
Like last year I got involved in a GVD (Oracle Global Volunteer Days) project this time . This project was about taking out children to one of the largest park ( Sanjeevaiah Park ) in Hyderabad and make them aware of common Indian birds and facts about them. It was led by some of my colleges who are very passionate about birds and their conservation. The preparation had stared weeks before the event.  One of the remarkable achievement during the preparation was the beautiful booklet [ PDF ] which contains most of the common Indian birds with beautiful pictures. Sayantan Chatterjee did an excellent job designing the booklet and the professional quality photographs were contributed by some of our colleagues who are very good at photography. You have to look at those photos to appreciate.


Around 20 children from the NGO called "Desire society" participated in this event. They were divided into groups and each group was led by somebody who has knowledge about the birds and how to…

JUG Hyderabad talk by William Louth

Image
Last month JUG Hyderabad had a session by William Louth. He introduced a really new paradigm of optimizing JVM performance in his session with title "JVM Performance - Past, Present and Predicted". This session was hosted in Oracle India's Hyderabad development center. Not to forget that the snacks were sponsored by JUG leader Ravi Ravi Buddharaju and tea by me. Unfortunately like last time most of the people who RSVP'ed Yes were not professional enough let us know that they weren't coming. As a result some of the logistics effort went for a toss. Meetup.com has a option to mark "no shows" which ultimately effects the credibility of the person's RSVP, which can be used to decided if they should be allowed in the events where they are in wait list. Anyway I am thankful to all the attendees who too their time out and reached the venue in time. Looking forward to a growing JUG in Hyderabad. Last but not the least thanks a lot to William who came all th…

Handling Keyboard Sortcuts in JavaFx

A lot of times you need to to assign some functionality to some keyboard shortcut like F5 or Ctrl+R  in your application. It can be done as follows

[java]
scene.setOnKeyPressed(new EventHandler<KeyEvent>() {
public void handle(final KeyEvent keyEvent) {
if (keyEvent.getCode() == KeyCode.F5) {
System.out.println("F5 pressed");
//Stop letting it do anything else
keyEvent.consume();
}
}
});
[/java]

JavaFx also provides KeyCodeCombination API for handling multiple key events.

[java]
final KeyCombination keyComb1 = new KeyCodeCombination(KeyCode.R,
KeyCombination.CONTROL_DOWN);
scene.addEventHandler(KeyEvent.KEY_RELEASED, new EventHandler<KeyEvent>() {
@Override
public void handle(KeyEvent event) {
if (keyComb1.match(event)) {
System.out.println("Ctrl+R pressed");

}
}
});
[/java]