6 Replies Latest reply: Oct 29, 2012 3:06 PM by KevinDavis RSS

    getters s/b non-destructive: re: getMainView

    KevinDavis
      Scratch a table into a relational design. Run this and watch it appear in the dialog and disappear from the Relational_1 panel. What's with that?
      var swingNames = JavaImporter();
      
      swingNames.importPackage(Packages.javax.swing);
      swingNames.importPackage(Packages.java.awt);
      swingNames.importPackage(Packages.java.awt.event);
      ...
      
      function resizeToTableNameOnly(o)
      {
          d = model.getDesign();
          rd = d.getRelationalDesign();
          mv = rd.getMainView();
          swingNames.JOptionPane.showMessageDialog(null, mv);
      }
        • 1. Re: getters s/b non-destructive: re: getMainView
          KevinDavis
          About
          -----

          Oracle SQL Developer Data Modeler 3.1.3.709
          Version 3.1.3.709
          Build 709
          Copyright © 2008, 2012 Oracle. All Rights Reserved.
          IDE Version: 11.1.1.4.37.59.48
          Product ID: oracle.datamodeler
          Product Version: 3.1.3.709

          Version
          -------

          Component     Version
          =========     =======
          Java(TM) Platform     1.6.0_34
          Oracle IDE     3.1.3.709
          Versioning Support     3.1.3.709
          • 2. Re: getters s/b non-destructive: re: getMainView
            KevinDavis
            Interestingly, Browser: Designs / Relational Models / Displays / New Display restores the image.
            • 3. Re: getters s/b non-destructive: re: getMainView
              Philip Stoyanov-Oracle
              JOptionPane is complex tool and I don't know what is going on to get that result.
              Interestingly, Browser: Designs / Relational Models / Displays / New Display restores the image.
              Using hide/show on relational model node restores the picture.
              BTW what are you trying to achieve? Function name resizeToTableNameOnly suggests something - if you want to resize tables to name only then there is no need of scripting.
              Create display, set details level to "names only" and then use "resize to visible" from diagram's context menu.

              Philip
              • 4. Re: getters s/b non-destructive: re: getMainView
                KevinDavis
                Thanks Philip,

                I did once know about resize to visible since I remarked upon its omission in: {message:id=10526849}. (For which there was no response -- I attempted to reproduce but for some reason my engineer from rel to log to mdd isn't working -- I'll punt for today).
                But my intent was beyond your recommended two-step -- I wanted all my table name only boxes to be the same size. In the short term I did accomplish this by editting the width and height values in the XML.

                -Kevin
                • 5. Re: getters s/b non-destructive: re: getMainView
                  Philip Stoyanov-Oracle
                  I wanted all my table name only boxes to be the same size
                  Kevin, here are steps you can use to set same size:
                  1) resize one table
                  2) select that table
                  3) zoom out to see all tables
                  4) press Shift-key and do a lasso at the same time to select all tables
                  5) use Edit menu to set equal height and width

                  If you have too much objects on diagram and especially too much lines it may take a while and probably you'll need to increase memory settings.

                  Philip
                  • 6. Re: getters s/b non-destructive: re: getMainView
                    KevinDavis
                    Philip,

                    This is a bit subtle but nonetheless appreciated. Maybe not so subtle for those GUI guys and gals who are more GUI clever than me. I guess that I fail to reach for power GUI approaches in SDDM when I realize that I can not even micro-adjust the position of a selected graphic using the arrow keys as is possible in Visio. (Sour grapes?).

                    Does failing to arrive at your GUI solution indicate that I have skipped some of the documentation and OLL material?

                    When time permits I'll likely revisit the scripting solution since it may well serve as a warm up exercise to the programmatic emplacement of note graphics adjoining table (or entity) graphics. A poor man's capability that could also serve as a basis for {thread:id=2242734}.

                    Thanks Philip-
                    -Kevin