Thông tin tài liệu
Covers JavaFX v1.2 IN ACTION Simon Morris MANNING JavaFX in Action Licensed to JEROME RAYMOND Licensed to JEROME RAYMOND JavaFX in Action SIMON MORRIS MANNING Greenwich (74° w long.) Licensed to JEROME RAYMOND For online information and ordering of this and other Manning books, please visit www.manning.com The publisher offers discounts on this book when ordered in quantity For more information, please contact Special Sales Department Manning Publications Co Sound View Court 3B Greenwich, CT 06830 email: orders@manning.com ©2010 by Manning Publications Co All rights reserved No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15% recycled and processed without the use of elemental chlorine Manning Publications Co Sound View Court 3B Greenwich, CT 06830 Development Editor: Copyeditor: Proofreader: Typesetter: Cover designer: Tom Cirtin Linda Recktenwald Elizabeth Martin Gordan Salinovic Leslie Haimes ISBN 978-1-933988-99-3 Printed in the United States of America 10 – MAL – 14 13 12 11 10 09 Licensed to JEROME RAYMOND To my father, the coolest folk singer this side of the Mersey (Be honest, Dad, if you’d known how obsessed I was going to get, would you have agreed to buy my first computer?) Licensed to JEROME RAYMOND Licensed to JEROME RAYMOND contents preface xiii acknowledgments xv about this book xvii about the title xxi about the cover illustration xxii Welcome to the future: introducing JavaFX 1.1 Introducing JavaFX Why we need JavaFX Script? The power of a DSL Back to the future: the rise of the cloud Form follows function: the fall and rebirth of desktop Java ■ ■ 1.2 1.3 1.4 Minimum effort, maximum impact: a quick shot of JavaFX Comparing Java and JavaFX Script: “Hello JavaFX!” 10 Comparing JavaFX with Adobe AIR, GWT, and Silverlight 11 Adobe AIR and Flex 11 Google Web Toolkit 11 Silverlight 12 And by comparison, JavaFX 12 ■ ■ 1.5 1.6 But why should I buy this book? Summary 13 12 vii Licensed to JEROME RAYMOND ■ Microsoft viii CONTENTS JavaFX Script data and variables 15 2.1 2.2 Annotating code with comments Data types 17 16 Static, not dynamic, types 17 Value type declaration 17 Initialize-only and reassignable variables (var, def) 20 Arithmetic on value types (+, -, etc.) 21 Logic operators (and, or, not, , =, >=,
Ngày đăng: 10/04/2017, 10:48
Xem thêm: JavaFX in actions , JavaFX in actions , 2 Minimum effort, maximum impact: a quick shot of JavaFX, 4 Comparing JavaFX with Adobe AIR, GWT, and Silverlight, 4 Durations, using time literals, 7 Trapping problems using exceptions (try, catch, any, finally), 5 Bonus: using bind to validate forms, 4 Lost in translation? Positioning nodes in the scene graph, 1 Taking control: Video Player, version 1, 2 Making the list: Video Player, version 2, 3 Bonus: taking control of fonts, 3 Bonus: creating a styled UI control in JavaFX, 1 Our project: a Flickr image viewer, 4 Size matters: node bounds in different contexts, 2 Programmer/designer workflow: Enigma machine, version 1, 3 More cryptic: Enigma machine, version 2, 5 Bonus: Building the UI in an art tool, 1 Amazing games: a retro 3D puzzle, 3 On the move: desktop to mobile in a single bound, B.13 Exceptions (try, catch, any, finally), D.3 Release versions: a rose by any other name