Dynamic Draw

I want to try display a relationship diagram.
I have the xml
<School>
     <Class>
          <Name>1st Grade</Name>
          <StudentName>A</StudentName>
          <StudentName>B</StudentName>
          <StudentName>C</StudentName>
          <StudentName>D</StudentName>
     </Class>
     <Class>
          <Name>2nd Grade</Name>
          <StudentName>E</StudentName>
          <StudentName>F</StudentName>
          <StudentName>G</StudentName>
          <StudentName>H</StudentName>
     <Class>
     <TeacherDetails>
          <Teacher>
               <Name>AAAA</Name>
               <Teaches>1st Grade</Teaches>
          <Teacher>
          <Teacher>
               <Name>BBBB</Name>
               <Teaches>1st Grade</Teaches>
               <Teaches>2nd Grade</Teaches>
          </Teacher>
     </TeacherDetails>
<School>
1. How can I draw it, also, since there is a dependency for the teacher, there needs to be a connectivity between the Class & Teacher also.
2. Is it possible to display them as icons and provide a tool tip which gives description, like the teacher icon would have teacher name and the grade she/he teaches?
Any help!!

Well this is what you have to do.
1. You have to define a protocole (a syntex) to define the tree in the text file (using text only format). This can be easily done with XML.
2. Then the you sould write a code that can build a model from that data. Basical a datastructure that represents a tree
3. Write an algorithm which can render the model in to html you will have to do lots of trial and error to get the best looking tree if you are not a HTML/CSS expert.
Make every node rendered in your html a hyperlink which links to the servlet which remove the node you will need an Id for every node to identify the node to be deleted (You can use the tree path to that node if the node names within a branch are unique).

Similar Messages

  • Convert my dynamic Drawing (created in a Flash Dialog using AS 3) into the .DXF and .DWG form

    Hi ,
    I want to convert my dynamic Drawing (that I created in a Flash Dialog using AS 3) into the .DXF and .DWG format.Is there any way by which I can give the export functionality on the flash page so that the dynamic drawing that created in flash code will export into .DXF and .DWG format.
    Please Help
    Thanks,
    Simon

    There's no automatic way to convert to AutoCAD formats... you will need to write your own. You will need to figure out the formats of .dxf and .dwg and then probably use ByteArray to output. It will not be a trivial task.
    Hi,
    Can you please give me some example for this?
    I have used AlivePDF to convert my Diagram to PDF but it create a Raster image in PDF and all vector data is lost.
    I want to convert this PDF to .dxf and .dwg format using any tool. but not found any way around.
    Thanks!!

  • Dynamic drawing on frames

    Hi,
    I would like to draw dynamically on displayed frames of a video. The program stops the video and lets the user draw. A previous "Draw on video" topic used an Effect to do this. Because the video is stopped, this won't work.
    Best would be using the setGlassPane() method. However, the heavyweight nature of JMF viewer prevents this from working (on Windows with performance pack). After much experimentation, I have abandoned this approach.
    Is there a way to get the current frame's contents and interact with the video frame just as you would with anything drawn in awt? Does the video frame have a Graphics object that is accessible? Can it be replaced with one that does?
    In the extreme case, I imagine the video going to an invisible buffer. This buffer is converted to an Image that displays. You can draw all over it. Then, the next frame is processed in a similar fashion. I can use standard methods to make the drawing dynamic.
    I will appreciate any insights and suggestions.
    Harry

    You can actually try using a lightweight component for your video by adding a line like this to your code:
    Manager.setHint(Manager.LIGHTWEIGHT_RENDERER, new Boolean(true));
    See http://java.sun.com/products/java-media/jmf/2.1.1/solutions/SwingJMF.html for all the cool details.
    Daniel Roth

  • How to create dynamic 'rack drawings' with Oracle forms

    Hallo, I work for a telecom company.
    We have used Oracle Forms and Reports from the beginning and we are now on version 10.2 but upgrading til 11.2.
    I got a request to make  'dynamic rack drawings' to display what equipment are located in what racks.
    The suggestion is to calculate coordinates(position, height) and send it to our GIS-system to do the dynamic drawing bit.
    The 'drawing' is just simple boxes with various height with a name in it to mark different types of equipment.
    So my question is... How should we draw these boxes dynamically to display our racks including the equipment installed there?
    Something like this With a header and a footer.
    1          XXXXXX-12                         1
    2                                                  2
    3         yyyyyy-32                          3
    4                                                  4
    5           zzzz-11                           5
    6                                                  6
    40                                               40

    I wouldn't do the drawing part in Forms. Luckily there are Java Beans available in Webforms which you could use to visualize your data in a more complex way.
    For more informations on Java Beans and how they are used in Forms google gives you a good impression
    https://www.google.at/search?q=oracle+forms+java+bean
    or if you are stuck don't hesitate to ask
    cheers

  • Cannot draw logarithmic graph in Plot Multi-XY vi

    Hello All,
    I'm trying to use the Plot Multi-XY vi in the picture controls to dynamically draw an X-Y grid on a picture control.  I need the grid to be logarithmically scaled, but when I check the "x log?" and "y log" booleans in the cartesian axis attributes to True, nothing at all shows up in the picture.  If I un-check those options, I get a nice linear grid.  Any help would be greatly appreciated!
    Thanks,
    Jason

    Hi Ravens Fan,
    Here's the VI (taken from an NI Example with just the Cartesian Axis Attributes added and the x and y logs turned to true.  If you switch them to false you get a nice graph, but when set to true nothing shows up at all.
    Thanks,
    Jason
    Attachments:
    XY Multi Plot Log.vi ‏15 KB

  • Dynamically generating workflow and relationship images to the Web

    Is there a good toolkit (open source maybe) out there that will allow me to dynamically draw images containing a workflow or show relationships? I only see packages that are geared for charts, I want to dynamically draw the dependency between 2 or more objects on the fly. To be able to do that I need to be able to draw rectangles (2 or 3d), lines with ends (as in Visio or something) and draw text in the box representing the entity name. I don't want to have to code all this myself using BufferedImage etc. Looking for a nice little toolkit.
    Thanks

    We really need to see what you're seeing.
    Can you post links to before and after?

  • Drawing brackets for a tournament

    Dear Fellow Java Developers:
    I am writing a program in Java that organizes tournaments for various sports. Part of the program is to receive input from an administrator and draw out the tournament with the teams paired up against each other and outlines the future results of the matches. This diagram is usually presented in the form of a bracket as follows:
    |___
    __| |
    |______
    __ |
    |___|
    __|           
    My question is, how would I use Java to dynamically draw such a diagram with the teams listed in the appropriate places??? The thing is, the diagram would be drawn depending on the number of teams entered. If four teams are in the tournament, then a diagram should be drawn to fit only four teams. If sixty four teams are entered, then the diagram should also be drawn to accommodate all of them as well. I am not asking for a full solution, but at least some direction as to how I should go about solving such a problem.
    Any and all help is greatly appreciated.
    Thanks in advance to all that reply.
    Sincerely;
    Fayyaz

    I sincerely apologize for accidentally posting this question twice. The diagram I posted was supposed to look like this
    |--
    Something to that effect. A better view of such a diagram is at the following link:
    http://www.finalfour.net/local/bkc_2003_bracket.gif
    Once again, sorry for the double post.
    Take care.
    Sincerely;
    Fayyaz

  • Dynamically-drawn MediaController

    Alright...there's a lot of background. I'll try to give all
    *pertinent* information. I'm dynamically drawing a MediaController
    component along with a few text areas, and telling it what mp3 to
    look at. It usually works, but there are cases when it doesn't
    work, and some of those cases where it also breaks the textArea
    component(s). However, upon drawing the exact same page again, it
    suddenly works. Is there any idea as to why this is and/or
    suggestions for a workaround? I'm trying to avoid having to force a
    double draw just to get to the draw that works.
    Also, in the same format, etc., dynamically drawing movie
    clips instead of a MediaControllerg and attaching jpg's always
    works, as does dynamically drawing an FLVPlayback component and
    handing it an FLV.

    store your draw points in an array and, when ready to color, use the drawGraphicsData method of the graphics class.

  • How Can I do to make an interactiv​e user interface?

    I have to make a virtual laboratory, with a oscilloscope, multimeter, function generator and power supply, i don´t know how can interconnect the different outputs of the devices, How can I draw for example a probe and put it in the function generator output if i want to show the output signal of the function generator?
    THANKSSSSSSSSSS

    Well, dynamically drawing objects on the screen isn't one of LabVIEW's strong suits, imho. I suppose you could put a picture control on the front panel and draw the connections but I would assume you also want the front panel to display the controls and indicators of the instruments as well. With the picture control on top, you can't directly click on the controls so you'd have to do a lot of work detecting mouse clicks, determining coordinates, and programtically activating controls. If you're willing to forgo the graphical look of wires connecting inputs and outputs, a table representation would be a lot easier to implement. One column could represent an instrument's output and another column would be an instrument's input. Have something like a "Create Connection" button that pops up a list of possibilities and let the user add and delete them. I have done graphical representation of matrix switches using lines from the decorations palette. The program changed the color of the lines as the user made desired connections. The instruments were represented as Booleans that the user had to click to configure and view results. If that sounds like it might work, let me know and I'll try and find the code I did. It was pretty tedious to do as well.

  • How to print background grey color in script output of header part

      Hi Experts,
             I had developed SAP SCRIPT, in that there are no. of line items based on line items the color should get change i.e suppose first line items rows should print grey while second  items  rows should not, third line items rows again should print grey and fourth should not...as on... with header cells will come background colour grey.Anyone can help me for this requirement.
        How we can color the rows in sap script.
    Thanks.

    Hi,
    From what I understand of SAPScript, it's next to impossible to dynamically draw lines in the MAIN window. I guess this also applies to grey backgrounds since you'd need to define the exact position of a box.
    Better use Smartforms or Adobe forms.
    If you find out how to achieve this, I'm interested to know how you do this :-)
    Good luck!
    Best regards,
    Zhou

  • How to print filename as header/footer for lots of PDF?

    I need to print a lot of PDF files that came from suppliers in order to file paper copies.   It would help immensely if I can print (whether from Preview, Adobe or even something I must buy) in such a manner that the filename always appears on the printed copy.   We're talking about a lever arch file, so going through them individually to create a new version of the PDF with the actual filename appearing in the PDF image is not really an option.
    I'm a little surprised that there isn't such an option in Preview (or Adobe for that matter).
    Would be much appreciated, thanks

    Hi,
    From what I understand of SAPScript, it's next to impossible to dynamically draw lines in the MAIN window. I guess this also applies to grey backgrounds since you'd need to define the exact position of a box.
    Better use Smartforms or Adobe forms.
    If you find out how to achieve this, I'm interested to know how you do this :-)
    Good luck!
    Best regards,
    Zhou

  • How to create scrolling graph from input values?

    Hi i'm new here, I'm trying to build a new concept for an interface inside an operating theatre - What I was trying to do (to start with) was make a line dynamically draw itself from a set of values (which I have in an excel spreadsheet) - gradually revealing itself over time like in the screens you see on medical drama's. How would I go about doing this?
    Thanks for your time,
    marksy
    PS Using CS4 if thats relevant

    Well first off you need to store your data somewhere, I suggest XML. Then you can use this data to draw a graph dynamically using the drawing api. To draw a single line you could do something like this.
    myClip.graphics.moveTo(0,0);
    myClip.graphics.lineTo(point1.x, point1.y);
    myClip.graphics.lineTo(point2.x, point2.y);
    To animate that you would simply need to interpolate a point that lies on the line connecting point1 and point2. Then you could ease your way to the end point (point2) and redraw the line at each frame. Its not very difficult to do once you are comfortable with the drawing api.

  • JTable to image?

    Hi all,
    I have an application that uses a JTable to display various data from our database. My problem is that I now need to display this same information via the web as an image. This is the requirement and no way around it. I didn't want to have to get into dynamically drawing everything using Java 2D, etc. So...Is there anyway that I can create the JTable from a Servlet and return the "image" in some format? I'm looking for a quick and simple approach. Any help would be greatly appreciated.
    Matt

    A component is not realized until you call either pack or setVisible on it.
    I've modified the demo to show this. Try it first with only the top and bottom buttons (ie,without the realize gui button) and next with the bottom two.
    Although the table will have a preferred size the component that will paint itself into the new BufferedImage does not yet exist so requests (in the saveComponentAsImage method) for its width and height return zero.
    If you replace the saveComponentAsImage method calls getWidth and getHeight with getPreferredSize().width and getPreferredSize().height you get a blank image, nobody home.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import java.net.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    public class TableToImage
        public static void main(String[] args)
            final JButton
                tableButton = new JButton("make table"),
                guiButton   = new JButton("realize gui"),
                saveButton  = new JButton("save");
            ActionListener l = new ActionListener()
                JTable table;
                public void actionPerformed(ActionEvent e)
                    JButton button = (JButton)e.getSource();
                    if(button == tableButton)
                        table = makeTable();
                    if(button == guiButton)
                        realizeGUI(table);
                    if(button == saveButton)
                        Dimension
                            size = table.getSize(),
                            preferredSize = table.getPreferredSize();
                        if(size.width == 0 || size.height == 0)
                            System.out.println("actual size: width = " + size.width + "\t" +
                                               "height = " + size.height + "\n" +
                                               "preferredSize: width = " +
                                                preferredSize.width + "\t" +
                                               "height = " + preferredSize.height);
                            return;             // avoid IllegalArgumentException
                        saveComponentAsImage(table);
            tableButton.addActionListener(l);
            guiButton.addActionListener(l);
            saveButton.addActionListener(l);
            JPanel northPanel = new JPanel();
            northPanel.add(tableButton);
            JPanel panel = new JPanel();
            panel.add(guiButton);
            JPanel southPanel = new JPanel();
            southPanel.add(saveButton);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(northPanel, "North");
            f.getContentPane().add(panel);
            f.getContentPane().add(southPanel, "South");
            f.setSize(200,140);
            f.setLocation(200,200);
            f.setVisible(true);
        private static JTable makeTable()
            int rows = 24, columns = 5;
            String[] headers = new String[columns];
            for(int i = 0; i < headers.length; i++)
                headers[i] = "header " + (i + 1);
            String[][] data = new String[rows][columns];
            for(int i = 0; i < rows; i++)
                for(int j = 0; j < columns; j++)
                    data[i][j] = "item " + (i*columns + j + 1);
            JTable table = new JTable(data, headers);
            return table;
        private static void realizeGUI(JTable table)
            JFrame f = new JFrame();
            f.getContentPane().add(table);
            f.pack();
            f.dispose();
        private static void saveComponentAsImage(Component c)
            int w = c.getWidth();
            int h = c.getHeight();
            BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
            Graphics2D g2 = image.createGraphics();
            c.paint(g2);
            g2.dispose();
            try
                ImageIO.write(image, "png", new File("tableImage.png"));
            catch(IOException ioe)
                System.out.println(ioe.getMessage());
    }

  • Help diagnose a blocked site

    Hi.
    I'm trying to put a weather widget on our intranet site and for people in our "Restricted Internet" group we have a URL category list called "Allowed Domains".  Basically I put the domain in .accuweather.com and I still cannot get this widget to load for a test user in the ldap group "Restricted Internet".
    So the next step I did was go to Web Tracking and look up the user name, website and blocked for the transaction type.  For some reason there are two results which contradict each other.
    In the Disposition column it says Block - AVC, however in the Website column it correctly shows URL CATEGORY: Allowed Domains.  This is a contradiction because if it is an "allowed domain" it should not be blocked.  Any idea why this site would possibly be blocked?  I did have the weather.com widget on our intranet site and that worked fine, however the accuweather widget shows a little more information.
    Here is a clip from the Website column in Web Tracking:
    http://netwx.accuweather.com/netWx-V212.swf?zipcode=19464&customtheme=&theme=blue&metric=0&target=_self&lang=eng&url=&video=&category=&logo=1&tStyle=whteYell&partner=netweather&myspace=0
    (3)
    CONTENT TYPE: application/x-shockwave-flash
    URL CATEGORY: Allowed Domains
    DESTINATION IP: 207.242.93.89
    DETAILS: Restricted_Internet "Access". WBRS: 5.3.
    RELATED TRANSACTIONShttp://vortex.accuweather.com/adc2010/images/animated-overlays/cloudy.swfhttp://vortex.accuweather.com/adc2010/images/animated-overlays/cloudy.swf
    http://netwx.accuweather.com/netWx-V212.swf?zipcode=19464&customtheme=&theme=blue&metric=0&target=_self&lang=eng&url=&video=&category=&logo=1&tStyle=whteYell&partner=netweather&myspace=0
    CONTENT TYPE: application/x-shockwave-flash
    URL CATEGORY: Allowed Domains
    DESTINATION IP: 207.242.93.89
    DETAILS: Restricted_Internet "Access". WBRS: 5.3.

    Good call on the Flash Video.
    I SSH to the Ironport and played around with grep.  Found this, which looks to be flash video.  Oddly I didn't even think of it as flash video, as myself (in the very unrestricted IT group) can see the weather widget and there's obviously no video.  However one of the pages calls an swf from another server... it must be the way they dynamically draw the sun or clouds in the forcast.
    test@Windows
    " DIRECT/netwx.accuweather.com application/x-shock                                                                             wave-flash BLOCK_AVC_11-Restricted_Internet-Authenticated_Users-NONE-NONE-NONE-D                                                                             efaultGroup ","-","Flash Video","Media","-","-",144.43,0,-,"-","-"> -
    1308254622.019 307 10.1.3.126 TCP_DENIED/403 5344 GET
    http://netwx.accuweather.c
                                                                                 om/netWx-V212.swf?zipcode=19464&customtheme=&theme=blue&metric=0&target=_self&la                                                                             ng=eng&url=&video=&category=&logo=1&tStyle=whteYell&partner=netweather&myspace=0                                                                              "DIAMONDCU\test@Windows" DIRECT/netwx.accuweather.com application/x-shock                                                                             wave-flash BLOCK_AVC_11-Restricted_Internet-Authenticated_Users-NONE-NONE-NONE-D                                                                             efaultGroup -

  • Swf integration

    The problem.
    I am using actionscript 3 to pull swfs into a main fla.  For some reason when I do this it causes the animation in the main fla to loop continually.  I've tried resolving this issue for two weeks now and time is running out.  Because of the sensitivity of this project, I can not post it for download.  If someone wants to help me with this you may send your email address to [email protected] and I will forward you the files.  Please title the subject line. Actionscript 3 resolution. Thank you in advance.

    Rob,
       Thanks for that suggestion.  After looking at the error report I discovered that a closing bracket was missing.  The swfs are being imported correctly without the looping.  HOWEVER, my new issues are; I have a song playing when the main movie plays. The bottom section is for the holder that is dynamically drawing the external swfs in.  The first one is a video(managers) which automatically plays and when you click to remove that swf and play another it does but the sound from the video(managers) continues to play until the end. And if you click the managers button again it plays another instance of the video.  Therefore the issues which need to be resolved are 1.> Get the song to fade out (stop) when the video plays. 2.> Stop the video from automatically playing until button is clicked and make it so that if you clicked the managers button again while the video is playing that it doesn't play another instance of the video.  3.> when a different button is clicked to play another swf make the sound from the video of the first swf stop as well.  I understand this is a tall order.  Any help or pointing me in the direction of a solution will be greatly appreciated.   Here is the complete code.
    var audio:Sound = new Sound();
    var req:URLRequest = new URLRequest("American Pie.mp3");
    audio.load(req);
    audio.play();
    //var channel:SoundChannel= new SoundChannel();
    //URL of the external image content
    var myRequest:URLRequest=new URLRequest("displacement.swf");
    //Create a new Loader to load the image
    var loader:Loader = new Loader()
    //Load the external image into the Loader
    loader.load(myRequest)
    // Listen when the loading of image is completed
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE,loadTheImage);
    function loadTheImage(evt:Event):void {
    //Display the Loader on the MainTimeline
    Placed empty MovieClip "holder_mc" on stage
    holder_mc.addChild(loader)
    //This is the video and swfs I want to be on top of everything
    var Xpos:Number = 872;
    var Ypos:Number = 128;
    var swf:MovieClip;
    var lLoader:Loader = new Loader();
    var defaultSWF:URLRequest = new URLRequest("swfs/managers.swf");
    lLoader.load(defaultSWF);
    lLoader.x = Xpos;
    lLoader.y = Ypos;
    addChild(lLoader);
    // Btns Universal function
    function btnClick(event:MouseEvent):void {
    removeChild(lLoader);
    var newSWFRequest:URLRequest = new URLRequest("swfs/" + event.target.name + ".swf");
    lLoader.load(newSWFRequest);
    lLoader.x = Xpos;
        lLoader.y = Ypos;
    addChild(lLoader);
    // Btn listeners
    managers.addEventListener(MouseEvent.CLICK, btnClick);
    stingray.addEventListener(MouseEvent.CLICK, btnClick);
    demon.addEventListener(MouseEvent.CLICK, btnClick);
    strongman.addEventListener(MouseEvent.CLICK, btnClick);

Maybe you are looking for

  • After update to iOS 7.0.2 my ipad can`t recognice my tv screen

    after update to iOS 7.0.2 my ipad can`t recognice my tv screen it did before when i used netflix, only netflix logo and the sound from the movie is present i used it true a HDMI cabel from ipad to tv set

  • Custom envelope for sound not working? Flash CS5

    I'm trying to set a custom envelope for a sound in Flash CS5. I can bring up the envelope editor fine. But, I find that all the control points are after the end of the sound itself. If I click on the waveform to create a new control point, the point

  • Moving files from Applications turns them into aliases

    Hello, I am running OS X 10.7.4 I'm having an issue where if I try to move any files out of my applications folders they do not truly remove from the application folder and just show up as an alias. I'm going through a game patch load right now and s

  • Can we join external Excel file with data to an existing report in BIP

    Hi, I have created a report in BIP and the output being previewed is in Excel. ex : i'm trying to get emp_id , emp_name, emp_Address from a datasource called "EMPLOYEE_DEV". Now i have an external excel file (which has data) containg emp_job_title, e

  • Bb 9320 showing error 102 on updating

    hi mu phone shows the following errors  when i took the event log  verifyHash1 failed for net_rim_bb_medialoader_toolkit_320x240_Armstrong_01-65(4467) : hash (codfile)0 40 5a e9 59 ff f3 b8 76 ac 1d 28 69 28 a2 ed d5 8b 7b 57 fb : hash (mod_info)1 41