Automatically format and cleanup code every time you save « Ecli Eclipse has a wonderful feature that formats according to your coding standards. It handles things like indentation, where curly braces are placed, if blank lines should occur between field declaration and hundreds of other options. However, to invoke this formatting, you have to tell Eclipse to do this every time you’ve edited the code. You can do this using Ctrl+Shift+F but (1) you have to do that every time and (2) you have to remember to do it in the first place (and we all know how good developers are at remembering things). Eclipse sports a feature called Save Actions that makes formatting code easy. How to enable automatic formatting and cleanup By default automatic formatting and cleanup is disabled. Go to Window > Preferences > Java > Editor > Save Actions.Select Perform the selected actions on save.Select Format Source code. Here’s what the settings should look like. How does Eclipse “clean up” the code Add @Override and @Deprecated tags: Nice for compile-time checking.
GWT: Better Layouts Through Subclassing Here’s a way to handle your layouts a little differently in GWT. Let’s go beyond the canned tutorials that feature a single Panel layout and imagine the following structure. Here we are using a DockPanel as a top-level container, with various other panels embedded inside of it: It’s easy to imagine the contents of each embedded panel changing as a result of actions taken against widgets in other panels, but for purposes of this post, let’s just consider each sub-panel contains a static label. For the tabbed panel, we define two tabs. If you consider the way most tutorials and textbook examples are written, you might describe this layout with code like this: Looks messy, but functional. Due to the nature of GWT, our options for improvement are limited. Interesting, no? I won’t go through all of the subclasses which were required to make this example work, but here is enough code to give you a glimpse into what is going on. As you can see, there’s not much to it. Etcetera.
Créer une application iPhone et Android en ligne Is Android Poised To Overtake iPhone's Mobile Dominance? | Javal The first quarter of this year has been dominated by the mobile market - in particular the success of the iPad launch, even though no one has had the chance to use it yet, and Android positioning itself as a worthwhile competitor the Apple's mobile OS. Now it looks like Android is set to overtake the iPhone sooner rather than later, at least according to this mobile traffic graph from James Governor's blog. Android enthusiasts are bound to be excited about this and they're right to be. All the iPad hype has helped to fuel tablet sales too - a market that never quite found its feet before now. To me the most important thing isn't that Android overtakes iPhone, or vice versa. The future of our industry now looks totally different than the past. I would go as far as saying that now is the best time to be developing software.
Google Web Toolkit Feedback and corrections are welcomed! Email mark at ociweb dot com. Contents Introduction Who is using it? Installing Creating a New Project Implementing a New Project Internationalization Running Testing Deploying and Using Ant Formatting With CSS Widgets Containers Listeners/Adapters Server Calls Error Handling JavaScript from Java Client-side XML Processing Custom Widgets Creating Reusable Modules Resources Introduction GWT is a Java-based framework for creating Ajax web applications that makes writing web applications similar to writing Swing applications. The main benefits of using GWT over other web app. frameworks are: Client-side code is primarily written using a subset of Java. The client-side code is "compiled" into HTML and JavaScript. Internationalization of text is supported through two mechanisms. Server-side code can be written using practically any programming language. A benefit of the GWT approach is that web applications are easier to maintain. Who's Using It? Running top
Des scientifiques recréent des étoiles en laboratoire Pour former une étoile, l'Univers a besoin de temps. Trop de temps pour que le processus soit accessible dans sa globalité à l'observation des astrophysiciens. Pour contourner cette difficulté, ces derniers ont recours à des simulations informatiques. Et ils viennent tout juste de dévoiler la plus réaliste et la plus haute définition de toutes. Les étoiles se forment dans des nuages de gaz. Cette simulation, les astronomes l'ont très justement baptisée Starforge, pour Star Formation in Gaseous Environments. « La façon dont les étoiles se forment est une question centrale en astrophysique », explique Claude-André Faucher-Giguère, chercheur, dans un communiqué de l’université Northwestern. « C'est une question très difficile à explorer en raison de la gamme de processus physiques impliqués. Rappelons que former une étoile prend à l'Univers des dizaines de millions d'années. Comprendre la formation des étoiles, c’est un peu comprendre nos origines Intéressé par ce que vous venez de lire ?
Coups de fil, dossiers : le piège du travail à la maison Un homme travaille sur son canapé (Plutor/Flickr) Consulter ses e-mails après dîner, répondre aux appels pro le week-end ou préparer la réunion du lendemain... A quel moment finit la journée de travail ? Scott Schieman (sociologue à l’université de Toronto), Melissa Milkie, (université du Maryland) et Paul Glavin (université de Toronto) ont conduit une étude pour essayer de mesurer les intrusions de la vie professionnelle dans la sphère privée, demandant aux personnes interrogées à quelle fréquence ressentent-elles que leur travail interfère avec leur vie familiale ou avec leurs loisirs. Une discrimination « à l’envers » A la différence de la plupart des inégalités professionnelles, le travail à domicile touche plutôt les « biens lotis ». On pourrait penser que ceux qui ont plus de contrôle sur leur temps de travail parviennent plus facilement à ne pas se laisser envahir chez eux. Les travailleurs étrangers ou les jeunes semblent en revanche moins touchés par le phénomène. Et vous ?
GWT Yellow Fade Technique This is a quick example of a fading technique which notifies that a change or update in your GWT app has happened. Seems like every ajax site out there uses a technique similar to this to notify the user that something has happened. As I write this post, Google Docs flashes up a yellow “Saving…” box for a couple of seconds to let me know my document was automatically saved. In case the iframe doesn’t show up in your browser you can see and try the example here. First, let me explain how it’s all done. addStyleName(java.lang.String style)andremoveStyleName(java.lang.String style) The FadeObject class The YellowFadeHandler class My YellowFadeHandler class holds a List of these FadeObjects. and GWT in Practice ShareThis