user interface - Flex: How to create an entirely new component? -


I want to develop a network graph application for Flex - Imagine connecting with links by putting nodes on the canvas. Nodes should have editable text and other UI components.

I am trying to find examples of creating entirely new UI components from scratch, but whatever I can find, are trivial examples which are the current component: a red button that is a button Enhances, for example, or a combo box, from which to choose the state.

My main question is, Does the Action Script method define the drawing of a component? What is the Action Script equivalent of Java's Paint () method?

You want to create a component that overrides the UpdateDisplayList method, and make your drawing there:

  Override Protected Function UpdateDisplayList (Unsaleated Wideth: Number, Unsatellite White: Number): Zero {Super.Update DisplayList (Unsalted Wideth, Uncalyated High); // Drawing API component "Graphics" properties are found on graphics. clear (); Graphics.lineTo (0, Uncaleed Wideth); // etc}  

More information can be found here:


Comments