How to extend PlainDocument for an extremely large Jtextarea?

I'm trying to extend the PlainDocument class in order to use an external file for saving an extremely large document that's being scrolled in a jtextarea. The document is read-only after it's created. My class uses its own insertString to capture the document as it's created, and sets the length to be passed back by the getLength method. However, the getText requests seem to ignore this length, and only ask for the first character of the document. Any ideas on how to get this to work correctly, or is there a better approach to the general problem?
Thanks,
Hartley

Some more background on this is that when running without the document model, it ran out of heap space. The heap space required was about 4 times the size of the total length I was trying to display, and from research, I think that this is due to the default gap management in the document, keeping possibly multip[le copies of the individual strings that I was appeanding into the text area.  I'm aware that I could split the large input into some individual segments, but the user requirement is to be able to search the document for specific text occurrences, which would not be possible with one search if there were multiple segments.  The obvious solution seemed to be the use of the PlainDocument to manage the storage myself.  I did a lot of searching for examples of how to use it, but they all seemed to be limited to invoking the remove(...) method to cut down on the size, or to do some sort of editing as lines were inserted.  I've actually tried several different ways of handling the getText and insertString methods, and tracing the arguments they're called with.  I just can't figure out why the basic theory of what I'm doing doesn't work - there's more involved but I can't find out what it is.
Hartley                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • How to extend the range from extreme to express

    I have just bought a airport express and airport extreme. I have been reading the instructions but I cant seem to find the answer on how to extend my wi-fi connection from my extreme through my express. I hope you understand my question.

    Apple's step by step support document for this is here:
    http://support.apple.com/kb/HT4259
    Although the items pictured are two AirPort Extremes, the setup instructions would be exactly the same for an AirPort Extreme and an AirPort Express

  • How to extend customer for other slaes areas

    i want to extend  my custoemr  for other slaes area other than existing sales area .current slaes area is com div and com dis chl

    Hi Amit,
    Another Way is, as you have maintained the Customer for common DC and division, you can make referenece of other sales area with this by T-code VOR1 and VOR2, then the customer with common division and DC will be appllicable for all SALEs area.
    Hope this will help.
    Thanks,
    Raja

  • How to make linesize for autotrace be larger than 80?

    Is it possible to make that the linesize of the output in sqlplus to be larger than 80?
    I have my linesize = 150 but the output of the autotrace is wrapped and it is quite difficult to see.

    did you try?:
    SET LINESIZE 150Yes, I did. And it did not work.
    SQL> show user
    USER is "SCOTT"
    SQL> set linesize 150
    SQL> set autotrace traceonly
    SQL> select 1 from emp, dept, bonus, emp, dept, emp, dept, emp, dept, bonus, emp, dept, emp, dept, b
    onus, emp, dept, bonus;
    no rows selected
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE
       1    0   NESTED LOOPS
       2    1     NESTED LOOPS
       3    2       NESTED LOOPS
       4    3         NESTED LOOPS
       5    4           NESTED LOOPS
       6    5             NESTED LOOPS
       7    6               NESTED LOOPS
       8    7                 NESTED LOOPS
       9    8                   NESTED LOOPS
      10    9                     NESTED LOOPS
      11   10                       NESTED LOOPS
      12   11                         NESTED LOOPS
      13   12                           NESTED LOOPS
      14   13                             NESTED LOOPS
      15   14                               NESTED LOOPS
      16   15                                 NESTED LOOPS
      17   16                                   NESTED LOOPS
      18   17                                     TABLE ACCESS (FULL) OF '
              BONUS'
      19   17                                     TABLE ACCESS (FULL) OF '
              DEPT'
      20   16                                   TABLE ACCESS (FULL) OF 'EM
              P'
      21   15                                 TABLE ACCESS (FULL) OF 'BONU
              S'
      22   14                               TABLE ACCESS (FULL) OF 'DEPT'
      23   13                             TABLE ACCESS (FULL) OF 'EMP'
      24   12                           TABLE ACCESS (FULL) OF 'DEPT'
      25   11                         TABLE ACCESS (FULL) OF 'EMP'
      26   10                       TABLE ACCESS (FULL) OF 'BONUS'
      27    9                     TABLE ACCESS (FULL) OF 'DEPT'
      28    8                   TABLE ACCESS (FULL) OF 'EMP'
      29    7                 TABLE ACCESS (FULL) OF 'DEPT'
      30    6               TABLE ACCESS (FULL) OF 'EMP'
      31    5             TABLE ACCESS (FULL) OF 'DEPT'
      32    4           TABLE ACCESS (FULL) OF 'EMP'
      33    3         TABLE ACCESS (FULL) OF 'BONUS'
      34    2       TABLE ACCESS (FULL) OF 'DEPT'
      35    1     TABLE ACCESS (FULL) OF 'EMP'
    Statistics
              0  recursive calls
              0  db block gets
              3  consistent gets
              0  physical reads
              0  redo size
            244  bytes sent via SQL*Net to client
            372  bytes received via SQL*Net from client
              1  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              0  rows processed
    SQL>

  • I18n - how to add support for more languages (CQ 5.4)

    I have a number of questions around adding support for more languages. We are already using multiple languages and would like to add more.
    1. Standard languages provided
    in /libs/wcm/core/i18n I can see the standard ootb languages for CQ 5.4: de es fr it ja zh-cn
    How can I add more? Are there additional language packages provided by Adobe for CQ 5.4?
    2. Translator tool
    We have our own additional keys/strings in
      /apps/site/i18n/publish
    When I open these with the translator tool
      /libs/cq/i18n/translator.html
    as admin, I can see them all just fine.
    However when I open them as another user, I only see the columns of the languages defined in /libs/wcm/core/i18n
    There is a description how to extend this for 5.5 here:
    http://dev.day.com/docs/en/cq/5-5/developing/cq5-translator.html#Changing%20Languages%20Li sted%20in%20the%20Grid
    and I have added the languages to /etc/languages in the "languages" property, but this does not work with 5.4 apparently (at least as far as I have tried).
    I still only get the default languages from /libs/wcm/core/i18n despite the other languages being there in
      /apps/site/i18n/publish
    and as admin I can see and edit them.
    How do I make them visible and editable for other users?
    3. Tags
    When editing the translations of tags, I want all the possible languages to appear in the dialog box for editors.
    I have extended the "languages" property in /etc/tags and this works basically fine (as expected) as described in:
    http://dev.day.com/docs/en/cq/5-5/developing/cq5-translator.html#Changing%20Language%20Nam es%20and%20Default%20Countries
    The desired language must be supported and listed in:
      /libs/wcm/core/resources/languages
    I want to use a 2-letter iso code (e.g. "no" for Norway") and this desired 2-letter iso code must exist as a node. If that is not the case and only nodes with locales exist (e.g. "no_no" and "no_no_ny") then a 2-letter node must be created with a default setting pointing to the default locale.
    I have tried this and it works fine as expected when the default language node is created in
      /libs/wcm/core/resources/languages
    But /libs is a system folder that should not be modified, it could be potentially overwritten by Adobe packages.
    The 5.5 docs say to create the node in
      /apps/wcm/core/resources/languages
    instead, but this did not work for me in CQ 5.4 and I could find no other docs describing a process for 5.4
    How to do this properly in 5.4?

    Thanks for that hint, I checked it and the user does have read access to /etc/languages and /etc/tags and also /libs
    So it seems the only workaround would be to create dummy nodes in /libs/wcm/core/i18n - which I did with a script (to be able to repeat after installation of hotfixes/and updates).
    So for example for Norwegian:
    # set default 2-letter node for norway (since it is missing)
    curl -u "admin:${PASS}" -X POST "http://${SERVER_IP}:${PORT}/libs/wcm/core/resources/languages/no" -d 'jcr:primaryType@TypeHint=Name' -d 'jcr:primaryType=nt:unstructured' -isS | grep HTTP
    curl -u "admin:${PASS}" -X POST "http://${SERVER_IP}:${PORT}/libs/wcm/core/resources/languages/no" -d 'country=*' -isS | grep HTTP
    curl -u "admin:${PASS}" -X POST "http://${SERVER_IP}:${PORT}/libs/wcm/core/resources/languages/no" -d 'defaultCountry=no_no' -isS | grep HTTP
    curl -u "admin:${PASS}" -X POST "http://${SERVER_IP}:${PORT}/libs/wcm/core/resources/languages/no" -d 'language=Norwegian' -isS | grep HTTP
    # set dummy node for missing languages in /libs/wcm/core/i18n
    curl -u "admin:${PASS}" -X POST "http://${SERVER_IP}:${PORT}/libs/wcm/core/i18n/no" -d 'jcr:primaryType@TypeHint=Name' -d 'jcr:primaryType=nt:folder' -isS | grep HTTP
    curl -u "admin:${PASS}" -X POST "http://${SERVER_IP}:${PORT}/libs/wcm/core/i18n/no" -d 'jcr:mixinTypes@TypeHint=Name[]' -d 'jcr:mixinTypes=mix:language' -isS | grep HTTP
    curl -u "admin:${PASS}" -X POST "http://${SERVER_IP}:${PORT}/libs/wcm/core/i18n/no" -d 'jcr:language=no' -isS | grep HTTP
    This does create a proper dummy node (which is otherwise empty) in /libs/wcm/core/i18n
    But unfortunately the Norwegian language still does not show up in the translator tool /libs/cq/i18n/translator.html
    Only the standard languages show for my user.
    Admin user does see all langauges we have in /apps/site/i18n/publish (but that was already the case before) - so I assume it must be some permissions are missing. I also tried giving that user modify+create permissions to /apps/site/i18n/publish but that did not make any difference.
    Any other ideas what could be missing?

  • HT4145 How can I use an Airport Extreme to act as a Range Extender for an Alcatel One Touch Y800Z WiFi modem/router? I get a message saying it cannot be extended. Thank you. Arup

    How can I use an Airport Extreme to act as a Range Extender for an Alcatel One Touch Y800Z WiFi modem/router? As we live in a rural area and our landline broadband speeds are awful, I have moved on to a 3G provider in the UK (EE/Orange) and set up the wireless modem which is working very well with an iMac. I have an Airport Extreme base station which was previously connected with an Ethernet cable to the landline router, and two Airport Express stations as Range Extenders. I would now like to use the Airport Extreme and the two Express stations to extend the range of the Alcatel WiFi device. I have tried automatic and manual set up with the Airport Utility but at the crucial step for selecting a network to extend, although the WiFi device is recognised, I get a message saying it cannot be extended.
    Thank you for any help you can provide.
    Arup

    This is a problem with a lot of cheap end wifi hotspot like devices.. sometimes you can just swap the sim out to a real 3G wireless router.. that is a better approach IMHO than wireless repeater ever will be.
    In the meantime..
    Have a go with the suggestion.. place the express as wireless bridge. With a computer connected to the wifi from alcatel unit.. (I am amazed Alcatel still are in domestic market.. I thought they sold out). Set the express to join the wifi.. you do this in the airport utility.. old one is easy.. but in v6 you have to trust to luck so to speak and hope the auto setup works.. tell us if you have trouble.
    With the Express bridging.. you can then plug it by ethernet into the TC.. which will be in router bridge..
    ie
    You can then run the connection from wireless or ethernet on the TC.. and it will relay back to the alcatel for internet.. all a bit dodgy but who knows.. it may give you what you need.
    Wireless repeater is never particularly reliable in my experience. I would avoid it if possible.

  • How do i use the airport extreme to extend my wireless network

    How do i connected my airport extreme up to my existing network so that it can extend my wireless through out the house ??
    Can it be done wirelessly or do i need an ethernet cable thats about 10m ?
    Keith

    The AirPort Exteme can "extend" your existing wireless network (using wireless only) if it is being provided by another Apple router.
    If your current main router is not an Apple product, then you will need to plan to connect the AirPort Extreme to your router using an Ethernet cable.
    Post back for more information if needed.

  • How to extend the range of my Airport Extreme network by adding an Airport Express

    How to extend the range of my Airport Extreme network by adding an Airport Express?

    You have to make sure that the AirPort Express is in Factory Default Settings. If it is straight out of the box, it is ready to be configured.
    The instructions that I will provide are for using AirPort Utility 6.0, which you have.
    Locate the Express in the same room as the AirPort Extreme for the configuration. Power it up and allow a full minute for the Express to display a blinking amber light.
    Make sure that the wireless is turned on your Mac
    Open AirPort Utility 6.0 and look at the small rectangle in the upper left hand corner of the display. It should now read something like "Other AirPort Base Stations (1)"
    Click on the rectangle, and then click on the AirPort Express xxxxxx listing
    AirPort Utility will take a minute or two to analyze the settings on your network and then suggest that  the Express be configured to "Extend" your wireless network.
    Edit the Base Station name to your liking, then click Next in the lower right hand corner
    Allow a full minute or two let AirPort Utility do its work
    When you see Setup Complete, click Done at the lower right of the window.
    Now move the AirPort Express to a location that is approximately half way between the AirPort Extreme and the area that needs more wireless coverage.
    You should be in business.

  • All of a sudden the size of my text on my iPhone 5C is extremely large.  How do I reduce the size of the text?

    Al of a sudden my iPhone 5C has extremely large text size.  It's so large I cannot swipe, pinch or make it respond to any command.  Any suggestions on what happened, how to fix it and how to prevent it from happening again?

    Hi Marylane,
    Thank you for using Apple Support Communities. 
    Your description of the text being extremely large makes me think you have activitated the Zoom feature of Accessibility. See the following article and use the same command to disable Zoom as to enable it:
    To enable Zoom, use three fingers and double-tap the screen.
    To increase the level of Zoom, use three fingers to double-tap and hold, then move your fingers up or down on the screen to increase or decrease magnification.
    Use Accessibility features in iOS - Apple Support
    Cheers,
    Jeff D. 

  • Using Log Miner to find reason for extremely large archive logs.

    Hello everyone,
    I have an Oracle 10g RAC database that sometimes generates extremely large number archive logs. The database is in ARCHIVELOG mode.
    The usual volume of archive logs per day after compression is about 5GB, sometimes that spikes to 15GB and I cannot understand why.
    I am looking at gathering statistics based on the inflated redo logs via LogMiner.
    Looking at the structure of V$LOGMNR_CONTENTS - there are columns with promising names such as REDO_LENGTH, REDO_OFFSET, UNDO_LENGTH, UNDO_OFFSET.
    However all these columns are deprecated. http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_1154.htm
    Is there a way of identifying operations that generate large redo logs?
    The documentation for LogMiner has some example user sessions but none show how to generate statistics on the connection between redo logs and sql statements.
    I see nothing that can help me in the following views:
    V$LOGMNR_DICTIONARY, V$LOGMNR_DICTIONARY_LOAD, V$LOGMNR_LATCH,V$LOGMNR_LOGS, V$LOGMNR_PARAMETERS, V$LOGMNR_PROCESS, V$LOGMNR_SESSION
    These views plus the following columns sound somewhat promising:
    V$LOGMNR_CONTENTS -> RBABLK, RBABYTE, UBAFIL, UBABLK, UBAREC, UBASQN, ABS_FILE#, REL_FILE#, DATA_BLK#, DATA_OBJ#, DATA_OBJD#
    V$LOGMNR_STATS -> NAME , VALUE
    However I found nothing in the documentation on how to use them. (esp. not in Database reference, Database Utilities - the main documents I looked into). What should I read? Any strategies or ideas?
    Kind regards:
    al_shopov

    To find sessions generating lots of redo, you can use either of the following
    methods. Both methods examine the amount of undo generated. When a transaction
    generates undo, it will automatically generate redo as well.
    The methods are:
    1) Query V$SESS_IO. This view contains the column BLOCK_CHANGES which indicates
    how much blocks have been changed by the session. High values indicate a
    session generating lots of redo.
    The query you can use is:
    SELECT s.sid, s.serial#, s.username, s.program,
    i.block_changes
    FROM v$session s, v$sess_io i
    WHERE s.sid = i.sid
    ORDER BY 5 desc, 1, 2, 3, 4;
    Run the query multiple times and examine the delta between each occurrence
    of BLOCK_CHANGES. Large deltas indicate high redo generation by the session.
    2) Query V$TRANSACTION. This view contains information about the amount of
    undo blocks and undo records accessed by the transaction (as found in the
    USED_UBLK and USED_UREC columns).
    The query you can use is:
    SELECT s.sid, s.serial#, s.username, s.program,
    t.used_ublk, t.used_urec
    FROM v$session s, v$transaction t
    WHERE s.taddr = t.addr
    ORDER BY 5 desc, 6 desc, 1, 2, 3, 4;
    Run the query multiple times and examine the delta between each occurrence
    of USED_UBLK and USED_UREC. Large deltas indicate high redo generation by
    the session.
    hth
    Kezie

  • I have replaced my airport extreme with a new airport time capsule and want to know how I can set up my extreme to extend/strengthen my Wi-Fi?

    I have replaced my airport extreme with a new airport time capsule and want to know how I can set up my extreme to extend/strengthen my Wi-Fi?

    Start with a "hard reset" (see below) then use AirPort Utility to configure it.
    When asked what you want to do with it, indicate that you want it to add to an existing network, similar to the following screenshot.
    Follow the prompts that will eventually lead you to the words "wirelessly extend..." as shown.
    To "hard reset" an AirPort Base Station: make sure it's powered up, then press and hold its tiny reset button and keep it depressed for five to ten seconds, long enough for its LED to flash amber rapidly. Release the reset button. Then, the LED will glow amber steadily for about a minute. Then, it will flash amber, slowly, about once every second or two, waiting for you to configure it with AirPort Utility.

  • How do I setup my Airport Extreme so that I can extend the coverage of my existing AT&T wifi network?

    How do I setup my Airport Extreme so that I can extend the coverage of my existing AT&T wifi network?

    Start by establishing a permanent fixed Ethernet cable connection from one of the available LAN <-> ports on the ATT modem/router to the WAN "O" port on the AirPort Extreme.
    Ethernet cabling can be run up to 300+ feet or 100 meters, so you should be able to locate the AirPort Extreme exactly where it will be needed to provide more wireless signal coverage.
    Configure the AirPort Extreme to "create" a wireless network using exactly the same wireless network name, same wireless security setting, and same wireless network password that the ATT wireless is using.
    The final step is to insure that the AirPort Extreme is configured to operate in Bridge Mode, so it will work correctly with the ATT modem/router.
    If you need more specific steps, we need to know what operating system you are using on your Mac or PC. If you have a Mac and do not know which operating system it is using.....click the Apple icon in the upper left corner of the screen and then click About This Mac, and post back with the OS X version number that you see there.

  • How do I pause an iCloud restore for app with large amounts of data?

    I am using an iPhone app which is holding 10 Gb of data (media files) .
    Unfortunately, although all data was backed up, my iPhone 4 was faulty and needed to be replaced with a new handset. On restore, the 10Gb of data takes a very long time to restore over wi-fi. If interrupted (I reached the halfway point during the night) to go to work or take the dog for a walk, I end up of course on 3G for a short period of time.
    Next time I am in a wi-fi zone the app is restoring again right from the beginning
    How does anyone restore an app with large amounts of data or pause a restore?

    You can use classifications but there is no auto feature to archive like that on web apps.
    In terms of the blog, Like I have said to everyone that has posted about blog preview images:
    http://www.prettypollution.com.au/business-catalyst-blog
    Just one example of an image at the start of the blog post rendering out, not hard at all.

  • How do I extend my existent airport extreme network by addition of a 2nd airport extreme?

    How do I extend my existent Airport Extreme network by addition of a 2nd Airport Extreme?

    Can you clarify which version of the AirPort Extreme that you have now along with the model that you plan to use as the second device?
    The older "round" AirPort Exteme or the newer "square" version with rounded corners?
    Are you planning to extend using wireless only.....or by connecting the AirPort Extremes using a wired Ethernet connection?

  • Living in apartment, here it has only wireless (no wired cable in the room). I've  an airport express (new ) so how can I do for extending signal (wireless) for using in myroom

    Living in an apartment, here it has only wireless (no wired cable in the room) signal using for the internet connection. I've  an airport express (new) ,so how can I do for extending signal (wireless) for using in myroom. because the wireless signal is so weak.

    Unfortunately, you won't be able to. In order to do so, you would have to configure both the AirPort Express and the other wireless router for a WDS. Since it will unlikely that the other router is another AirPort, nor will you have the ability to administer it, you won't be able to get this accomplished.

Maybe you are looking for

  • YouTube videos no longer play on Macbook Pro

    I don't remember the exact time that this started but I keep getting "An error Occurred Please try again later".   W\hen I try to watch a  Youtube Video.  This happens on Safari and Firefox with Mavericks. I can watch some YouTube videos from other w

  • Giving your Macbook Pro a "paint job"?

    So I was thinking of giving my Macbook Pro a paint job. BUT - not for the whole body or with a different color - NO - I wanna remove my scratches which a "friend" gave me on the bottom of my Macbook a while ago. Hereby I wanna use a Dull Aluminum Col

  • Crystal Reports changes printer symbol set to ANSI

    Is there a setting somewhere that keeps Crystal from changing the symbol set on my printer to ANSI, so I can let it use the Internal default?

  • I cant login the blackberry app world

    I recently change for the Blackberry Tour to Blackberry Curve 9330.  Ive cant login the app world I keep receving a error stating "An error has occured. Please try again later..  Ive got to get in to get my bank app and other applications Ive already

  • Scroller horizontal flash builder 4.6

    Hi, I would like to realize an horizontal list that could be sliding with gesturepan or Other. The list elements can be clickable and open a new view Group, List ..... I don't know. Could you give me a direction or examples. Thanks in advance Regards