Outline Hourglass structure

I have a database that was created without following the usual standard outline order (not by me!!). This particular database sas Dense, Sparse, Dense, sparse, sparse,sparse, sparse.
Now i have seen some strange behaviour on the database, for instance:
1. After forcing a dense restructure, the PAG files actually increased in size instead of declining. Though eventually after forcing another dense restructure, the database size went down as expected.
2. A particular calc script can take 20 minutes to run now, but can also take 1 hour, etc, without a change in data.
Has anyone ever come across this? I have a suspicion this unorthodox outline order could be the problem, but just want to here if anyone else seconds my opinion?
Thanks
JT

Is the mixing of Dense / Sparse dimensions what you are calling 'non-standard'?
I'm going to go out on a limb and say that although the convention is for Dense dimensions to appear first I don't believe that intermixing Dense / Sparse dimensions makes any difference. The order in which the Dense dimensions appear, and the order in which the Sparse dimensions appear will.

Similar Messages

  • Can't see folder structure when PDF folder in Lotus notes

    Hi All,
    We are using Lotus Notes 8.5 with Adobe Acrobat Professional 9.  In the Lotus Notes client, this one user clicks on the "Convert Selected folders to PDF', and a box comes up asking her to select the folders she wants to convert.
    The problem we run into is that you cannnot see the folder structure in the box.  You only see the dots and boxes that outline the structure. This is inside her FOLDERS folder.  I uploaded a picture. Hopefully you can see it.
    Thanks!

    Have you tried recreating the site definition in Dreamweaver? Sometimes stuff happens and the Dreamweaver site definition gets corrupted - and then all sorts of stuff can go wonky (like folders not showing up correctly).

  • Re: Tree Lines on an Outline Field

    Actually, you can use the outline field in Forte R2 to mimic what you're
    trying to do. True tree and list-view widgets are fully supported (quite
    nicely, btw) in R3.
    Basically, set up your subclass of displayNode to have an image data
    attribute that is displayed on the widget. Then, create a few stock
    tree-like bitmaps (like a vertical line, a vertical line with a horizontal
    line, etc.). As the user expands and contracts the nodes in the outline
    view, dynamically change the bimtap accordingly.
    Hope this helps...
    -Katie
    Does anyone know if Forte can put the tree/branch lines on the hierarchical
    structure of an outline field? I can get the outline/hierarchical structure
    to display and work fine, but without the lines showing how nodes relate,
    its hard to read.
    Thanks.Wait for Release 3.

    Does anyone know if Forte can put the tree/branch lines on the hierarchical
    structure of an outline field? I can get the outline/hierarchical structure
    to display and work fine, but without the lines showing how nodes relate,
    its hard to read.
    Thanks.Wait for Release 3.
    Fred Scholldorf
    Email: [email protected]
    ===

  • Tree Lines on an Outline Field

    Does anyone know if Forte can put the tree/branch lines on the hierarchical
    structure of an outline field? I can get the outline/hierarchical structure
    to display and work fine, but without the lines showing how nodes relate,
    its hard to read.
    Thanks.

    Does anyone know if Forte can put the tree/branch lines on the hierarchical
    structure of an outline field? I can get the outline/hierarchical structure
    to display and work fine, but without the lines showing how nodes relate,
    its hard to read.
    Thanks.Wait for Release 3.
    Fred Scholldorf
    Email: [email protected]
    ===

  • Batch creation of bookmarks (Windows)

    There is another thread on this for Apple users, one year old, but without an asnwer (except for something in the line of "not possible"), so:
    I have got several hundred pages in tree structure, from a 2-pane "outliner"; technically, I'm able to have coded the items in the "tree" (= titles) by their respective "indentation", so if there is item1 with 0 tree indentation, I could automate putting some "$0" before that line, and similar for any other titles, "$1", "$2" and so on, or any other coding.
    Also, I am able to export the whole formatted text body, from the outliner to various formats, e.g. in html coding, and then it would be possible to import them into InDesign, and then, from InDesin into Acrobat: Here, the tree structure would not be just a text file with several hundred lines, but there would be a structure like
    title line or $3title line
    then many lines of text body
    $2title line
    and again many lines of text body
    and so on
    which means it would be possible to "code" these title lines, separating the multiple "pages" (= items which then are bound to become pages within Acrobat/Pdf), in order to process them.
    Do you have any "tips and tricks" to facilitate this, sparing me 15 hours of trial-and-error?
    Is it necessary to include InDesign in this workflow, or are there scripts available that would enable Acrobat to "fetch" such coding from the text file?
    Or then, in MS Word, what would to be done there in order for Acrobat to be able to process the Word file in a way that it (Acrobat) automatically rebuilt the tree structure?
    I suppose my outliner codes could be transposed into respective headings within Word, but afterwards, Acrobat does NOT recognize those Word headings of different levels as Pdf "bookmarks"? So there would be the need to put "bookmarks" behind all Word title lines, by some Word macro?
    And then, in Acrobat, those bookmarks would NOT be of multiple indentation levels (= no tree structure yet), but I would have a FLAT LIST there, to begin with, and from which then I would have to indent those bookmarks manually, one by one?
    Alternative question: From my outliner, I am able to export the whole stuff into multiple other outliners; so the question arises if there is one outliner format, or one special export format from one outliner, that could be (more) easily processed further?
    In the end, I have a tree structure within the outliner (and which, as said, could be exported separately, too, in order to be processed by macros/scripts), AND I want the same tree structure in the Pdf again, so there should be some way to straigthen this out?
    Is there any documentation about Acrobat "scripting" or such, in order to prepare the necessary codes which then would be "readable" by Acrobat?
    In the end, it seems to me that technically, Acrobat does NOT build up a real tree structure but for the navigation, but all those pages (all referenced by bookmarks) are processed as a flat list there. So the only "remaining" problem seems to be, how to "import" / replicate the outliner tree structure, and only that (= several hundred lines, without the text body), into the respective Acrobat navigation pane, and to have "outgoing" bookmarks there which reference the respective "incoming" bookmarks in those several hundred respective "pages" - this should be possible to automate in an earlier stage, by inserting the respective codes, in the tree file, and in the text body file.
    For an example, the freeware TreePad-to-Pdf is able to create, from your TreePad tree, a respective Pdf tree, so, in theory, if you get your stuff into TreePad (which is very often possible and even easy, since the TreePad format is a common "exchange" format in the outliner "world"), you'll get it into pdf, as was your original tree.
    Unfortunately, this freeware does loose any pictures (if you don't have many pictures in your brochure, you could re-insert them after building the Pdf tree, of course), and does loose any text formatting, which of course is totally unacceptable (and there is not any paid version of this tool that would not) - but this tool "proves", if such proof was necessary, that it's perfectly possible to replace the "tree coding" of your outliner with an according, automatic bookmarks creation for Acrobat/Pdf (note that in this example, Acrobat was not even necessary, I just opened the file then within Acrobat in order to see which way I could then process it further).
    Thus my question, how are these "codes for creating pdf bookmarks, both ways (outgoing from tree, ingoing into the "pages")" available, in order to try to make Acrobat then import e.g. a html file in which these codes would have been put beforehand (and in which text formatting would be coded by html codes, that then hopefully would properly be processed by Acrobat on import)?
    Perhaps an export of the outline to MS Word is necessary, then Acrobat PDFMaker will translate the different heading levels in Word into a respective tree structure within Acrobat; this is technically feasible. But I am looking out for a less cumbersome solution, something more straightforward.

    Thank you all so much for your kind and highly constructive help, which is extremely useful for me!
    Sabian, the term "Windows" is in the title, and under the title, I mentioned "System: Windows". But it has been with utmost interest that I followed your link; in the meantime, I had search for "InDesign add-on/add-in", but it didn't occur to me that for Acrobat, searching for add-ins/ons would also bring some results! Even on that very same page, there are lots of (paid) add-ins/ons, but if you recurrently have a standard problem some 200$ software can resolve, that might not be too expensive. So I'm very thankful for this new and brilliant idea to trial out Acrobat add-ins.
    Bill and Gilad D, thank you very much for the info and the link (I'll look further for other links, too, now) - of course, it's a little bit frightening that the SDK API reference has got almost 800 pages, but that only shows how much is possible (when in fact with "naked" Acrobat Prof. I got the impression that "almost nothing" is possible!). I don't know JavaScript up to now, but I know some other scripting languages, and JS is so important today that this is a very good "occasion" to finally "learn" at least some of JS, and I will do this... which will probably lessen my need for paid add-ins... ;-) So I'm very thankful for this info how to "script" Acrobat. (Please excuse my "laziness" (or in fact, not having got the idea, to begin with!) to not google for "Acrobat scripting" before stupidly asking!)
    LoriAUC, you said, "you might try first tagging your PDF file". From what I see, and from help/web, it seems this automatic tagging of the whole document will not only tag pages, but many other elements, too, which means that afterwards, I'll have to eliminate, by hand, hundreds if unwanted tags, since I just want the several hundred pages to be tagged (= bookmarked, then), but not paragraphs, sub-titles and so on. But as I said, I always have the idea in my head to insert special characters into the outliner output file, which then would appear in the pdf, and then tagging just these special characters (and then deleting them) would be an idea for scripting at least; as said, what Acrobat can do "on its own", from the controls it offers to the user, is not that much. But thank you so much for your idea! (Of course, if after automatic tagging, there was a command available to "delete all tags except for the page tags", this idea would become highly useful in real life, too!)
    In fact, I have got that problem that from my outliner, html export (and text export) is flawless, but rtf export is unreliable (it leaves out text passages and doubles others, which it does neither in text nor in html export, I checked several times (and several such files) with a text compare tool), which means that the usual workflow Word (or in my case, import into Word), then do some tweaking there, then have things already done (or facilitated in Acrobat) when the file gets into Acrobat, would not be that smart in my case, since html import in Word is not that reliable either, and there are some paid "translation" tools for this task which perhaps don't preserve the formatting in any instance, or such things, and I simply cannot check visually every some weeks, for the same text body of several hundred pages, with just some pages added or altered or placed in other positions within that text body.
    I also must say that the non-display of the item that is selected in the tree, and the necessary pressing of "Enter" to do this, as well as the absence of a keyboard shortkey for switching between tree and content, and vice versa, are both BIG FLAWS in pdf for screen use, and I think it's unacceptable that Adobe never did anything to overcome these flaws - we're speaking of version 11 of some ubiquitous software here!
    So at this time, I'm also looking out for html possibilities (which also permit 2-column text, as pdf does), and especially for so-called "treeview controls", which are available free and paid, and as I see, here I have similar problem with "Enter" (or the mouse) needed to display content, but here at least, I suppose I could program (after finding and learning the respective commands that is) that "wait for 0.3 sec if user further navigates, but when he stops navigating, show content of current item" command, since within html, and especially with JS, many such things are possible from what I know.
    Similarly for the switching between tree and content: JS must be running anyway, for the tree control, so it's possible to assign, in JS, key commands for things that on regular websites necessitate the mouse.
    Btw, I briefly considered this for pdf, after reading Acrobat scripting was done by JS - but then, it seems that there is no way to have a JS script running on a pdf, IN RUNTIME - or then, most users' system would warn "there is a JS script launched by this pdf, do you want it really to run?" And of course, people would negate this question, and problably close down the pdf immediately - whilst some JS in html code is widely accepted, right?
    So I'm evaluating pdf against its "competitors" here, and I conclude pdf for SCREEN use is far from being as good as it could be - or do I overlook tweaking possibilies?
    Then, from html (with css and JS), I would prefer to have exported that into Flash, in order to have some protection at least for my content - on the other hand, good screen "rendering", good screen "visuals", are more important to me than is text protection (so here again, pdf "looses" in comparison even to html).
    So at this point in time, I don't know yet what I will do, but I'll begin with learning JS basics, and then will check this 800-pages document for what would really be possible with Acrobat, before taking a possible decision against it.
    This being said, any additional info, hint, idea, consideration would be more than welcome, but as said, I'm very thankful to all of you for your kind help and interest in this matter!

  • VBS:How can i determine the last row of an excel-sheet

    I want to replace the chn-comments of an datafile. I pick up the chn-names and want to compare them with an excel-file and so get from the excel-file the right chn-comment and store int back in the datafile. my problem is how can i determine where the excelfile-row is on the end to load the loopounter with corr values.
    i know one solution via scan on ascii 13 and 9.but bether is to know immediately the length of the column.
    answers also in german possible.

    Peter,
    Are you using DIAdem's Excel Import Wizard? By "Excel file" do you mean a tab- or comma-delimited ASCII file that Excel can read in easily, or do you mean a file with the extension "*.xls"? You certainly could not search through an *.xls file to find CR/LF characters.
    If you use the ASCII or Excel Import Wizard to create an *.STP file for the "Excel" file in question, then after the *.STP file is loaded you have access to a whole range of variables, starting with Ascii... or Excel... which completely outline the structure of the ASCII or Excel file, including things like the row in which the channel comments are, etc.
    Why don't you send over your Excel file and I'll be able to help you a lot better.
    Regards,
    Brad Turpin
    NI

  • Help me with this code please

    Hello,
    This is the first program that I have attempted to write alone....and I am stuck. I am trying to acquire data from a scope. I want the vi to only load the scope setup the first time the code is executed. Once the setup has been loaded I just want the vi to reinitialize the scope in order to acquire more data. I have tried first call, case structures, ...everything I can think of, but when I continuously run the vi, it still loops and reloads the setup each time. I have attached a picture of the vi code and outlined the area of code in question. The outlined case structure is programmed to initialize the scope to open communications, then clear any existing data, then recall a specific scope setup on true. On false, I only want this setting of code to initialize communications with the scope again without recalling the setup. Can a professional please explain how I am supposed to accomplish this. Thank you
    Solved!
    Go to Solution.
    Attachments:
    Code.jpg ‏69 KB

    If you use CONTINUOUSLY RUN to keep something running, you are in effect pushing the RUN button every time it stops, so the FIRST RUN function will return TRUE every time.
    There are ways to do exactly what you ask, but you're better off looking at the heart of your issue:
    You need a loop.
    Put a WHILE loop around the part you want to do repeatedly.
    Create a STOP button to stop the loop.
    Do your once-only INIT stuff outside the loop, and make sure the INIT part passes something into the WHILE loop 
    (to make sure the loop doesn't start until after INIT).
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

  • Integration between HPCM and Hyperion Planning 11

    Dear All,
    How to integrate HPCM and Planning? Any adapter is availiable or Using BRs rules we have to integrate with HPCM.
    Please guide me in this situation.
    Thanks,
    PC

    Dear user756331/John/All,
    Thanks a lot for the up to date information. I shall definitely go through the new feature and user guide.
    I still have some queries as Iam a new bee in Integration as well:
    1. The creation of relational tables (during application creation) - does that mean the integration to any ERP source is easier because now ERP tables and Hyperion tables can talk to each other rather than integrating it via Essbase outline load structure?
    2. ERPI tool will automate the integration process with less dependency on ODI Expert?
    3. Will the account dimension outline load members will be stored as a relational table to integrate with ERP CoA?
    4. Do we have any visionary enhancements in HFM as well?
    Thanks
    Swami

  • Calc Churning on Flat Hierarchies

    Outline hourglass shape with 7 dims - 4 sparse dimensions. Three of these dimensions are very flat - 3,000, 8,000, and 13,000 members in these of which thousands of member may rollup to a parent node.CALC DIM on largest sparse member completed in 1 hour. CALC DIM on 2nd dimension caused Essbase to churn for over 24 hours before I killed it. UsedSET CACHE HIGH; - default settingsSET CALCHASHTBL ON; 100MB allocated for hash table in essbase.cfg.If I add additional levels to bring # of children per parent < 400, calc completed in 11 hrs. 50,000,000 upper level blocks created - 32GB cube. I was interested to see how many upper level blocks were created for these manufactured blocks. Doing this also makes cube more difficult for end users. Any suggestions?

    HiIt is best if possible to keep the children of a saprse dimension to 100 members or less. This is not always possible. Is the level of detail you are storing required?Just some info...

  • Any way to export an outline, preserving its hierarchical structure?

    In an AppleWorks word processing document, outline labels seem to be stored separately from the text.  When I "Save As" text, the result does not contain either labels or indentation.  Similarly, Edit/Copy copies the text without the labels.  Is there any way to transfer an outline from AppleWorks to Word or OpenOffice.org?

    Hello,
    fosnola wrote:
    >  Thank Wilmut,
    > I have just retrieved it.
    >
    > I see that there remains many things to code which is not too surprising as actually the
    > code supposes that a drawing file only contains one page and it does not really retrieve
    > other position if the different elements which can appear in the same group :-~
    a small message, just to give some little news. I have done some improvement in this code and the result of this file's conversion can be found in http://www.loria.fr/~alonso/tmp/vid.odt . But do not expect that all conversions will be <<so good>>, ie. there remains some problems in this code which can make many conversions very bad :-~
    Note:
    as I begin to understand how the main content of a spreadsheet/database are stored and can be retrieved, I try to create a small tool to retrieve this data and convert them in CSV. It may fail on some files (I have only a few files to test) and/or may fail to retrieve some data ; if somebody want to test it (and report problems) , it can be found in  http://sourceforge.net/projects/libmwaw/files/ ( mwawCVSOSX.zip ).

  • Problem with retrieve - wrong outline structure?

    Hi all,
    I use essbase 11.1.2.
    I have a Cube with a dimension "Employee" (10000 member) and a dimension "CostCenter" (1700 member).
    They all have a measure value of 1.
    When i make a drill down on Employee i get a list of 10 k entries. When i do an additional drill down on cost center i get essbase error message 1020051: Limit of 250000 used rows is passed. I can't understand why. i have supress zero rows and columns on.
    and every customer only has a value in only one cost center (1:1). --> it should be still 10 k rows after the second drill down.
    Why does essbase mean it needs more than 250000 rows?
    I hope someone can help
    thank you ,
    best regards
    Bernd

    Hi Bernd,
    This is a known problem. See My Oracle Support ID 591649.1.
    I ran into the same issue last week. Here is the note from Oracle My Support:
    Symptoms
    When drilling down on a dimension with a lot of members, receiving the error "1020051 Maximum number of rows processed [250000] exceeded [251836]".
    Cause
    When users zoom in on one or more members, Essbase must process a larger grid containing selected members expanded to the zoom-in level set in the options.  By default, the number of rows Essbase can process is 250000.
    Solution
    This limitation has been removed in the EPM v11.1.2.1.102 release.  The maximum number of spreadsheet rows Essbase processes on a request can now be set to 16,384 or higher. For example, to increase the number of rows to one million, add the following to the $ARBORPATH/essbase.cfg file:
    SSPROCROWLIMIT 1000000
    It is not recommended to use a limit higher than 500,000.  A higher setting increases the memory utilization and will increase query times.
    For versions prior to v11.1.2.1.102:
    Increase the number of rows Essbase can process.  Add the following line to the essbase.cfg file:
    SSPROCROWLIMIT 500000
    The maximum that this can be set to is 500000.
    Note:
    SSPROCROWLIMIT applies to unprocessed rows; that is, it is the number of rows Essbase accepts before processing. Row processing eliminates missing rows. After processing, the number of rows that the client can retrieve depends on spreadsheet-defined limits.
    If SSPROCROWLIMIT is exceeded, Essbase issues an error message and stops processing the request.
    If using Advanced Interpretation mode in the Add-in, one cannot turn this setting off from the spreadsheet. The setting is not used in Freeform mode.
    Cheers,
    Mehmet

  • Please outline structure of custom Bodeplotter in Signal Express somebody!!!

    Hi measuring Bode diagram of low-quality DC-motors is hard (voltage in -angle out) because
    the "zero"-position is drifting away.
    This is due to unwanted offset in the signalgenerator and/or nonlinearities in
    the DC-motor.
    I've done a vi that detects a dc-offset in a signal and generates a "counter" DC-offset to compensate for it.
    Now I need to use signal express to generate x number of signals consecutively, with increasing frequency, specified by the user,
    While outputting each signal, it should be possible to add the counter-DC-offset.
    When DC-drift is compensated, that is no DC component from the rotorangle-measuring-transducer,
    SignalExpress should calculate and plot corresponding gain and phase shift in a Bodediagram.
    This should repeat itself until all frequencies are measured are run and gain and phase shift is plotted in the same single diagram
    Kindest regards,
    laskar01

    Hello OKors,
    For future reference, you can check the version of NI-DAQmx installed through Measurement & Automation Explorer (MAX). 
    Start»Programs»National Instruments»Measurement & Automation
    With MAX open, you can expand the Software section to see all NI Software installed and their respective versions.
    You are correct that this process is somewhat of a table-based physical calibration.  We have not yet implemented the same Offset Null and Gain adjust type of calibration that you would find with the Strain task.  The calibration process available with the Custom Voltage with Excitation task is designed to interpolate between calibration data points.  Thus, you must provide at least two calibration points.  Your first calibration point could be zero (unloaded).  Use zero as your first reference point.  Provide a second data point to obtain a y = mx + b interpolation.  Apply a known load to your load cell and use this as the second reference point.
    An alternative would be to simply take a measurement from your unloaded Load Cell and apply this to your Custom Scale.  You should be using a Custom Scale anyway since you don't want Volts but Lbs right?  In the scaling parameters of the Custom Scale, the Slope should be your load cell sensitivity (lbs/V) and the Y-intercept can be your offset.
    Message Edited by RT4CY on 09-18-2009 01:57 PM
    Rod T.

  • When I go click on a specific "Sent" message, all the lettering on the screen fades to an opaque, an hourglass icon appears, & nothing happens.

    When I open the window for all my "sent" messages and click on a specific message, nothning happens. Instead, the lettering on the list of "sent" messages fades to an opaque, and an hourglass iconn appears. When this happens, I can't even close out Thunderbird to start up again. Sometimes if I wait up to a minute or so, the message will appear. Usually, I control/alt/delete, and start all over again. This has only started happening in the past few weeks. During this same time, another problem has appeared. I use google and Youtube to watch a lot of old TV shows. Now, the Yahoo search appears, and the results include many items I don't wish to see. FYI, I use e-mail a lot, receiving and sending up to a dozen messages a day.

    re'' During this same time, another problem has appeared. I use google and Youtube to watch a lot of old TV shows. Now, the Yahoo search appears,''
    I presume you are refering to the Thunderbird search facility that allows you to 'Search google for', but now it says 'search Yahoo for'.
    When you enter something and select 'search Yahoo for' you will see a list of icons on the left side, currently the yahoo icon is selected and at the bottom the heart icon is also red.
    You can select any of those icons to change to another search engine.
    select the google icon, then at the bottom on the left, look for the heart icon, it will appear white with black outline. Click on the heart icon to change it to red. This will set google as default.
    Now close the search and retry, this time it should say 'Search google for'.

  • Storing Shape Information IN a Table-Like Structure

    Hi All,
    I have a Program which displays shape (rectangle,oval,etc) in the panel which is enclosed in a frame.. shape can be dragged and dropped anywhere on panel... also one can delete shape... Now I Want To Store All The Exiting Shapes (as they are added on panel ) in some structure say a table, and alongwith it, i also want to store additional information about shape, say its location currently on panel, its present color, etc so that i can use this information later in the program... how do i do implement this ?? Plz Help Me.. It would be great if you include the changes in the source code itself...
    thanks
    Here is the source code :
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.ArrayList;
    public class ShapeDrawFrame extends javax.swing.JFrame {
        JCheckBoxMenuItem addLargeShapes;    
       JCheckBoxMenuItem addBorderedShapes; 
       JRadioButtonMenuItem red, green, blue,      
                            cyan, magenta, yellow, 
                            black, gray, white;  
       JPopupMenu popup;
        public ShapeDrawFrame() {
            super("Shape Draw");
            //initComponents();        
          ShapeCanvas canvas = new ShapeCanvas();
          setContentPane(canvas);
          /* Create the menu bar and the menus */
          JMenuBar menubar = new JMenuBar();
          setJMenuBar(menubar);
          JMenu addShapeMenu = new JMenu("Add");
          addShapeMenu.setMnemonic('A');
          menubar.add(addShapeMenu);
          JMenu shapeColorMenu = new JMenu("Color");
          shapeColorMenu.setMnemonic('C');
          menubar.add(shapeColorMenu);
          JMenu optionsMenu = new JMenu("Options");
          optionsMenu.setMnemonic('O');
          menubar.add(optionsMenu);
          /* Create menu items for adding shapes to the canvas,
             and add them to the "Add" menu.  The canvas serves
             as ActionListener for these menu items. */     
          JMenuItem rect = new JMenuItem("Rectangle");
          rect.setAccelerator( KeyStroke.getKeyStroke("ctrl R") );
          addShapeMenu.add(rect);
          rect.addActionListener(canvas);
          JMenuItem oval = new JMenuItem("Oval");
          oval.setAccelerator( KeyStroke.getKeyStroke("ctrl O") );
          addShapeMenu.add(oval);
          oval.addActionListener(canvas);
          JMenuItem roundrect = new JMenuItem("Round Rect");
          roundrect.setAccelerator( KeyStroke.getKeyStroke("ctrl D") );
          addShapeMenu.add(roundrect);
          roundrect.addActionListener(canvas);
          /* Create the JRadioButtonMenuItems that control the color
             of a newly added shape, and add them to the "Color"
             menu.  There is no ActionListener for these menu items.
             The canvas checks for the currently selected color when
             it adds a shape to the canvas.  A ButtonGroup is used
             to make sure that only one color is selected. */
          ButtonGroup colorGroup = new ButtonGroup();
          red = new JRadioButtonMenuItem("Red");
          shapeColorMenu.add(red);
          colorGroup.add(red);
          red.setSelected(true);
          green = new JRadioButtonMenuItem("Green");
          shapeColorMenu.add(green);
          colorGroup.add(green);
          blue = new JRadioButtonMenuItem("Blue");
          shapeColorMenu.add(blue);
          colorGroup.add(blue);
          cyan = new JRadioButtonMenuItem("Cyan");
          shapeColorMenu.add(cyan);
          colorGroup.add(cyan);
          magenta = new JRadioButtonMenuItem("Magenta");
          shapeColorMenu.add(magenta);
          colorGroup.add(magenta);
          yellow = new JRadioButtonMenuItem("Yellow");
          shapeColorMenu.add(yellow);
          colorGroup.add(yellow);
          black = new JRadioButtonMenuItem("Black");
          shapeColorMenu.add(black);
          colorGroup.add(black);
          gray = new JRadioButtonMenuItem("Gray");
          shapeColorMenu.add(gray);
          colorGroup.add(gray);
          white = new JRadioButtonMenuItem("White");
          shapeColorMenu.add(white);
          colorGroup.add(white);
          /* Create the "Clear" menu item, and add it to the
             "Options" menu.  The canvas will listen for events
             from this menu item. */
          JMenuItem clear = new JMenuItem("Clear");
          clear.setAccelerator( KeyStroke.getKeyStroke("ctrl C") );
          clear.addActionListener(canvas);
          optionsMenu.add(clear);
          optionsMenu.addSeparator();  // Add a separating line to the menu.
          /* Create the JCheckBoxMenuItems and add them to the Options
             menu.  There is no ActionListener for these items because
             the canvas class will check their state when it adds a
             new shape. */
          addLargeShapes = new JCheckBoxMenuItem("Add Large Shapes");
          addLargeShapes.setSelected(true);
          optionsMenu.add(addLargeShapes);
          addBorderedShapes = new JCheckBoxMenuItem("Add Shapes with Border");
          addBorderedShapes.setSelected(true);
          optionsMenu.add(addBorderedShapes);
          optionsMenu.addSeparator();
          /* Create a menu for background colors, and add it to the
             "Options" menu.  It will show up as a hierarchical sub-menu. */
          JMenu background = new JMenu("Background Color");
          optionsMenu.add(background);
          background.add("Red").addActionListener(canvas);
          background.add("Green").addActionListener(canvas);
          background.add("Blue").addActionListener(canvas);
          background.add("Cyan").addActionListener(canvas);
          background.add("Magenta").addActionListener(canvas);
          background.add("Yellow").addActionListener(canvas);
          background.add("Black").addActionListener(canvas);
          background.add("Gray").addActionListener(canvas);
          background.add("White").addActionListener(canvas);
          /* Create the pop-up menu and add commands for editing a
             shape.  This menu is not used until the user performs
             the pop-up trigger mouse gesture on a shape. */
          popup = new JPopupMenu();
          popup.add("Delete Shape").addActionListener(canvas);
          popup.add("Bring to Front").addActionListener(canvas);
          popup.addSeparator();
          popup.add("Make Large").addActionListener(canvas);
          popup.add("Make Small").addActionListener(canvas);
          popup.addSeparator();
          popup.add("Add Black Border").addActionListener(canvas);
          popup.add("Remove Black Border").addActionListener(canvas);
          popup.addSeparator();
          popup.add("Set Color to Red").addActionListener(canvas);
          popup.add("Set Color to Green").addActionListener(canvas);
          popup.add("Set Color to Blue").addActionListener(canvas);
          popup.add("Set Color to Cyan").addActionListener(canvas);
          popup.add("Set Color to Magenta").addActionListener(canvas);
          popup.add("Set Color to Yellow").addActionListener(canvas);
          popup.add("Set Color to Black").addActionListener(canvas);
          popup.add("Set Color to Gray").addActionListener(canvas);
          popup.add("Set Color to White").addActionListener(canvas);
          /* Set the "DefaultCloseOperation" for the frame.  This determines
             what happens when the user clicks the close box of the frame.
             It is set here so that System.exit() will be called to end
             the program when the user closes the window. */
          setDefaultCloseOperation(EXIT_ON_CLOSE);
          /* Set the size and location of the frame, and make it visible. */
          setLocation(20,50);
          setSize(550,420);
          show();       
       class ShapeCanvas extends JPanel
                         implements ActionListener, MouseListener, MouseMotionListener {
             // This class represents a "canvas" that can display colored shapes and
             // let the user drag them around.  It uses an off-screen images to
             // make the dragging look as smooth as possible.
          ArrayList shapes = new ArrayList();
               // holds a list of the shapes that are displayed on the canvas
          ShapeCanvas() {
               // Constructor: set background color to white
               // set up listeners to respond to mouse actions
             setBackground(Color.white);
             addMouseListener(this);
             addMouseMotionListener(this);
          public void paintComponent(Graphics g) {
               // In the paint method, all the shapes in ArrayList are
               // copied onto the canvas.
             super.paintComponent(g);  // First, fill with background color.
             int top = shapes.size();
             for (int i = 0; i < top; i++) {
                Shape s = (Shape)shapes.get(i);
                s.draw(g);
          public void actionPerformed(ActionEvent evt) {
                 // Called to respond to action events from the
                 // menus or pop-up menu.
             String command = evt.getActionCommand();
             if (command.equals("Clear")) {
                shapes.clear(); // Remove all items from the ArrayList
                repaint();
             else if (command.equals("Rectangle"))
                addShape(new RectShape());
             else if (command.equals("Oval"))
                addShape(new OvalShape());
             else if (command.equals("Round Rect"))
                addShape(new RoundRectShape());
             else if (command.equals("Red"))
                setBackground(Color.red);
             else if (command.equals("Green"))
                setBackground(Color.green);
             else if (command.equals("Blue"))
                setBackground(Color.blue);
             else if (command.equals("Cyan"))
                setBackground(Color.cyan);
             else if (command.equals("Magenta"))
                setBackground(Color.magenta);
             else if (command.equals("Yellow"))
                setBackground(Color.yellow);
             else if (command.equals("Black"))
                setBackground(Color.black);
             else if (command.equals("Gray"))
                setBackground(Color.gray);
             else if (command.equals("White"))
                setBackground(Color.white);
             else if (clickedShape != null) {
                    // Process a command from the pop-up menu.
                if (command.equals("Delete Shape"))
                   shapes.remove(clickedShape);
                else if (command.equals("Bring to Front")) {
                   shapes.remove(clickedShape);
                   shapes.add(clickedShape); 
                else if (command.equals("Make Large"))
                   clickedShape.setSize(100,60);
                else if (command.equals("Make Small"))
                   clickedShape.setSize(50,30);
                else if (command.equals("Add Black Border"))
                   clickedShape.setDrawOutline(true);
                else if (command.equals("Remove Black Border"))
                   clickedShape.setDrawOutline(false);
                else if (command.equals("Set Color to Red"))
                   clickedShape.setColor(Color.red);
                else if (command.equals("Set Color to Green"))
                   clickedShape.setColor(Color.green);
                else if (command.equals("Set Color to Blue"))
                   clickedShape.setColor(Color.blue);
                else if (command.equals("Set Color to Cyan"))
                   clickedShape.setColor(Color.cyan);
                else if (command.equals("Set Color to Magenta"))
                   clickedShape.setColor(Color.magenta);
                else if (command.equals("Set Color to Yellow"))
                   clickedShape.setColor(Color.yellow);
                else if (command.equals("Set Color to Black"))
                   clickedShape.setColor(Color.black);
                else if (command.equals("Set Color to Gray"))
                   clickedShape.setColor(Color.gray);
                else if (command.equals("Set Color to White"))
                   clickedShape.setColor(Color.white);
                repaint();
          } // end actionPerformed()
          void addShape(Shape shape) {
                 // Add the shape to the canvas, and set its size, color
                 // and whether or not it should have a black border.  These
                 // properties are determined by looking at the states of
                 // various menu items.  The shape is added at the top-left
                 // corner of the canvas.
             if (red.isSelected())
                shape.setColor(Color.red);
             else if (blue.isSelected())
                shape.setColor(Color.blue);
             else if (green.isSelected())
                shape.setColor(Color.green);
             else if (cyan.isSelected())
                shape.setColor(Color.cyan);
             else if (magenta.isSelected())
                shape.setColor(Color.magenta);
             else if (yellow.isSelected())
                shape.setColor(Color.yellow);
             else if (black.isSelected())
                shape.setColor(Color.black);
             else if (white.isSelected())
                shape.setColor(Color.white);
             else
                shape.setColor(Color.gray);
             shape.setDrawOutline( addBorderedShapes.isSelected() );
             if (addLargeShapes.isSelected())
                shape.reshape(3,3,100,60);
             else
                shape.reshape(3,3,50,30);
             shapes.add(shape);
             repaint();
          } // end addShape()
          // -------------------- This rest of this class implements dragging ----------------------
          Shape clickedShape = null;  // This is the shape that the user clicks on.
                                      // It becomes the draggedShape is the user is
                                      // dragging, unless the user is invoking a
                                      // pop-up menu.  This variable is used in
                                      // actionPerformed() when a command from the
                                      // pop-up menu is processed.
          Shape draggedShape = null;  // This is null unless a shape is being dragged.
                                      // A non-null value is used as a signal that dragging
                                      // is in progress, as well as indicating which shape
                                      // is being dragged.
          int prevDragX;  // During dragging, these record the x and y coordinates of the
          int prevDragY;  //    previous position of the mouse.
          public void mousePressed(MouseEvent evt) {
                // User has pressed the mouse.  Find the shape that the user has clicked on, if
                // any.  If there is no shape at the position when the mouse was clicked, then
                // ignore this event.  If there is then one of three things will happen:
                // If the event is a pop-up trigger, then the pop-up menu is displayed, and
                // the user can select from the pop-up menu to edit the shape.  If the user was
                // holding down the shift key, then bring the clicked shape to the front, in
                // front of all the other shapes.  Otherwise, start dragging the shape.
             if (draggedShape != null) {
                  // A drag operation is already in progress, so ignore this click.
                  // This might happen if the user clicks a second mouse button before
                  // releasing the first one(?).
                return;
             int x = evt.getX();  // x-coordinate of point where mouse was clicked
             int y = evt.getY();  // y-coordinate of point
             clickedShape = null;  // This will be set to the clicked shape, if any.
             for ( int i = shapes.size() - 1; i >= 0; i-- ) { 
                    // Check shapes from front to back.
                Shape s = (Shape)shapes.get(i);
                if (s.containsPoint(x,y)) {
                   clickedShape = s;
                   break;
             if (clickedShape == null) {
                   // The user did not click on a shape.
                return;
             else if (evt.isPopupTrigger()) {
                  // The user wants to see the pop-up menu
                popup.show(this,x-10,y-2);
             else if (evt.isShiftDown()) {
                  // Bring the clicked shape to the front
                shapes.remove(clickedShape);
                shapes.add(clickedShape);
                repaint();
             else {
                  // Start dragging the shape.
                draggedShape = clickedShape;
                prevDragX = x;
                prevDragY = y;
          public void mouseDragged(MouseEvent evt) {
                 // User has moved the mouse.  Move the dragged shape by the same amount.
             if (draggedShape == null) {
                    // User did not click a shape.  There is nothing to do.
                return;
             int x = evt.getX();
             int y = evt.getY();
             draggedShape.moveBy(x - prevDragX, y - prevDragY);
             prevDragX = x;
             prevDragY = y;
             repaint();      // redraw canvas to show shape in new position
          public void mouseReleased(MouseEvent evt) {
                 // User has released the mouse.  Move the dragged shape, and set
                 // draggedShape to null to indicate that dragging is over.
                 // If the shape lies completely outside the canvas, remove it
                 // from the list of shapes (since there is no way to ever move
                 // it back on screen).  However, if the event is a popup trigger
                 // event, then show the popup menu instead.
             if (draggedShape == null) {
                   // User did not click on a shape. There is nothing to do.
                return;
             int x = evt.getX();
             int y = evt.getY();
             if (evt.isPopupTrigger()) {
                   // Check whether the user is trying to pop up a menu.
                   // (This should be checked in both the mousePressed() and
                   // mouseReleased() methods.)
                popup.show(this,x-10,y-2);
             else {
                draggedShape.moveBy(x - prevDragX, y - prevDragY);
                if ( draggedShape.left >= getSize().width || draggedShape.top >= getSize().height ||
                        draggedShape.left + draggedShape.width < 0 ||
                        draggedShape.top + draggedShape.height < 0 ) {  // shape is off-screen
                   shapes.remove(draggedShape);  // remove shape from list of shapes
                repaint();
             draggedShape = null;  // Dragging is finished.
          public void mouseEntered(MouseEvent evt) { }   // Other methods required for MouseListener and
          public void mouseExited(MouseEvent evt) { }    //              MouseMotionListener interfaces.
          public void mouseMoved(MouseEvent evt) { }
          public void mouseClicked(MouseEvent evt) { }
       }  // end class ShapeCanvas
       // ------- Nested class definitions for the abstract Shape class and three -----
       // -------------------- concrete subclasses of Shape. --------------------------
       static abstract class Shape {
             // A class representing shapes that can be displayed on a ShapeCanvas.
             // The subclasses of this class represent particular types of shapes.
             // When a shape is first constructed, it has height and width zero
             // and a default color of white.
          int left, top;      // Position of top left corner of rectangle that bounds this shape.
          int width, height;  // Size of the bounding rectangle.
          Color color = Color.white;  // Color of this shape.
          boolean drawOutline;  // If true, a black border is drawn on the shape
          void reshape(int left, int top, int width, int height) {
                // Set the position and size of this shape.
             this.left = left;
             this.top = top;
             this.width = width;
             this.height = height;
          void setSize(int width, int height) {
                // Set the size of this shape
             this.width = width;
             this.height = height;
          void moveBy(int dx, int dy) {
                 // Move the shape by dx pixels horizontally and dy pixels vertically
                 // (by changing the position of the top-left corner of the shape).
             left += dx;
             top += dy;
          void setColor(Color color) {
                 // Set the color of this shape
             this.color = color;
          void setDrawOutline(boolean draw) {
                 // If true, a black outline is drawn around this shape.
             drawOutline = draw;
          boolean containsPoint(int x, int y) {
                // Check whether the shape contains the point (x,y).
                // By default, this just checks whether (x,y) is inside the
                // rectangle that bounds the shape.  This method should be
                // overridden by a subclass if the default behavior is not
                // appropriate for the subclass.
             if (x >= left && x < left+width && y >= top && y < top+height)
                return true;
             else
                return false;
          abstract void draw(Graphics g); 
                // Draw the shape in the graphics context g.
                // This must be overridden in any concrete subclass.
       }  // end of class Shape
       static class RectShape extends Shape {
             // This class represents rectangle shapes.
          void draw(Graphics g) {
             g.setColor(color);
             g.fillRect(left,top,width,height);
             if (drawOutline) {
                g.setColor(Color.black);
                g.drawRect(left,top,width,height);
       static class OvalShape extends Shape {
              // This class represents oval shapes.
          void draw(Graphics g) {
             g.setColor(color);
             g.fillOval(left,top,width,height);
             if (drawOutline) {
                g.setColor(Color.black);
                g.drawOval(left,top,width,height);
          boolean containsPoint(int x, int y) {
                // Check whether (x,y) is inside this oval, using the
                // mathematical equation of an ellipse.
             double rx = width/2.0;   // horizontal radius of ellipse
             double ry = height/2.0;  // vertical radius of ellipse
             double cx = left + rx;   // x-coord of center of ellipse
             double cy = top + ry;    // y-coord of center of ellipse
             if ( (ry*(x-cx))*(ry*(x-cx)) + (rx*(y-cy))*(rx*(y-cy)) <= rx*rx*ry*ry )
                return true;
             else
               return false;
       static class RoundRectShape extends Shape {
              // This class represents rectangle shapes with rounded corners.
              // (Note that it uses the inherited version of the
              // containsPoint(x,y) method, even though that is not perfectly
              // accurate when (x,y) is near one of the corners.)
          void draw(Graphics g) {
             g.setColor(color);
             g.fillRoundRect(left,top,width,height,width/3,height/3);
             if (drawOutline) {
                g.setColor(Color.black);
                g.drawRoundRect(left,top,width,height,width/3,height/3);
        // <editor-fold defaultstate="collapsed" desc="Generated Code">                         
        private void initComponents() {
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 400, Short.MAX_VALUE)
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 300, Short.MAX_VALUE)
            pack();
        }// </editor-fold>                       
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new ShapeDrawFrame().setVisible(true);
        // Variables declaration - do not modify                    
        // End of variables declaration                  
    }

    Sure. In your original post, you had a sort of a design. The general idea was right. And then you asked us to implement it. Well, that's the wrong approach. You need to make the sort-of-a-design into a real design. Don't implement anything until you know what you are going to implement.

  • Pages: how can I see the structure of a document?

    Hi, I'm a new user, I just bought my first mac last week.
    I have a problem with Pages. How can I see the structure (organization) of the document I'm working on? I mean headings, headings 2, etc? In Microsoft Word you see it on the left. I don't mean thumbnails, but the construction of the document.
    I know how to mark headings and other parts of a typical document but how can I see the structure afterwards?
    Thanks in advance.

    What you are asking for is Outlining, and that has been removed from Pages 5.2 along with 110 other features.
    Use Pages '09 if you can.
    Peter

Maybe you are looking for

  • Calendar Analytics application won't install with MS Office 2013 on PC

    I use Calendar Analytics, a Microsoft approved application, to analyze Outlook Calendars for utilization rates within my facility. It has worked well for me for several years. Since I upgraded to Microsoft Office 2013, I cannot get Calendar Analytics

  • My phone is barred but by who and why ??

    started just over 24 hrs ago, went to use phone silly little icon on bar signal top left hand side. So checked on line, said that there was a mast in my postcode area down...ok... So went to local o2 shop, had it looked at said no nothing to do with

  • VS2013 Page Inspector does not use external script files

    If I use an external javascript file, the Page Inspector does not appear to run the javascript (as the styles created during runtime are not visible). If I run the web page outside of VS (e.g. IE) then it works. <script type="text/javascript" src="bo

  • Oracle Web Hierarchical Tree Error

    Hi, When I try to migrate from 6i to 10g i face this problem When i click on Item tree i get this error Microsoft Visual C++ RunTime Library Assertion failed Program: G:DevSuiteHome_1\Bin\frmweb.exe File : c:\forms\1012\src\ix\ixvw.c Line :319 Expres

  • CREDIT CARD INFO. TROUBLES. Any help/advice, welcome.

    I'm trying to change my account's credit card information, but iTunes isn't letting me! I can log into my account fine, but when I click the edit button to change payment information, nothing happens. Similarly the iTunes Store itself isn't loading.