[svn] 4694: Don't remove text lines from the container if it isn' t the container the lines were added to.

Revision: 4694
Author: [email protected]
Date: 2009-01-27 14:35:21 -0800 (Tue, 27 Jan 2009)
Log Message:
Don't remove text lines from the container if it isn't the container the lines were added to. When there is a state change the displayObject can be switched out from under the TextGraphic and TextBox.
QE Notes: need to add tests - will attach my test program to bug
Doc Notes:
Bugs: SDK-18923
Reviewers: Gordon
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-18923
Modified Paths:
flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/TextBlockCompose r.as
flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/TextFlowComposer .as

Yup, you guys pointed me in the right direction.
I changed my adjustmentListener to the following:
JScrollBar scrollBar = (JScrollBar) e.getSource();
int endLoc = document.getLength();
try {
    Rectangle end = outputArea.modelToView(endLoc);
    if (end != null) {
        int n = scrollBar.getValue() + scrollBar.getVisibleAmount();
        boolean locked = (end.y >= n && n <= (end.y + end.height));
} catch (BadLocationException ex) {
}By comparing scrollbar position with the visible rectangle of the end of the document, I can now easily tell if the user has moved the tracker back or not.
To go to the next step of automatically pausing scrolling whenever the user is moving the slider back, I also had to disable the automatic scrolling performed by DefaultCaret. Because there was no way to tell if the user was scrolling or if the output was adjusting from the adjustmentListener, I also had to flag whenever I was autoscrolling.
The end result is a JTextPane that can be appended to at all, and locked by the user by using the slider. If new data arrives, the window is not scrolled, and any text selection the user has is not cleared. Perfect!

Similar Messages

  • Remove text field from Array via for loop

    Hi,
    i have a problem to remove text fields added via for loop.
    That im doing is, via for loop im dynamically creating menu with 10 buttons.
    Each button contain, dynamically created, background (shape) and text field.
    And everything is fine.
    But when im try to remove text fields then i got this error:
    - Im using button to remove text fields - lang_btn.addEventListener(MouseEvent.CLICK, clickHandler);
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
              at flash.display::DisplayObjectContainer/removeChild()
              at Loading_Img_fla::MainTimeline/xmlLoaded()
              at flash.events::EventDispatcher/dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at flash.net::URLLoader/onComplete()
    In the script bellow marked with red is what should remove text fields from an Array, instead giving me error.
    Here is my script
    // Create for loop
    for (var i:int = 0; i < 10; i++)
              for each (xml in listItems)
                        if (i == xml.attribute("Id"))
                                  // Add MovieClip to stage to hold the data
                                  addChild(lmHolder);
                                  lmHolder.x = 0;
                                  lmHolder.y = 0;
                                  // Create new MovieClip to hold buttons
                                  lmButtonsMCArray[i] = new MovieClip();
                                  lmButtonsMCArray[i].buttonMode = true;
                                  lmButtonsMCArray[i].mouseChildren = false;
                                  lmButtonsMCArray[i].x = 20;
                                  lmButtonsMCArray[i].y = 20 + btCount * buttonSpace;
                                  // Add each button MovieClip to lmHolder MovieClip
                                  lmHolder.addChild(lmButtonsMCArray[i]);
                                  // Create Background to buttons
                                  lmButtonsArray[i] = new Shape();
                                  lmButtonsArray[i].graphics.beginFill(lmBgColor0, 1);
                                  lmButtonsArray[i].graphics.drawRect(0, 0, 230, 85);
                                  lmButtonsArray[i].x = 0;
                                  lmButtonsArray[i].y = 0;
                                  // <<-- Add Background shape to the buttons MovieClips
                                  lmButtonsMCArray[i].addChild(lmButtonsArray[i]);
                                  // Create a new array to preserve data from XML List
                                  lmNameArrayEG = new Array();
                                  lmNameArrayUS = new Array();
                                  // Create local variable to hold
                                  var lmTxtFieldContentUS:String;
                                  var lmTxtFieldContentEG:String;
                                  var lmTxtContent:String;
                                  // If clicked button is EG then make array with Arabic text
                                  // If clicked button is US then make array with English text
                                  if (footer.lang_btn.langState == "EG")
                                            for each (var leftMenuName:XML in egLanguageList)
                                                      lmNameArrayEG.push(leftMenuName);
                                            lmTxtFieldContentEG = lmNameArrayEG[i];
                                            lmTxtContent = lmTxtFieldContentEG;
                                  else
                                            for each (var leftMenuNameUS:XML in usLanguageList)
                                                      lmNameArrayUS.push(leftMenuNameUS);
                                            lmTxtFieldContentUS = lmNameArrayUS[i];
                                            lmTxtContent = lmTxtFieldContentUS;
                                  // Setup new text field each time script is executed
                                  lmTxtFieldsArray[i] = new TextField();
                                  lmTxtFieldsArray[i].width = 110;
                                  lmTxtFieldsArray[i].border = false;
                                  lmTxtFieldsArray[i].wordWrap = true;
                                  lmTxtFieldsArray[i].multiline = true;
                                  lmTxtFieldsArray[i].selectable = false;
                                  lmTxtFieldsArray[i].embedFonts = true;
                                  lmTxtFieldsArray[i].antiAliasType = AntiAliasType.ADVANCED;
                                  lmTxtFieldsArray[i].autoSize = TextFieldAutoSize.CENTER;
                                  lmTxtFieldsArray[i].text = lmTxtContent.toUpperCase();
                                  lmTxtFieldsArray[i].x = 10;
                                  lmTxtFieldsArray[i].name = "lmTxtFieldName" + i;
                                  // <<-- Add Text fields to the Movie Clip
                                  lmButtonsMCArray[i].addChild(lmTxtFieldsArray[i]);
                                  // If clicked button is EG then set Arabic text format, and make array with Arabic text fields
                                  // If clicked button is US then set English text format, and make array with Egnlish text fields
                                  if (footer.lang_btn.langState == "EG")
                                            lmTxtFieldsArray[i].setTextFormat(txtFormat_lm_eg);
                                            // Make array from text fields;
                                            pushEgTFintoArray.push(lmTxtFieldsArray[i]);
                                  else
                                            lmTxtFieldsArray[i].setTextFormat(txtFormat_lm_us);
                                            // Make array from text fields;
                                            pushUsTFintoArray.push(lmTxtFieldsArray[i]);
                                  // If clicked button is EG then loop thrue the for loop and remove English text fields from array
                                  // If clicked button is EG then loop thrue the for loop and remove Arabic text fields from array
                                  if (footer.lang_btn.langState == "EG")
                                            for (var rNr_us:Number = 0; rNr_us < pushUsTFintoArray.length; rNr_us++)
                                                      //remove the text field array from the display
                                       removeChild(pushUsTFintoArray[rNr_us]);
                                            //clear the array
                                            pushUsTFintoArray = [];
                                  else
                                            for (var rNr_eg:Number = 0; rNr_eg < pushEgTFintoArray.length; rNr_eg++)
                                                      //remove the text field array from the display
                                       removeChild(pushEgTFintoArray[rNr_eg]);
                                            //clear the array
                                            pushEgTFintoArray = [];
              btCount++;

    it looks like those tf's are children of  lmButtonsMCArray[i], not the current scope.  use:
    if (footer.lang_btn.langState == "EG")
                                            for (var rNr_us:Number = 0; rNr_us < pushUsTFintoArray.length; rNr_us++)
                                                      //remove the text field array from the display
                                        lmButtonsMCArray[rNr_us].removeChild(pushUsTFintoArray[rNr_us]);
                                            //clear the array
                                            pushUsTFintoArray = [];
                                  else
                                            for (var rNr_eg:Number = 0; rNr_eg < pushEgTFintoArray.length; rNr_eg++)
                                                      //remove the text field array from the display
                                        lmButtonsMCArray[rNr_eg].removeChild(pushEgTFintoArray[rNr_eg]);
                                            //clear the array
                                            pushEgTFintoArray = [];

  • It isn't right that U2 songs were added automatically to my iPad, especially as one must work to get them off ("hidden"). I don't like it at all, and I hope apple never does this again.

    It isn't right that U2 songs were added automatically to my iPad, especially as it is not so easy to remove ("hide") them. I don't like it at all, and I hope apple never does this again.

    Of course there is - maybe you didn't scroll down far enough?
    Cheers,
    GB

  • Removing text frames from rdf export format

    After a report has been exported in rdf format, can anyone tell me if there is a way to remove the text frames from the document, so that the formating is retained but by using word's tabs etc.
    Our client needs to manually add sections to the document after the report has been generated and we find that because of the text frames the document formatting gets ruined when new sections are added to the file.

    I don't know whether any of this will help?
    According to the manual there are only a very limited range of adjustments you can make to iMovie projects.
    Turn iMovie adjustments on or off
    When editing a project in iMovie, you can adjust several video attributes, such as exposure, brightness, and saturation, in the Project Browser. If you import an iMovie project that has these adjustments into Final Cut Pro, the adjustments are retained and appear in the Color area of the Video inspector as an iMovie item.
    Although you cannot modify the adjustments added in iMovie, you can choose whether they are applied to the clip or not.
    Note: Video adjustments you make to clips in the iMovie Event Browser are not retained and do not appear in Final Cut Pro.
    Turn a clipʼs iMovie adjustments on or off
    In the Timeline, select a clip with iMovie adjustments applied, and select or deselect the iMovie checkbox in the Color area of the Video inspector.
    Note: The iMovie adjustments appear only in the Timeline, not in the Event Browser.

  • Removing text field from po

    hi gurus
    i want to keep
    in header texts
    1) header note
    2) delivery note
    3) payment terms
    in item text only item text
    all other texts in header and item level i want to remove can i do it so
    so that other texts get supress
    plz help

    If you want to remove from the transaction screen use the following path
    (generally not advisable to delete the standard configuration delivered for text types)
    SPRO->Materials Management->Purchasing->Purchase Order->Texts for Purchase Orders->Define Text Types for Purchase Order Texts.
    In this you can keep the texts you want and delete the rest. Similarly, you can do the same for item texts.
    If your requirement is to delete from the print layout, do the following:
    SPRO->Materials Management->Purchasing->Messages->Texts for Messages->Define Texts for Purchase Orders. In this place, you configure only the text types which are needed for your print.

  • [svn:cairngorm3:] 17674: Maven: Remove deprecated PopUpFactory from Flex SDK 4 version.

    Revision: 17674
    Revision: 17674
    Author:   [email protected]
    Date:     2010-09-13 02:20:26 -0700 (Mon, 13 Sep 2010)
    Log Message:
    Maven: Remove deprecated PopUpFactory from Flex SDK 4 version. Use PopUpWrapper.reuse = false instead.
    Modified Paths:
        cairngorm3/trunk/libraries/Popup/pom.xml

    Hi, those technologies are so cool but I failed to run the sample:
    - I am using Maven 3.0.2.
    Runnung mvn build from the latest source code from trunk "....cairngorm3\samples\todo>mvn install". I got the error relating to "unable to transacoding"
    D:\Java\workspaces\misc\cairngorm3\samples\todo\todo_flex\todo_flex_shell\src\ma
    in\flex\com\adobe\txi\todo\shell\skins\ApplicationHeaderSkin.mxml: Error: unable
    to resolve '/assets/todoLogo_big.png' for transcoding
    D:\Java\workspaces\misc\cairngorm3\samples\todo\todo_flex\todo_flex_shell\src\ma
    in\flex\com\adobe\txi\todo\shell\skins\ApplicationHeaderSkin.mxml: Error: Unable
    to transcode /assets/todoLogo_big.png.
    I shift the assets folder to src/main/flex. It got compiled then I can deploy succesfully into Tomcat 6. But I still get empty screen.
    Do I have to do something else like "run db script", "create DB schema" ?
    Note: my adt.jar is from flex_sdk_4.5.0.17855
    Thanks

  • How do I remove old applications from my new Macbook Pro that came over when the data on my iMac was migrated to the new computer.

    How do I remove old applications from my new Macbook Pro that were part of the data that was migrated over from my older iMac?
    Thanks

    If the applications were originally drag and drop installations you can simply drag them to the trash and empty. If they were installed by an installer there should be an uninstaller included. If you're not sure you should check with the software developer for instructions. In this case Google can be your friend.

  • How to automatically populate text boxes from dropdown and tick box options and then sum the results

    Firstly I need to say that I have no knowledge of how to use Javascript.
    I am using the 30 day trial of Adobe Acrobat XP Pro to see if it can be used for a Membership Application Form for the 1st year of membership. This 1st year  has a pro-rata membership fee per month left in the year of application along with a pro-rata postage fee for non-UK members. All of the input will be via basic text boxes with the exception of the application date and overseas postage for which I have created 3 dropdown boxes, one for Day, one for Month and one forYear and for the 2 tick boxes which are there for the applicant to say if they want 2 other options which have a cost attached to them.  I want to populate 2 text boxes from the Month lookup. One of these is for the pro-rata membership fee and the other for the pro-rata overseas postage. The other 2 optional items will be text boxes populated from the tick boxes. Having populated these 4 text boxes I then want to have them automatically summed to give the total to be sent by the applicant.
    I have searched many forums and tried many of the suggested ways of doing it and none of the 4 text boxes are populated.
    Are you able to help me with this?
    Many thanks

    The script solution provided is a "custom calculation JavaScript" not a "simplified field notation".
    The comment at the top of the code:
    // Custom calculate script for text field
    should help clarify the placement location for the code.
    Simplified field notation has a number of specific restrictions. One is that the provided data must be numeric data only.

  • HT4061 I have lost my ITouch and I cant get the serial # to ask for help. I purchased it on line from Apple. Would they have a record of the number? If so, how do I get help without the number?

    Oh no. I lost my ITouch. How can I get my serial #. Would Apple have it on record since I bought it on line from them about two years ago. I no longer have the box

    See the bottom of this reply:
    - If you previously turned on FIndMyiPod on the iPod in Settings>iCloud and wifi is on and connected go to iCloud: Find My iPhone, sign in and go to FIndMyiPhone. If the iPod has been restored it will never show up.
    iCloud: Find My iPhone
    - You can also wipe/erase the iPod and have the iPod play a sound via iCloud.
    - If not shown, then you will have to use the old fashioned way, like if you lost a wallet or purse.
    - Change the passwords for all accounts used on the iPod and report to police
    - There is no way to prevent someone from restoring the iPod (it erases it) using it unless you had iOS 7 on the device. With iOS 7, one has to enter the Apple ID and password to restore the device.
    - Apple will do nothing without a court order                                                        
    Reporting a lost or stolen Apple product                                               
    - iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number

  • Removal of pics from 3gs. can transfer to pc, but cant get the pics off of phone.

    I correctly used the phone as an exterior drive and got the pics to go to pc. But the pics wont remove from the phone. Then I mistakenly sync all the pics from pc to phone. What is the correct way to get pics off of phone without having to delete each individual pic. I now have 1200 pics on phone.

    if it's music then drm is not used there any more and drm can be removed from previously bought drm material without cost

  • ITunes update removes essential software from my computer, which means I can't use the Internet.

    Two days ago, I updated iTunes to the latest version, but it appears that during the installation, vital software was removed from my computer. The result was that I couldn't access the Internet after the installation. I then did a system restore to get my computer back to how it was before I installed the new iTunes, with the result that the essential Internet file is back, but I can no longer open iTunes. I am getting the message that I need to change to the English version! I never selected any other version during the installation and in any case there was no such option.  I simply pressed the "Download update" from within iTunes.
    I have tried re-installing iTunes, but I keep getting the same result and have to keep reverting so that I can use the Internet.  Has anyone come across this problem? How do I resolve it?

    Okay than this definitely was not Apple. Apple support techs never have access to your mouse. It sounds like this company installed some software on your Mac. It is hard to tell what their intentions are but just assume in these situations that all your data was compromised. Possibly all your online accounts have been compromised such as social networks, banks, etc.. The smartest thing to do would be to change all of your passwords and reinstall OS X on your Mac. It sounds extreme but that's what happens when a 3rd party company gains control of your computer.
    -Zeph

  • Remove a domain from Exchange 2003, now other domains cannot send to the old domain error 5.1.1

    We have a single Exchange 2003 server.  We have multiple mail domains on the server, but are slowly moving to a hosted email solution.  I moved the first domain, I will call it
    domainABC, to our hosted solution.  I have removed all exchange mailboxes from the users, and deselected the domain from Recipient Policies.  I then ran the policy.  
    Whenever I send an email to anyone on Domain ABC from any other domain on the Exchange server, I get the 5.1.1 message.  I am not sure what to do next - any help would be appreciated...
    Brian

    Hi Brian,
    Could you post the detail information for the NDR message?
    When you migrate all the users to the host email server, did you change mx record point to the new server?
    You also can use this tool to help you check for the inbound email test (for Domain ABC).
    Exchange Remote Connectivity Analyzer
    https://www.testexchangeconnectivity.com/
    Thanks,
    Evan Liu
    TechNet Subscriber Support in forum
    If you have any feedback on our support, please contact
    [email protected]
    Evan Liu
    TechNet Community Support

  • [svn:bz-trunk] 21661: Avoid calling throwNotSubscribedException() from inside synchronized blocks to prevent potential issues acquiring the lock .

    Revision: 21661
    Revision: 21661
    Author:   [email protected]
    Date:     2011-07-21 06:21:07 -0700 (Thu, 21 Jul 2011)
    Log Message:
    Avoid calling throwNotSubscribedException() from inside synchronized blocks to prevent potential issues acquiring the lock.
    Checkin-Tests: Pass
    QA: Yes
    Doc: No
    Modified Paths:
        blazeds/trunk/modules/core/src/flex/messaging/client/FlexClient.java

  • How do I remove text boxes from Pages

    I have an awful time with Pages on my lap top.  I am used to Appleworks  6.2 on my older desktop (PowerMac G4 / OS 10.4.11).  If I specify a US letter page I get that in Appleworks, it  is then 8.1/2" x 11", without running into pre-existing formats or other similar distractions. I can immediately type a neat business letter.
    Not with Pages.  On my MacBookAir, with Pages 4.3 and OS 10.8.4, I can type alright, but when I want to print what I typed, only a small part of what I typed shows up in in Print Preview of my typed page.  After a bit of backtracking,  I notice a blue-lined rectangle on my typed page containing the portion of my typing that appeared in that Print Preview.  It is apparently a self-formed "text box", that was not a part of my blank template page and was not inserted by me while or just before I typed.
    I did not find any way to delete the edges of that text box. The "delete" option under the pull down edit menu is blanked out.  If I click on the "Text box " symbol in the menu bar it does not let me switch off the text box, but instead gives me another text box inside the first one!  I suppose this is to allow user to print only a single keyboard stroke of the entire letter.  The "Inspector" seems to have no options to set text boxes.
    Pages "Help" Menu has nothing of how to delete a text box, or how to prevent it in the first place from screwing up what you have typed in such manner that it becomes unprintable.
    Similarly a small rectangular box formed on both the top and the bottom of each page (which could be a space reserved for a header or footer), but again I do not use these on my business letters, and they appear self-formed by Pages, and I would like to know how to prevent them, or delete them.
    In other words I like to get a blank page to start with, which will only set up and type what "I, THE  USER" enter on my keyboard. 
    Can anybody tell me how to this with Pages? 
    (PS. I can do it with even with Thunderbird !)

    1. Open a blank Word Processing template (they are listed in the Template Chooser sidebar), you have opened a Layout template that requires Textboxes for you to type into.
    2. To select a Textbox hold down the command key and click on its edge or lassoo it, then hit delete.
    3. If you don't want Headers or Footers, uncheck them in the Document Inspector
    4. Download the Pages09_UserGUide.pdf from under the Help menu and familiarise yourself with Pages' basics. Also look around your Menus and Inspectors which are laid out logically from left to right from broad to details.
    I suggest you click inside your textbox first go command a and copy the contents before you delete it and then paste that into a new Word Processing template.
    Peter

  • When building deployment, install reportgen_txt.seq but when removing program don't remove reportgen_txt.seq from the TestStand\Components\Models\TestStandModels directory?

    Basically I want to install a custom reportgen_txt.seq file to the TestStand Dir\Components\Models\TestStandModels upon installation of the program but when I remove the program from my computer I want to keep the custom reportgen_txt.seq file...Right now when I remove the program, the custom reportgen_txt.seq file is also removed...
    Anyone have any thoughts besides having to have a second deployment to install the file?
    PLEASE HELP!!!  And thanks in advance
    Solved!
    Go to Solution.

    I went ahead and implemented using the custom commands, worked like a charm!!  Thank you Thank you! 
    I just added a custom command using the xcopy function (see below).  I needed three files to be copied over to specific directories once they were installed in the install directory.  My three configured files were:
    reportgen_txt.seq
    Users.ini
    TestExec.ini
    Attachments:
    customcommand.JPG ‏55 KB

Maybe you are looking for

  • Why can't I install any version of Firefox?

    I uninstalled FF, after having something called freecause.com cause ff to freeze or lock up to where I couldn't close or navigate ff. To even close ff, I had to close using task manager. Now I can't install ff, I can download the executable file, but

  • Downloading and activating Adobe Acrobat XI Standard

    I am in the process of trying to download and install Adobe Acrobat XI Standard onto my laptop. I had to re-image the device. I have the serial number and I have linked it to my account but I cannot recieve a download, even when going to the preferre

  • No credit card, based uk

    no credit card, based UK, i've followed the usual instructions as posted but the last bit asks me for a usa address/phone no/zip code so I can't complete the create ID bit..what to do..??

  • PLEASE HELP I NEED HELP

    I logged in to my mid 2012 13" MacBookPro with Latest OSX Mavericks and my dock only appears if i click down on the bottom of my screen (I hide my dock so that it only comes up when I hover over where it would be) and when I do get the dock open if I

  • LSO workflow in error

    Hi friends, I am encountering a problem with the workflow related to SAP's Learning solution (LSO) 1) Whenever i set a substitute to approve the training requests , the  person to whom i have substituted  is not able to approve it from portal and the