Dynamic box resizing

I was using this FLA as an example to do my own progress bar
app.
http://www.flashkit.com/downloads/movies/zip/8327/Simple%20Progress%20Bar%20Preloader%20-- %20Dynamic.zip
I created a new box -> movie object and naming the
instance "bar"... the "setProperty("bar", _xscale, iBytes);"
This works for a one time deal, but when I try to loop as the
FLA file does, nothing happens. Yet when I do the same thing with
the movie clip in the FLA file, it works fine. What do I need to do
to my movie clip object to make this work for me?

Figure I would post this if anyone else was interested.
I think I answered my own question, at least in this case, where I am using the UI text Scroll Component
I make the text box first and drag the bottom center resize handle to make it the size I want.
Next, I add the UI text Scroll Component to it at the right size
Finally I paste the text last and it works fine.
For this case it works....but it would be nice, like in other programs, where you can re-size a box without effecting text size

Similar Messages

  • Dynamic Box Formatting in Scripts

    Hi,
    My requirement is ,
    This is regarding to SAPScripts.
    I should populate some data in a box.
    The box should adjust depending upon the data.( Whether the data is 2 lines or 10 lines).
    Help me out.
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Jul 8, 2008 11:21 AM

    Hi Manjunath,  
    Here is the code which can help you get the dynamic box's from the script.
    Here the element is TAB.
    There is a loop for this element in the driver program.
    Here the code works this way the YORIGIN is incremented by 0.6CM each time it is in the loop thus drawing tables dynamically.
    /E TAB
    /: POSITION XORIGIN '0.9' CM YORIGIN '+0.6' CM
    /: SIZE WIDTH '3.0' CM HEIGHT '0.6' CM
    /: BOX FRAME 10 TW.
    /: POSITION XORIGIN '3.9' CM
    /: SIZE WIDTH '7.3' CM HEIGHT '0.6' CM
    /: BOX FRAME 10 TW.
    /: POSITION XORIGIN '11.2' CM
    /: SIZE WIDTH '2.8' CM HEIGHT '0.6' CM
    /: BOX FRAME 10 TW.
    /: POSITION XORIGIN '14' CM
    /: SIZE WIDTH '2.6' CM HEIGHT '0.6' CM
    /: BOX FRAME 10 TW.
    /: POSITION XORIGIN '16.6' CM
    /: SIZE WIDTH '3.2' CM HEIGHT '0.6' CM
    /: BOX FRAME 10 TW
    P4 &X_VBAP-KWMENG(C)&,,&X_VBAP- ARKTX&,,&V_TOTALa&,,&V_TOTALb&,,&V_TOTALc&
    Hope this Solves your Problem in dynamic Table drawings.
    <REMOVED BY MODERATOR>
    Thanks,
    Tej..
    Edited by: Alvaro Tejada Galindo on Jul 8, 2008 11:21 AM

  • Printing dynamic box in main window in scripts

    hi ,
    I want to print the dynamic box in main window of my script.
    Ex. Suppose the content of the main window is 5 lines so it should print box for 5 those lines only.

    Hi,
    Create a Main window with only 2 lines, Give a BOX command it will give u Border for entire Main window.
    /:BOX FRAME 10 TW
    For giving vertical lines Syntax is
    /:BOX XPOS 16 CH YPOS 0 LN WIDTH '0' CM HEIGHT 2 LN FRAME 10 TW
    It gives u a vertical line at 16 character. so for ur requirment add another command at another XPOS.
    Try this below just below ur ITEM ELEMENT which has the display fields.
    Main Window
    /E ITEM_A
    A,,,,&ITAB-ABC&,,&ITAB-XXX&,,&ITAB-CDE&,,&ITAB-GEF&
    /:BOX FRAME 10 TW
    /:BOX XPOS 16 CH YPOS 0 LN WIDTH '0' CM HEIGHT 2 LN FRAME 10 TW
    /:BOX XPOS 26 CH YPOS 0 LN WIDTH '0' CM HEIGHT 2 LN FRAME 10 TW
    /:BOX XPOS 36 CH YPOS 0 LN WIDTH '0' CM HEIGHT 2 LN FRAME 10 TW
    /:BOX XPOS 46 CH YPOS 0 LN WIDTH '0' CM HEIGHT 2 LN FRAME 10 TW
    Change XPOS according to ur requirement.
    Now add another main window to the same page with changing UPPER margin, U can add upto 99 Main windows in one page.
    So add upto ur Page is full.
    For headings
    Create a Variable window same as Main window, in place of fields, give descriptions.
    Make sure that u give BOX command below the field declaration, if u give above, for last record it will not print box.
    Regards
    Bala Krishna

  • Dynamic BOX in sapscript

    Hi,
    I am using the BOX control command in SapScript.
    Is it possible to assign the values of Xpos and Ypos
    dynamicalliy.
    In BOX XPOS 16 CH WIDTH 0 MM HEIGHT 18 MM FRAME 10 TW,
    i want to assign the values at runtime, instead of
    xpos 16 , something like Xpos Var, where var contain the value of xposition.
    or any other method to print dynamic box in sap script

    Hi
    yes it is possible
    see this
    SAPScripts
    POSITION WINDOW
    SIZE WIDTH '160' MM HEIGHT '140' MM
    BOX FRAME 10 TW
    Box
    BOX HEIGHT '11' MM WIDTH '160' MM FRAME 10 TW INTENSITY 35
    linessssssss
    BOX XPOS '20' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
    BOX XPOS '45' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
    BOX XPOS '80' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
    BOX XPOS '120' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
    Boxes, Lines, Shading: BOX, POSITION, SIZE
    Use the BOX, POSITION, and SIZE commands for drawing boxes, lines, and shading to print particular windows within a form or passages of text within a window in a frame or with shading.
    The SAP printer drivers that are based on page-oriented printers (the HP LaserJet driver HPL2, the Postscript driver POST, the Kyocera Prescribe driver PRES) employ these commands when printing. Line printers and page-oriented printers not supported in the standard ignore these commands. You can view the resulting printer output in the SAPscript print preview.
    Syntax:
    /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
    /: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]
    /: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]
    BOX Command
    Syntax
    /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
    Effect: draws a box of the specified size at the specified position.
    Parameters: For each of XPOS, YPOS, WIDTH, HEIGHT, and FRAME, you must specify both a measurement and a unit of measurement. Specify the INTENSITY parameter as a percentage between 0 and 100.
    XPOS, YPOS
    Upper left corner of the box, relative to the values of the POSITION command.
    Default: Values specified in the POSITION command.
    The following calculation is performed internally to determine the absolute output position of a box on the page:
    X(abs) = XORIGIN + XPOS
    Y(abs) = YORIGIN + YPOS
    WIDTH
    Width of the box. Default: WIDTH value of the SIZE command.
    HEIGHT
    Height of the box. Default: HEIGHT value of the SIZE command.
    FRAME
    Thickness of frame.
    Default: 0 (no frame).
    INTENSITY
    Grayscale of box contents as %.
    Default: 100 (full black)
    Measurements: You must specify decimal numbers as literal values (like ABAP numeric constants) by enclosing them in inverted commas. Use the period as the decimal point character. See also the examples listed below.
    Units of measurement: The following units of measurement may be used:
    TW (twip)
    PT (point)
    IN (inch)
    MM (millimeter)
    CM (centimeter)
    LN (line)
    CH (character).
    The following conversion factors apply:
    1 TW = 1/20 PT
    1 PT = 1/72 IN
    1 IN = 2.54 CM
    1 CM = 10 MM
    1 CH = height of a character relative to the CPI specification in the form header
    1 LN = height of a line relative to the LPI specification in the form header
    /: BOX FRAME 10 TW
    Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT).
    /: BOX INTENSITY 10
    Fills the window background with shading having a gray scale of 10 %.
    /: BOX HEIGHT 0 TW FRAME 10 TW
    Draws a horizontal line across the complete top edge of the window.
    /: BOX WIDTH 0 TW FRAME 10 TW
    Draws a vertical line along the complete height of the left hand edge of the window.
    /: BOX WIDTH '17.5' CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15
    /: BOX WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW
    /: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
    /: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
    Draws two rectangles and two lines to construct a table of three columns with a highlighted heading section.
    POSITION Command
    Syntax
    /: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]
    Effect: Sets the origin for the coordinate system used by the XPOS and YPOS parameters of the BOX command. When a window is first started, the POSITION value is set to refer to the upper left corner of the window (default setting).
    Parameters: If a parameter value does not have a leading sign, then its value is interpreted as an absolute value, in other words, as a value that specifies an offset from the upper left corner of the output page. If a parameter value is specified with a leading sign, then the new value of the parameter is calculated relative to the old value. If one of the parameter specifications is missing, then no change is made to this parameter.
    XORIGIN, YORIGIN
    Origin of the coordinate system.
    WINDOW
    Sets the values for the left and upper edges to match those of the current window (default setting).
    PAGE
    Sets the values for the left and upper edges to match those of the current output page (XORIGIN = 0 cm, YORIGIN = 0 cm).
    /: POSITION WINDOW
    Sets the origin for the coordinate system to the upper left corner of the window.
    /: POSITION XORIGIN 2 CM YORIGIN '2.5 CM'
    Sets the origin for the coordinate system to a point 2 cm from the left edge and 2.5 cm from the upper edge of the output page.
    /: POSITION XORIGIN '-1.5' CM YORIGIN -1 CM
    Shifts the origin for the coordinates 1.5 cm to the left and 1 cm up.
    SIZE Command
    Syntax
    /: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]
    Effect: Sets the values of the WIDTH and HEIGHT parameters used in the BOX command. When a window is first started, the SIZE value is set to the same values as the window itself (default setting).
    Parameters: If one of the parameter specifications is missing, then no change is made to the current value of this parameter. If a parameter value does not have a leading sign, then its value is interpreted as an absolute value. If a parameter value is specified with a leading sign, then the new value of the parameter is calculated relative to the old value.
    WIDTH, HEIGHT
    Dimensions of the rectangle or line.
    WINDOW
    Sets the values for the width and height to the values of the current window (default setting).
    PAGE
    Sets the values for the width and height to the values of the current output page.
    /: SIZE WINDOW
    Sets WIDTH and HEIGHT to the current window dimensions.
    /: SIZE WIDTH '3.5' CM HEIGHT '7.6' CM
    Sets WIDTH to 3.5 cm and HEIGHT to 7.6 cm.
    /: POSITION WINDOW
    /: POSITION XORIGIN -20 TW YORIGIN -20 TW
    /: SIZE WIDTH +40 TW HEIGHT +40 TW
    /: BOX FRAME 10 TW
    A frame is added to the current window. The edges of the frame extend beyond the edges of the window itself, so as to avoid obscuring the leading and trailing text characters.
    http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
    http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
    http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
    http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
    http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
    http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
    Reward points for useful Answers
    Regards
    Anji

  • Dynamic Box's

    Hi All,
        I have a one question , in SAP Scripts/Smartforms how can i draw a dynamic box's.  if there is one record one box (Like  Table with 3 Cells(rows & coloums))  has to appear, if it is 2 ,two box's has to appear depending up on the records.
    Please if any one having the code3 or path to slove this Problem, please give me the advice.
    Thanks very much in advance for your answer.
    Naren

    In print program, something like this
    data: ypos(5), ht(5).
    move '1.75' to ypos.
    move '3.00' to ht.
      call function 'WRITE_FORM'
           exporting
                element   = 'HEAD'
           exceptions
                element   = 01
                function  = 02
                type      = 03
                unopened  = 04
                unstarted = 05
                window    = 06.
      if sy-subrc ne 0.
        message e205 with 'WRITE_FORM failed.' sy-subrc element.
      endif.
    And in the SAPScript:
    /E   HEAD                                     
    /:   BOX YPOS &YPOS& LN HEIGHT &HT& LN INTENSITY 10
    Regards,
    SaiRam

  • Dynamic box in smartforms

    hello gurus,
    i have to populate  dynamic boxes this is the scenario  any ideas...i mean how can i put this in smartform way...
    I
    f gift order <> 1
    Determine how many VALUES we have based on ship_charge, subtotal, promotion_amt and order_total.Think the max is 4
    Based on this count this determines the number of boxes
    This count will also determine which values are output
    Need to consider if promotion amount is negative then need to put negative sign before '£' sign
    Else.
    No boxes/prices are shown
    Endif.

    HI ,
    Use tables .
    right Click->create->tabels
    In data tab  , in loop to
    give the name of the internal table  and work area
    as  :  it_ekpo  into   is_ekpo
    In tables tab click details button
    Under line type 1 specify the size for each row of the table.
    The toal size of all the columns should not exceed the total window width .
    In the same line as details u can see the lines  and boxes .  using that u can fill the borders of the cell with lines .  Click on the cell and select the appropriate  line . When u display the line will be displayed as the border of the cell .
    Save chek activate
    Right click on main area and click tabline.
    Under line type specify the line type created in table .
    Then in each cell right click and create text  . and put variable as
    &is_abc-ebeln&.
    Regards

  • Sap script creating dynamic box problem

    Hi all,
    I am unable to create dynamic box in sap script.
    Because the printing lines in the main window changing from one customer to another customer.
    So could you please guide me how to create a dynamic box in sap script and also how to know the printing line nunber in main window.
    Advance thanks for your suggestion
    Regards,
    Sudhakar.

    In script form u can write following code
        /:       DEFINE &MY_XPOS& = ' '
        /:       DEFINE &MY_YPOS& = ' '
        /:       DEFINE &MY_HEIGHT& = ' '
        /:       DEFINE &MY_WIDTH& = ' '
        /:       PERFORM GET_BOX_SIZE IN PROGRAM Z_MY_PROG
        /:       CHANGING &MY_XPOS&
        /:       CHANGING &MY_YPOS&
        /:       CHANGING &MY_HEIGHT&
        /:       CHANGING &MY_WIDTH&
        /:       BOX XPOS '&MY_XPOS' MM  YPOS '&MY_YPOS' MM  HEIGHT '&MY_HEIGHT' MM WIDTH '&MY_WIDTH' MM INTENSITY 10 FRAME 0 TW
    In report u can write following code
    Form Get_Box_Size TABLES IN_PAR  STRUCTURE ITCSY
                             OUT_PAR STRUCTURE ITCSY.
         Loop at Out_Par.
              Case Out_Par-Name.
                   When 'MY_XPOS'.
                         Out_Par-Value = 100.
                   When 'MY_YPOS'.
                         Out_Par-Value = 57.
                   When 'MY_HEIGHT'.
                         Out_Par-Value = 300.
                   When 'MY_WIDTH'.
                         Out_Par-Value = 'Does it matter?'.
              EndCase.
              Modify Out_Par.
         EndLoop.
    EndForm.

  • Dynamic Box in script

    Hi,
    I have a script which currently prints a number of item details.
    Users want to change the layout so that the result is given in tabular format,i.e, the item details need to be displayed in rows and column format. As the number of items can vary, could you please help me with the logic of displaying this using script?
    Thanks in advance,
    Neethu

    Hi,
    Creating dynamic boxes in script is possible but formatting and getting proper allignment is very tedious job. I had similar requirement for creating dynamic boxes in SAP Script, but getting right allignment of those boxes was not possible and hence I switched to smartform. So I would advise you the same to use smartform for such type of requirement. In smartforms it becomes very easy.
    Still try the following syntax:
    /:POSITION XORIGIN '5' CM YORIGIN '5'CM
    /:SIZE HEIGHT '0' CM WIDTH '0' CM
    /:BOX FRAME 10 TW INTENSITY 10
    Hope this helps.
    Reragds,
    Abhijeet

  • SAPscript - Dynamic box position and height.

    Greetings...
    How to print dynamic box according to the Element. I have an element with looping condition when i used box the line only printed on the first loop, but and no line printed on the next looping even though its is  different element.. Below is the sneak peak of my code.
    /E 101
    /:   BOX WIDTH 0 MM HEIGHT '2' MM FRAME 20 TW
    /:   POSITION YORIGIN '+2' MM
    W2   <B>&text&</><B>,,&zvalue&</>
    Thank you

    Hi
    it is very hard to print a dynamic box with sapscript.
    It is more easy to develop a new-smartform then to develop a dynamic box.
    i know only 1 sapscript which is using dynamic boxes. I do not know the sapscript only the fucntional name we use. That is shopfloor papers (for a production order). It has a good combination of printprogram and sapscript which both has to be working together to get it done. Try to find it and study it. Then you will find out how it works.
      There is no way to get it done with only changes in your sapscript.
    an alternative is to use tab's and '|' and ulines to make something that look a bit like boxes.
    Hope this will help you out.
    Gr., Frank

  • Dynamic character count info as text box resizes

    Not knowing Javascript, does anyone think this is scriptable?
    When clicked inside a text box the info panel tells you how many characters are in view in that text box and how many are overset... it doesn't however display that info if you are resizing a text box by dragging one of the handles... do you think there may be a way of getting it or having onother info panel that displays how many character are inside the text box and how many are overset and it dynamically changes the read out as the user resizes the text box.
    Regards, Tim

    I don't think Javascript can do stuff "dynamically" -- you'd have to press a button to get the updated values. This sort of things is possible with InDesign, but it'd require writing a full plugin. Writing plugins is not for the meek, the faint-hearted, or the kind of people that enjoy their sanity.
    (OTOH I've been wrong a few times: APID, Rorohiko's script extensions -- http://www.rorohiko.com/ -- can perform a few tricks that used to be plugin-only. Check their website to see if there is something that sounds like your request.)

  • Dynamic Text Boxes / Resizing text boxes

    I have a site with a dynamic text box that I have initialized
    (I'm not sure that that is the correct term) at the beginning with:
    myText = new LoadVars();
    myText.onLoad = function()
    { textBox_txt.htmlText = this.content;
    myText.load("text/bio.txt");
    stop();
    Then I have just used a text box throughout with the same
    instance name, although sometimes I have it on a new keyframe. I
    assumed I could just keep loading text into it on different frames
    with:
    stop();
    myText.load("text/performances.txt");
    This appears to be working, except that sometimes it seems to
    be confused and the text box on a certain frame has the wrong text
    in it. Do I have to initialize one for each frame in order for them
    to display the right code? What could be causing it to load another
    text file if it's frame action is telling it to load something
    else? It seems unnecessary to have to re-initialize it for a new
    text box instance in every new frame, but is that the way it has to
    be done?
    Also, I'm not clear on resizing text boxes. It seems like if
    I use the width and height numbers to resize this text box on
    different pages then it changes the size of the text inside, and
    the scroll bar (the UIScrollbar) is a little squishy looking
    sometimes. How does this work?
    Thanks for any help.

    You will find it much better to create a new LoadVars object
    for each of the frames, just call them myText1 myText2 etc.
    The name of the text box instance in this case is irrelevant
    but best practice would be to give them individual names.
    As for the stretching effect use setSize() for UI
    components.

  • Dynamic text resizes when loaded?

    I made sure to set the stage to noScale but I am still having
    a strange problem that is driving my nuts. If I make a static text
    box it will not resizing when I compile and preview or upload the
    swf. However, if I make a dynamic text box, the text size increases
    slightly when i complile the swf. This makes fine tuning the layout
    of web pages extremely difficult because what i see on the stage is
    not the same size as what i see when the swf is complied. Has any
    one else had this problem or know how to solve it because its
    really starting to drive me nuts?

    The only time you should see a size difference is when you
    take text out of a movie clip that has been scaled. Hit Crtl-t to
    get the Transform window and see if the object is %100

  • CS5.5/OS X 10.8: Open/Save As dialog box resizing

    Since I have been using CS5.5 Web Design Premium in Mountain Lion, I cannot get the programs to remember me resizing the Open and Save As dialog boxes.
    Each time I Open or Save As, the windows default to about 720 x 540, which is annoyingly small on a 1920 x 1200 screen. 
    In each programs' .plist file, located at /Users/(username)/Library/Preferences/, there are two keys:
    NSNavPanelExpandedSizeForOpenMode:GetFile
    NSNavPanelExpandedSizeForSaveMode:PutFile
    After trying to resize the windows, I  QuickLook these .plist files.  The values for these key-value pairs are
    1)  sporadically updated and subsequently ignored on program close/relaunch, or
    2)  not updated at all.
    Have noticed this problem in DW, FW, AI, and FL.  PS seems to be the only exception.
    Adobe products are the only programs on my Mac that exhibit this problem.
    Mac OS is up to date. (10.8.3 as of date of post)
    All aforementioned Adobe programs are up to date according to the Adobe Application Manager.
    The preferences folder and the specific .plist files contained therein are read/writeable by me, the administrator.
    Rebuilding the .plist file does not help.
    Rebuilding the Saved Application State folder for the program does not help.
    Other miscellaneous things (resizing Finder columns, showing/rehiding hidden files, maximizing/restoring the window) don't help either.
    Can any community members who have experienced this problem suggest any fixes?

    I think this is an OS X 10.8 thing rather than a CS5.5/OS X 10.8 thing – but I would really like a fix for this too, nnotnorth

  • Dynamic Array resizing

    I have a class with some data members in it. Data for the objects comes frm a XML file. I have to parse out the xml file and create objects. Before reading the XML file i dunno as to how many objects i need to create. I wud like to know a way where I can dynamically increase the size of the object array as I read through the XMl file.
    Thanks in advance,
    Kris.

    This is the source:
    * @(#)ArrayList.java     1.36 01/12/03
    * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
    * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
    package java.util;
    * Resizable-array implementation of the <tt>List</tt> interface.  Implements
    * all optional list operations, and permits all elements, including
    * <tt>null</tt>.  In addition to implementing the <tt>List</tt> interface,
    * this class provides methods to manipulate the size of the array that is
    * used internally to store the list.  (This class is roughly equivalent to
    * <tt>Vector</tt>, except that it is unsynchronized.)<p>
    * The <tt>size</tt>, <tt>isEmpty</tt>, <tt>get</tt>, <tt>set</tt>,
    * <tt>iterator</tt>, and <tt>listIterator</tt> operations run in constant
    * time.  The <tt>add</tt> operation runs in <i>amortized constant time</i>,
    * that is, adding n elements requires O(n) time.  All of the other operations
    * run in linear time (roughly speaking).  The constant factor is low compared
    * to that for the <tt>LinkedList</tt> implementation.<p>
    * Each <tt>ArrayList</tt> instance has a <i>capacity</i>.  The capacity is
    * the size of the array used to store the elements in the list.  It is always
    * at least as large as the list size.  As elements are added an ArrayList,
    * its capacity grows automatically.  The details of the growth policy are not
    * specified beyond the fact that adding an element has constant amortized
    * time cost.<p>
    * An application can increase the capacity of an <tt>ArrayList</tt> instance
    * before adding a large number of elements using the <tt>ensureCapacity</tt>
    * operation.  This may reduce the amount of incremental reallocation.<p>
    * <strong>Note that this implementation is not synchronized.</strong> If
    * multiple threads access an <tt>ArrayList</tt> instance concurrently, and at
    * least one of the threads modifies the list structurally, it <i>must</i> be
    * synchronized externally.  (A structural modification is any operation that
    * adds or deletes one or more elements, or explicitly resizes the backing
    * array; merely setting the value of an element is not a structural
    * modification.)  This is typically accomplished by synchronizing on some
    * object that naturally encapsulates the list.  If no such object exists, the
    * list should be "wrapped" using the <tt>Collections.synchronizedList</tt>
    * method.  This is best done at creation time, to prevent accidental
    * unsynchronized access to the list:
    * <pre>
    *     List list = Collections.synchronizedList(new ArrayList(...));
    * </pre><p>
    * The iterators returned by this class's <tt>iterator</tt> and
    * <tt>listIterator</tt> methods are <i>fail-fast</i>: if list is structurally
    * modified at any time after the iterator is created, in any way except
    * through the iterator's own remove or add methods, the iterator will throw a
    * ConcurrentModificationException.  Thus, in the face of concurrent
    * modification, the iterator fails quickly and cleanly, rather than risking
    * arbitrary, non-deterministic behavior at an undetermined time in the
    * future.
    * <p>Note that the fail-fast behavior of an iterator cannot be guaranteed
    * as it is, generally speaking, impossible to make any hard guarantees in the
    * presence of unsynchronized concurrent modification.  Fail-fast iterators
    * throw <tt>ConcurrentModificationException</tt> on a best-effort basis.
    * Therefore, it would be wrong to write a program that depended on this
    * exception for its correctness: <i>the fail-fast behavior of iterators
    * should be used only to detect bugs.</i>
    * @author  Josh Bloch
    * @version 1.36, 12/03/01
    * @see         Collection
    * @see         List
    * @see         LinkedList
    * @see         Vector
    * @see         Collections#synchronizedList(List)
    * @since   1.2
    public class ArrayList extends AbstractList
            implements List, RandomAccess, Cloneable, java.io.Serializable
        private static final long serialVersionUID = 8683452581122892189L;
         * The array buffer into which the elements of the ArrayList are stored.
         * The capacity of the ArrayList is the length of this array buffer.
        private transient Object elementData[];
         * The size of the ArrayList (the number of elements it contains).
         * @serial
        private int size;
         * Constructs an empty list with the specified initial capacity.
         * @param   initialCapacity   the initial capacity of the list.
         * @exception IllegalArgumentException if the specified initial capacity
         *            is negative
        public ArrayList(int initialCapacity) {
         super();
            if (initialCapacity < 0)
                throw new IllegalArgumentException("Illegal Capacity: "+
                                                   initialCapacity);
         this.elementData = new Object[initialCapacity];
         * Constructs an empty list with an initial capacity of ten.
        public ArrayList() {
         this(10);
         * Constructs a list containing the elements of the specified
         * collection, in the order they are returned by the collection's
         * iterator.  The <tt>ArrayList</tt> instance has an initial capacity of
         * 110% the size of the specified collection.
         * @param c the collection whose elements are to be placed into this list.
         * @throws NullPointerException if the specified collection is null.
        public ArrayList(Collection c) {
            size = c.size();
            // Allow 10% room for growth
            elementData = new Object[
                          (int)Math.min((size*110L)/100,Integer.MAX_VALUE)];
            c.toArray(elementData);
         * Trims the capacity of this <tt>ArrayList</tt> instance to be the
         * list's current size.  An application can use this operation to minimize
         * the storage of an <tt>ArrayList</tt> instance.
        public void trimToSize() {
         modCount++;
         int oldCapacity = elementData.length;
         if (size < oldCapacity) {
             Object oldData[] = elementData;
             elementData = new Object[size];
             System.arraycopy(oldData, 0, elementData, 0, size);
         * Increases the capacity of this <tt>ArrayList</tt> instance, if
         * necessary, to ensure  that it can hold at least the number of elements
         * specified by the minimum capacity argument.
         * @param   minCapacity   the desired minimum capacity.
        public void ensureCapacity(int minCapacity) {
         modCount++;
         int oldCapacity = elementData.length;
         if (minCapacity > oldCapacity) {
             Object oldData[] = elementData;
             int newCapacity = (oldCapacity * 3)/2 + 1;
                 if (newCapacity < minCapacity)
              newCapacity = minCapacity;
             elementData = new Object[newCapacity];
             System.arraycopy(oldData, 0, elementData, 0, size);
         * Returns the number of elements in this list.
         * @return  the number of elements in this list.
        public int size() {
         return size;
         * Tests if this list has no elements.
         * @return  <tt>true</tt> if this list has no elements;
         *          <tt>false</tt> otherwise.
        public boolean isEmpty() {
         return size == 0;
         * Returns <tt>true</tt> if this list contains the specified element.
         * @param elem element whose presence in this List is to be tested.
         * @return  <code>true</code> if the specified element is present;
         *          <code>false</code> otherwise.
        public boolean contains(Object elem) {
         return indexOf(elem) >= 0;
         * Searches for the first occurence of the given argument, testing
         * for equality using the <tt>equals</tt> method.
         * @param   elem   an object.
         * @return  the index of the first occurrence of the argument in this
         *          list; returns <tt>-1</tt> if the object is not found.
         * @see     Object#equals(Object)
        public int indexOf(Object elem) {
         if (elem == null) {
             for (int i = 0; i < size; i++)
              if (elementData==null)
              return i;
         } else {
         for (int i = 0; i < size; i++)
              if (elem.equals(elementData[i]))
              return i;
         return -1;
    * Returns the index of the last occurrence of the specified object in
    * this list.
    * @param elem the desired element.
    * @return the index of the last occurrence of the specified object in
    * this list; returns -1 if the object is not found.
    public int lastIndexOf(Object elem) {
         if (elem == null) {
         for (int i = size-1; i >= 0; i--)
              if (elementData[i]==null)
              return i;
         } else {
         for (int i = size-1; i >= 0; i--)
              if (elem.equals(elementData[i]))
              return i;
         return -1;
    * Returns a shallow copy of this <tt>ArrayList</tt> instance. (The
    * elements themselves are not copied.)
    * @return a clone of this <tt>ArrayList</tt> instance.
    public Object clone() {
         try {
         ArrayList v = (ArrayList)super.clone();
         v.elementData = new Object[size];
         System.arraycopy(elementData, 0, v.elementData, 0, size);
         v.modCount = 0;
         return v;
         } catch (CloneNotSupportedException e) {
         // this shouldn't happen, since we are Cloneable
         throw new InternalError();
    * Returns an array containing all of the elements in this list
    * in the correct order.
    * @return an array containing all of the elements in this list
    *      in the correct order.
    public Object[] toArray() {
         Object[] result = new Object[size];
         System.arraycopy(elementData, 0, result, 0, size);
         return result;
    * Returns an array containing all of the elements in this list in the
    * correct order; the runtime type of the returned array is that of the
    * specified array. If the list fits in the specified array, it is
    * returned therein. Otherwise, a new array is allocated with the runtime
    * type of the specified array and the size of this list.<p>
    * If the list fits in the specified array with room to spare (i.e., the
    * array has more elements than the list), the element in the array
    * immediately following the end of the collection is set to
    * <tt>null</tt>. This is useful in determining the length of the list
    * <i>only</i> if the caller knows that the list does not contain any
    * <tt>null</tt> elements.
    * @param a the array into which the elements of the list are to
    *          be stored, if it is big enough; otherwise, a new array of the
    *           same runtime type is allocated for this purpose.
    * @return an array containing the elements of the list.
    * @throws ArrayStoreException if the runtime type of a is not a supertype
    * of the runtime type of every element in this list.
    public Object[] toArray(Object a[]) {
    if (a.length < size)
    a = (Object[])java.lang.reflect.Array.newInstance(
    a.getClass().getComponentType(), size);
         System.arraycopy(elementData, 0, a, 0, size);
    if (a.length > size)
    a[size] = null;
    return a;
    // Positional Access Operations
    * Returns the element at the specified position in this list.
    * @param index index of element to return.
    * @return the element at the specified position in this list.
    * @throws IndexOutOfBoundsException if index is out of range <tt>(index
    *           < 0 || index >= size())</tt>.
    public Object get(int index) {
         RangeCheck(index);
         return elementData[index];
    * Replaces the element at the specified position in this list with
    * the specified element.
    * @param index index of element to replace.
    * @param element element to be stored at the specified position.
    * @return the element previously at the specified position.
    * @throws IndexOutOfBoundsException if index out of range
    *          <tt>(index < 0 || index >= size())</tt>.
    public Object set(int index, Object element) {
         RangeCheck(index);
         Object oldValue = elementData[index];
         elementData[index] = element;
         return oldValue;
    * Appends the specified element to the end of this list.
    * @param o element to be appended to this list.
    * @return <tt>true</tt> (as per the general contract of Collection.add).
    public boolean add(Object o) {
         ensureCapacity(size + 1); // Increments modCount!!
         elementData[size++] = o;
         return true;
    * Inserts the specified element at the specified position in this
    * list. Shifts the element currently at that position (if any) and
    * any subsequent elements to the right (adds one to their indices).
    * @param index index at which the specified element is to be inserted.
    * @param element element to be inserted.
    * @throws IndexOutOfBoundsException if index is out of range
    *          <tt>(index < 0 || index > size())</tt>.
    public void add(int index, Object element) {
         if (index > size || index < 0)
         throw new IndexOutOfBoundsException(
              "Index: "+index+", Size: "+size);
         ensureCapacity(size+1); // Increments modCount!!
         System.arraycopy(elementData, index, elementData, index + 1,
                   size - index);
         elementData[index] = element;
         size++;
    * Removes the element at the specified position in this list.
    * Shifts any subsequent elements to the left (subtracts one from their
    * indices).
    * @param index the index of the element to removed.
    * @return the element that was removed from the list.
    * @throws IndexOutOfBoundsException if index out of range <tt>(index
    *           < 0 || index >= size())</tt>.
    public Object remove(int index) {
         RangeCheck(index);
         modCount++;
         Object oldValue = elementData[index];
         int numMoved = size - index - 1;
         if (numMoved > 0)
         System.arraycopy(elementData, index+1, elementData, index,
                   numMoved);
         elementData[--size] = null; // Let gc do its work
         return oldValue;
    * Removes all of the elements from this list. The list will
    * be empty after this call returns.
    public void clear() {
         modCount++;
         // Let gc do its work
         for (int i = 0; i < size; i++)
         elementData[i] = null;
         size = 0;
    * Appends all of the elements in the specified Collection to the end of
    * this list, in the order that they are returned by the
    * specified Collection's Iterator. The behavior of this operation is
    * undefined if the specified Collection is modified while the operation
    * is in progress. (This implies that the behavior of this call is
    * undefined if the specified Collection is this list, and this
    * list is nonempty.)
    * @param c the elements to be inserted into this list.
    * @return <tt>true</tt> if this list changed as a result of the call.
    * @throws IndexOutOfBoundsException if index out of range <tt>(index
    *          < 0 || index > size())</tt>.
    * @throws NullPointerException if the specified collection is null.
    public boolean addAll(Collection c) {
         modCount++;
         int numNew = c.size();
         ensureCapacity(size + numNew);
         Iterator e = c.iterator();
         for (int i=0; i<numNew; i++)
         elementData[size++] = e.next();
         return numNew != 0;
    * Inserts all of the elements in the specified Collection into this
    * list, starting at the specified position. Shifts the element
    * currently at that position (if any) and any subsequent elements to
    * the right (increases their indices). The new elements will appear
    * in the list in the order that they are returned by the
    * specified Collection's iterator.
    * @param index index at which to insert first element
    *          from the specified collection.
    * @param c elements to be inserted into this list.
    * @return <tt>true</tt> if this list changed as a result of the call.
    * @throws IndexOutOfBoundsException if index out of range <tt>(index
    *          < 0 || index > size())</tt>.
    * @throws NullPointerException if the specified Collection is null.
    public boolean addAll(int index, Collection c) {
         if (index > size || index < 0)
         throw new IndexOutOfBoundsException(
              "Index: "+index+", Size: "+size);
         int numNew = c.size();
         ensureCapacity(size + numNew); // Increments modCount!!
         int numMoved = size - index;
         if (numMoved > 0)
         System.arraycopy(elementData, index, elementData, index + numNew,
                   numMoved);
         Iterator e = c.iterator();
         for (int i=0; i<numNew; i++)
         elementData[index++] = e.next();
         size += numNew;
         return numNew != 0;
    * Removes from this List all of the elements whose index is between
    * fromIndex, inclusive and toIndex, exclusive. Shifts any succeeding
    * elements to the left (reduces their index).
    * This call shortens the list by <tt>(toIndex - fromIndex)</tt> elements.
    * (If <tt>toIndex==fromIndex</tt>, this operation has no effect.)
    * @param fromIndex index of first element to be removed.
    * @param toIndex index after last element to be removed.
    protected void removeRange(int fromIndex, int toIndex) {
         modCount++;
         int numMoved = size - toIndex;
    System.arraycopy(elementData, toIndex, elementData, fromIndex,
    numMoved);
         // Let gc do its work
         int newSize = size - (toIndex-fromIndex);
         while (size != newSize)
         elementData[--size] = null;
    * Check if the given index is in range. If not, throw an appropriate
    * runtime exception.
    private void RangeCheck(int index) {
         if (index >= size || index < 0)
         throw new IndexOutOfBoundsException(
              "Index: "+index+", Size: "+size);
    * Save the state of the <tt>ArrayList</tt> instance to a stream (that
    * is, serialize it).
    * @serialData The length of the array backing the <tt>ArrayList</tt>
    * instance is emitted (int), followed by all of its elements
    * (each an <tt>Object</tt>) in the proper order.
    private synchronized void writeObject(java.io.ObjectOutputStream s)
    throws java.io.IOException{
         // Write out element count, and any hidden stuff
         s.defaultWriteObject();
    // Write out array length
    s.writeInt(elementData.length);
         // Write out all elements in the proper order.
         for (int i=0; i<size; i++)
    s.writeObject(elementData[i]);
    * Reconstitute the <tt>ArrayList</tt> instance from a stream (that is,
    * deserialize it).
    private synchronized void readObject(java.io.ObjectInputStream s)
    throws java.io.IOException, ClassNotFoundException {
         // Read in size, and any hidden stuff
         s.defaultReadObject();
    // Read in array length and allocate array
    int arrayLength = s.readInt();
    elementData = new Object[arrayLength];
         // Read in all elements in the proper order.
         for (int i=0; i<size; i++)
    elementData[i] = s.readObject();

  • PLZ HELP SAP SCRIPT ISSUE (DYNAMIC BOX)

    Hi all
    I want to include a dynamic text (means number of lines can vary) inside a box .
    please guide me how i can create this box whose size would be dynamic according to this text.
    plz help i am not able to find ne solution
    Thanx in advance
    Edited by: SARABPREET CHADHA on Mar 14, 2008 11:33 AM

    Following things to be done in Driver program.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
          ID              = TEXT_ID
          LANGUAGE        = PRINT_LANGUAGE
          NAME            = TEXT_NAME
          OBJECT          = TEXT_OBJECT
        IMPORTING
          HEADER          = TABLE_HEADER
        TABLES
          LINES           = TABLE_LINES
        EXCEPTIONS
          ID              = 01
          LANGUAGE        = 02
          NAME            = 03
          NOT_FOUND       = 04
          OBJECT          = 05
          REFERENCE_CHECK = 06.
    then
      CALL FUNCTION 'WRITE_FORM_LINES'
        EXPORTING
          HEADER    = TABLE_HEADER
          WINDOW    = WINDOW
        IMPORTING
          FROMPAGE  = FROMPAGE       " not interested ?
        TABLES
          LINES     = TABLE_LINES
        EXCEPTIONS
          FUNCTION  = 01
          TYPE      = 02
          UNOPENED  = 03
          UNSTARTED = 04
          WINDOW    = 05.
    and then in sap script.
    /:           INCLUDE &THEAD-TDNAME& OBJECT &THEAD-TDOBJECT& ID &THEAD-TDID&
    /:           PARAGRAPH T6 LANGUAGE
    Your text will apper in sapscript.
    Award points if useful...

Maybe you are looking for

  • Loading issue : Error: sql error in the database while accessing a table

    Hello, where as one of the DTP in the process chain failed due to  *Error: sql error in the database while accessing a table*, where as in the short dump it showing as Transaction log of data base is full., but i checked the data base space in DB02,

  • Oracel 9i Portal on Redhat 7.1

    When running the Portal configuration assistant I get an ORA 00600 error during the creation of database objects in the remote database. I have set the shared_pool and java_pool to the recommended sizes. The install manual does not give a recommended

  • How to make PI 7.0 soap adapter support SOAP 1.2

    hi all: Is there some idea make PI 7.0 soap adapter support SOAP 1.2? I have look the document about soap adapter,and it specified that soap adapter only support SOAP 1.1. http://help.sap.com/saphelp_nw70/helpdata/EN/ae/d03341771b4c0de10000000a1550b0

  • Differences between the FMs of SAVE_TEXT and CREATE_TEXT.

    Hi Experts, Let me know that, the differences between the FMs of SAVE_TEXT and CREATE_TEXT. Like, Wht Wht scenarioes demand each FM? Which is best one, if both perform same functionality. replies appreciated. thanq

  • Filtering based on Fact Columns makes the result different?

    Dear All, I have an analysis report for Publisher, there are several columns, for example, Col A = ROUND(Col B * Col C / Col D, 0) Whereas Col B, Col C and Col D are integers Col E = ROUND(Col F * Col C / Col D, 0) Whereas Col F, Col C and Col D are