building the springgraph flex component

22
Building the SpringGraph Flex Component Albert Guo [email protected]

Upload: guo-albert

Post on 19-May-2015

6.044 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Building The SpringGraph Flex Component

Building the SpringGraph Flex Component

Albert [email protected]

Page 2: Building The SpringGraph Flex Component

2

Pre-requisites What is SpringGraph Flex Component? Where to download SpringGraph? How to configure SpringGraph? SpringGraph Verification Write a simple example Reference

Agenda

Page 3: Building The SpringGraph Flex Component

3

Eclipse (Java EE)◦ http://www.eclipse.org/downloads/

Flex Builder 3.1 Plug-in for Eclipse◦ http://www.adobe.com/cfusion/entitlement/index.c

fm?e=flexbuilder3

SpringGraph◦ http://www.adobe.com/cfusion/exchange/index.cf

m?event=extensionDetail&extid=1048510

Pre-requisites

Page 4: Building The SpringGraph Flex Component

4

SpringGraph is a Adobe Flex 2.0 component that displays a set of items that are linked to each other. The component calculates the layout for the items using an organic-looking annealing algorithm based on the size and links of each item, and draws lines to represent the links

What is SpringGraph Flex Component?

Page 6: Building The SpringGraph Flex Component

6

How to configure SpringGraph?

Page 7: Building The SpringGraph Flex Component

7

How to configure SpringGraph?

Unzip springgraph.zip

Page 8: Building The SpringGraph Flex Component

8

How to configure SpringGraph? – cont.

Go to Flex Project's properties page in Eclipse

Click Flex Build Path

Page 9: Building The SpringGraph Flex Component

9

How to configure SpringGraph? – cont.

Go to Library Path path and click Add SWC

Page 10: Building The SpringGraph Flex Component

10

How to configure SpringGraph? – cont.

Click Browse button, and navigate to springgraph/SpringGraph_20061210/SpringGraph/bin, and find out the SpringGraph.swc file

Click OK Button

Page 11: Building The SpringGraph Flex Component

11

How to configure SpringGraph? – cont.

Click OK Button

Page 12: Building The SpringGraph Flex Component

12

SpringGraph Verification

Page 13: Building The SpringGraph Flex Component

13

SpringGraph Verification

Create a MXML application

Page 14: Building The SpringGraph Flex Component

14

SpringGraph Verification – cont.

Give it name, called SpringGraphTest

Click Finish

Page 15: Building The SpringGraph Flex Component

15

SpringGraph Verification – cont.

Add this namespace in <mx:Application> tag

Page 16: Building The SpringGraph Flex Component

16

SpringGraph Verification – cont.

If you can see SpringGraph tag in your editor, it means you had build SpringGraph into your Eclipse successfully.

Page 17: Building The SpringGraph Flex Component

17

Write a simple example

Page 18: Building The SpringGraph Flex Component

18

Write a simple example

Add this namespace in <mx:Application> tag

Call onLoad() function to load initial data

Page 19: Building The SpringGraph Flex Component

19

Write a simple example – cont.

prepare initial data

set up link between two nodes

Page 20: Building The SpringGraph Flex Component

20

Write a simple example – cont.

Configure SpringGraph-related parameters in <fc:SpringGraph> tag, and provide data into <mx:Label> tag

Page 21: Building The SpringGraph Flex Component

21

Write a simple example – cont.