- Shopping Bag ( 0 items )
This practical, hands-on guide begins by introducing GEF, Draw2D, and Zest, and demonstrating what can be achieved with them. ...
This practical, hands-on guide begins by introducing GEF, Draw2D, and Zest, and demonstrating what can be achieved with them. Next, the authors walk through building a simple Draw2D example, helping new GEF developers understand the core capabilities available to them. Building on this foundation, they progressively introduce more of the Draw2D frameworks, including Figures, Layout Managers, Connections, Layers, and Viewports. They present a chapter-length graph visualization project based on Zest, followed by detailed coverage of non-Draw2D portions of GEF.
The book’s final section walks step by step through developing a complete GEF editor. Each chapter focuses on a different aspect of the problem, and includes challenges, solutions, diagrams, screenshots, cookbook-style code examples, and more.
This book is organized to help developers solve immediate problems quickly, while also gaining in-depth knowledge for building advanced solutions. Relevant APIs are included in several chapters, making this an even more useful standalone reference.
The Eclipse Graphical Editing Framework (GEF)
is the best resource for all Java tool developers who want to construct sophisticated graphical editing products that integrate with Eclipse, for experienced Eclipse users who want to start creating their own graphical tools, and for anyone who wants to see what makes GEF tick.
Chapter 1: What Is GEF? 1
1.1 GEF Overview 1
1.2 GEF Example Applications 2
1.3 Summary 6
Chapter 2: A Simple Draw2D Example 7
2.1 Draw2D Installation 7
2.2 Draw2D Project 8
2.3 Draw2D Application 9
2.4 Draw2D View 15
2.5 Draw2D Events 17
2.6 Book Samples 20
2.7 Summary 20
Chapter 3: Draw2D Infrastructure 21
3.1 Architecture 21
3.2 Drawing 23
3.3 Processing Events 24
3.4 Summary 25
Chapter 4: Figures 27
4.1 IFigure 27
4.2 Common Figures 29
4.3 Custom Figures 33
4.4 Painting 37
4.5 Borders 42
4.6 Summary 53
Chapter 5: Layout Managers 55
5.1 List Constraints 55
5.2 Minimum, Maximum, and Preferred Size 56
5.3 Common Layout Managers 57
5.4 Using Layout Managers 63
5.5 Summary 67
Chapter 6: Connections 69
6.1 Common Anchors 70
6.2 Custom Anchors 72
6.3 Decorations 76
6.4 Routing Connections 80
6.5 Connection Labels 86
6.6 Summary 90
Chapter 7: Layers and Viewports 91
7.1 Layers 91
7.2 Scrolling 96
7.3 Coordinates 101
7.4 Scaling 104
7.5 Summary 112
Chapter 8: GEF Models 113
8.1 Genealogy Model 113
8.2 Populating the Diagram 116
8.3 Storing the Diagram 126
8.4 Summary 128
Chapter 9: Zest 129
9.1 Setup 129
9.2 GraphViewer 131
9.3 Content Provider 132
9.4 Presentation 137
9.5 Nested Content 156
9.6 Filters 157
9.7 Layout Algorithms 160
9.8 Summary 173
Chapter 10: GEF Plug-in Overview 175
10.1 MVC Architecture 176
10.2 EditPartViewer 178
10.3 Tools, Actions, Policies, Requests, and Commands 180
10.4 Summary 183
Chapter 11: GEF View 185
11.1 Setup 185
11.2 GEF Viewer 186
11.4 Connections 193
11.5 Summary 200
Chapter 12: GEF Editor 201
12.1 Setup 201
12.2 GenealogyGraphEditor 201
12.3 Selection 207
12.4 Summary 218
Chapter 13: Commands and Tools 219
13.1 Listening for Model Changes 219
13.2 Commands 226
13.3 EditPolicies 233
13.4 Global Edit Menu Actions 248
13.5 Palette and Tools 249
13.6 Summary 253
Posted April 30, 2014
Posted March 8, 2013
Posted March 7, 2013
For a moment, everyone stares in awe at the yawning hole that shows a clear, starry sky beyond. Then they pump their fists and scream delightedly.
"Woooooo-hoo!" Someone hollers, and the explosion is forgotten.
"Oh my God, did you see that?" I ask Jonah.
"Yeah. Just a lights show." He replies dismissively.
"No way! The bang, the smoke..." I look warily at the ceiling.
"I don't see any debris raining down or hear any gunshots. Do you?" He folds his arms.
I stare at him disbelievingly. "A chunk of ceiling just blew up!" I protest. "That was planned."
"Yeah, for the party. They probably opened a panel in the ceiling and shot off some fireworks to add excitement. No problem." Jonah shrugs.
"I guess... it was so perfect, though. So... exact." I frown at the gap again.
"Whatever. No one's hurt, no one's dead. Everything's cool. Don't turn this into some big thing."
I nod and look away from the damaged roof. Jonah puts a hand om my shoulder.
"Hey," he says. I turn to him, no longer in a carefree mood. "It's okay." He studies my face, then grasps my hand. "Let's get some fresh air." He leads me outside.
On the dark sidewalk, we stand side by side in silence. Street lights cast eerie beams on the asphalt, and the moon glows silver. Every glittering star is visible.
"Something's wrong." I say softly.
"Yeah." He agrees. I realize that he's still gripping my hand, and I'm thankful for the support.
"Why would that happen? It's pretty strange that something like that would happen on the night the Enders get back." Dread creeps into my mind. I scan the dark street and take a step closer to Jonah. I feel someone watching me. I glance over and catch Jonah's eyes on me. But no, that's not it... even when he turns away, I get the chilling feeling that someone's in the shadows of an alley, waiting to strike.
* * *
Jonah walked me home. I had insisted that he stay, for fear that whoever I had felt earlier would... well, I just can't let him go alone. He's my friend.
I pull him inside and shut the door quietly. I catch the gleam of big green eyes in the dark house, and a small figure moves toward me. Jonah stiffens.
"Hi, Pear." My nine-year-old sister, Lucy, whispers.
"Hey, Lucy." I reply, also in a whisper.
"Grandma's asleep. Who's that?" She shoots a curious look at Jonah.
"A friend. It... it's not safe outside tonight."
Her eyes widen in shock. "What happened?"
"Nothing. I just have a feeling that something's up."
Lucy nods, understanding. My sister and I have a connection of some sort. "I'll show your friend the guest room." She offers. Jonah follows her across the front room and into the guest room. A moment later, Lucy returns, and closes the door behind her.
"You go to sleep." I tell her gently. I ruffle her blond curls and hug her before heading to my room. I immediately grab my phone and switch it on. August and my friends Reagan, Melissa, and Jesse had all texted me. I set down my phone and hop into bed. Surely they can wait until tommorow...