Easy tutorial for interface Document?

Hi there!
I'm trying to set up a Document which consists of lines (like PlainDocument), which themselves consist of pieces of text who can either have the textcolor red or black. Looking at javax.swing.text.Document assumes that this would be the right way to go. I read the java tutorial and O'Reilly Java Swing, and I even took look at the source code of PlainDocument. However, unlike most other java classes, which are fairly reasonable, Document is verry confusing. To say it clearly: I do not understand at all how a customized Document can be set up in source code. I would appreciate any help or links where I can find easy understandable tutorials on how to use the Document interface.
Regards,
Heiner

Yes, I know that the plain document does not support these attributes. It was just an example for a document which consists of lines. And furthermore, I do know how to set attributes to pieces of text. Thats just the way I have implemented it right know. However, I have to store the information about colored text later. Since the Document interface does provide the feature to design a document which exactly consists of lines and black or red text, it seems reasonable to use it, instead of setting pieces of text with attributes and later on parsing the whole document character by character to retrieve the information.

Similar Messages

  • Best practice: interface for editing documents

    Hello
    I use IDeveloper 11g 11.1.1.3.0, ADF Faces
    I have got a task to create a web interface for editing documents.
    Every document have a head and a specification.
    Head have a lot of field, and every row in a specification have a lot of fields also.
    There are few PL/SQL procedures I need call to save document in the database, and I need to call them in the single transaction for it.
    So, I need to fill up all document and only after that save it to the database.
    For fill up some of fields I need to use component like List of Values (with autoSuggestBehavior and with selecting value from the list).
    There is next question: what is the best practice to develop interface like this?
    I had some troubles when I tried to use ADF BC.
    May be, there are tutorials?
    Will be very thankful for any advices or links.
    Anatolii

    Hello
    I use IDeveloper 11g 11.1.1.3.0, ADF Faces
    I have got a task to create a web interface for editing documents.
    Every document have a head and a specification.
    Head have a lot of field, and every row in a specification have a lot of fields also.
    There are few PL/SQL procedures I need call to save document in the database, and I need to call them in the single transaction for it.
    So, I need to fill up all document and only after that save it to the database.
    For fill up some of fields I need to use component like List of Values (with autoSuggestBehavior and with selecting value from the list).
    There is next question: what is the best practice to develop interface like this?
    I had some troubles when I tried to use ADF BC.
    May be, there are tutorials?
    Will be very thankful for any advices or links.
    Anatolii

  • 5 step easy formula for anyone to use webstart

    Hi,
    I want to know in easy 5 steps as to how you can fully program using java webstart.(I have to make a tutorial for this)
    eg
    1)make .java file.
    2)make .jar file
    3).jnlp file
    etc
    An example will be higly appreciated and thanked.
    Regards,
    Jimmy Thakkar

    If you want to know how java web start works, then I suggest you read this document:
    http://java.sun.com/products/javawebstart/docs/developersguide.html.
    The steps you take pretty much depend on what kind of security you want, but the main steps are:
    1. build your application
    2. put your application in one or more jar files
    3. digitally sign the jar files (optional depending on security)
    4. create your jnlp file
    5. put a link to your jnlp file in a web page
    Rhys

  • Open interface document - MTL_TRANSACTIONS_INTERFACE

    Hi,
    I'm looking for the open interface document related the MTL_TRANSACTIONS_INTERFACE (on hand quantities)
    Regards

    http://download.oracle.com/docs/cd/B40089_07/current/acrobat/120scmapi.pdf
    Regards
    Bilal SARIOZ

  • I'm looking for a document management system

    Hi there,
    I'm looking for a way to organize, sort, and make searchable about 1200 Microsoft Word Documents. The way our company uses them is to search for individual documents, and also to group them to create customized packets that are used for training.
    Once a group is created, I need a way to print easily. The other problem is that 60% of the documents are designed for learning so they have an instructors filled in part, and a learners blank part.
    Question 1: Should I separate each document, make the instructor version a separate file? Today, it is one file, with page 1 for the instructor and page 2 for the learner (some docs have more than one page.
    Question 2: Does anyone know of a web plugin or app that will take a collection of word documents, and automatically combine them into 1?
    2 years ago, we created a php searchable system and uploaded all docs into it. It workds pretty well for organizing, searching, grouping, and adding comments about the docs... BUT when it comes time to print, it only downloads a folder filled with all the SEPARATE word files. They are numbered, but because they are not one doc, page numbering is a bear, and each doc has a instructor and learner page... for printing, the trainer needs to tell the office staff which page to print for each handout. the instructor copy or leaner copy. Once a master is made, we photocopy it. So the question: Is there an easier way to create 1 file with all the pages? Like convert to PDF or to a single MS Word document?
    Any suggestions are welcome!
    PS: while we are an all mac shop, we do have a dedicated webserver running linux that we could use.
    PPS: I will have interns this summer, so if the solution involves converting all of our MS word docs into something else like pages, I'm all for it...

    It sounds to me like DevonThink might just replace the php system that you already have.
    One way to tackle this might be to look at automating the combining process, rather than changing the overall management system. Various thoughts:
    If the docs were pdfs, a program like CombinePDFs would let you drag and drop all the files onto a screen, re-order them if necessary, and then hit Merge (actually, I think Preview would let you do this, in Leopard). That might help. However, I don't think it would put on page numbers.
    I'm pretty sure Acrobat would let you combine the PDFs and add page numbers, or perhaps take the combined pdf file and just add page numbers to that. (Not sure if this might require Acrobat for Windows)
    Alternatively, you could tweak the docs themselves so that they use a form of chapter numbering, eg: "PDF Introduction-1, PDF Introduction-2" and "PDF-Advanced-1, PDF-Advanced 2" and then not worry about the page numbers. I wouldn't exactly recommend this, as it's pretty useless to say "turn to page PDF-Intermediate 3" and have people find that page, but it's been done.
    Since they are already Word docs, though, it might be best to stick with Word. Word 2008 has Automator and Applescript, and it should be possible to write an Automator or Applescript such you just drop the documents on an Automator app, and it combines them, adds or updates the page numbers, maybe creates a Table of Contents, and spits out an assembled document.
    That said, I don't know how to do that. There is a Combine Word Documents automator action, certainly. You could try asking over in the Word forums:
    http://www.officeformac.com/ProductForums/Word/
    Or here's a macro that should work in Word 2004 (but not 2008)
    http://www.gaebler.com/How-to-Combine-Multiple-Word-Documents-into-One-Document. htm
    This will work best if all the docs are formatted consistently, based on the same template. If they are not consistently formatted, then the formatting will probably change when you combine them in Word, and that would be an argument for converting them to PDF before combining them. It should also be possible to create an Automator action that will convert all the docs in a folder to PDF.
    I doubt there is going to be anyway to automate the instructor/learner copy--someone will have to do that manually, but it does suggest that if you create separate files for each one, it will be easier to do the search, download the found files from the resulting folder, and then manually just delete the learner file from the folder rather than having to open up the instructor file and delete part of it.
    So, some potential experiments to try. Hope that helps.
    Automator to convert the docs to PDF and then Acrobat to combine and number the pages might be your best bet.

  • Exit/Badi for Accounting Document

    Dear Friends
    Is there any user exit/BADI for accounting document. My requirement is quite simple which you would also faced in many implimentation. Client wants number ranges business area/plantwise. I was just thinking as plant/business area is a line item field it may be little difficult to have different number range controll at that level, so I thought we could use user id as the import parameter. But these is possible once I get any user exit/badi for number range change. We dont want to create so many document type also.
    Thanks and Regards
    Pankaj Gupta

    Hi Marta,
    Check these notes
    SAP Note 1259505 - FAQ: New cancellation procedure in SD,
    SAP Note 400000 - FAQ: Transaction VF11: Cancellation of SD billing documents
    See with attention note 1259505 question 4. It says
    Most of the userexits in the SD-FI interface (see note 301077) will not be
    performed.
    So, try to do it with BTE's
    Sorry, try with USEREXIT_PRICING_COPY in program RV61AFZA.
    I hope this helps you
    Regards
    Eduardo
    Edited by: E_Hinojosa on Nov 21, 2011 9:15 AM

  • Problem with 'install credential for Adobe Document Services'

    Hi Folks,
      I am trying to install credential for Adobe Document Services but I have got problem with some facts that are explained in tutorial how to install credential.
      1. I do not have directory persistentcom.adobe~Trust.. under my directory server0
      2. where to find 'filename.pfx'?
      3. I do not have Document Services Configuration in my visual Administration tool
      The tutorial that I am trying to do is located on <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/installing%20adobe%20document%20services%20credentials.pdf">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/installing%20adobe%20document%20services%20credentials.pdf</a>
      So if someone can help me how to overcome this problem I would be very thankful.
       Kind Regards to all.
    Aleksandar

    Hi Sharadha,
    You could go to SAP Software Distribution Center with in SAP Market place . You could search for adobe ther in S/W search . It will list all the available Aobe designer. Latest version is ADOBE LIVECYCLE DESIGNER 7.1   .
    regards

  • [CS5 Win] Switching to InDesign is slow in CS5 for certain documents. XML links?

    Hi,
    I put this question in the scripting part, since you might be the ones to notice such things as this, and it might relate to importing XML by scripting. Also I got no positive response in one of the other forums, "complaining" about the sluggish performance redrawing the interface when setting focus to InDesign CS5. But now I can more clearly see that it is not slow for all documents.
    Having certain documents open in InDesign CS5 makes it very slow to switch to. The CPU peaks at 80-100% and it takes about a second or two until InDesign responds.
    The documents do not necessarily need to be large in size, but it appears that it mostly occurrs on documents that I've imported data to (or that our customers have), using our own code, which takes care of an XML file and portions it out into templates.
    One strange thing I just noticed was that selecting "relink all" by alt-clicking the relink button in the Links palette, makes InDesign look for (presumalbly) previously imported XML files. How can that be?
    I never store any links to the imported XML - as far as I know. Where should I look for that kind of links?
    How and why would previously imported XML file paths be stored? I just import the XML into the structure, "deal with it", and deletes the node that it was imported to. (The data is left in a structure that I build up myself.)
    Does anyone know if there is a change related to any of the facts stated above, in InDesign CS5?
    I'll attach a screen shot of the links dialogue (above), when it "looks for" an XML file. Could this kind of "missing file" cause the abovementioned "slowness" every time switching to InDesign from another application?
    (InDesign documents that don't relate to XML doesn't make switching to InDesign slow - but it gets slow when such a document is loaded, even under a tab that is not in focus.)
    Best regards,
    Andreas

    I've uploaded a video to demonstrate that InDesign sometimes can keep references to links:
    http://www.youtube.com/watch?v=OoQOSIlfYl4
    It's obvious that there are thousands of "orphans" in the documents. All XML files ever imported are kept in some way... The links (or the names of them) are obviously not removed from the document when deleting the Element in the XML Structure. Since the communication of the code with a database is built around XML import, the number of imported files is very large.
    Can these orphaned link references somehow be removed? When manually checking for missing files, InDesign loops though all of the XML files as seen in the YouTube video above, but ends up saying that there are no missing files. The next time I do the same check, all links are looped through again.
    Perhaps we should "link to file", using .xmlImportPreferences.createLinkToXML = true
    This propery has not been explicitly set, and therfore = false. But is there any way to get rid of all the old link names that's inside the document somehow?
    CS4 does the same thing, but there is "no 2 second lag time" switching from another application to InDesign CS4 with this kind of document open.

  • Error: No universe found for this document in the CMC

    Hi,
    We have a universe which drives around 45 Web Intelligence reports in Business Objects XI R2.
    Recently, when I made changes in the universe and tried to export it, the Designer interface hung and further it was found that the universe file got corrupted for some reason.
    Now, the administrator deleted the universe from the CMC and exported a copy of the same universe that I had saved on my local machine before exporting. He was successful in doing so. However, when the associated Webi reports are accessed, an error message " Some objects are no longer available in the universe. Error 10001 Error INF" is displayed.
    In the CMC, FOLDERS> Report Properties > Universe: shows - " No document found for this document"
    I know we are missing out on something simple. Any pointers will be extremely helpful.
    Many thanks!!

    I beleve there was a unique identifier for the old universe.  You could probably restore from an old cms database backup and filestore backup to get it back that way.  The other (probably better option) would be to go into the webi documents themselves and specify the universe there.  I believe XIR2 had this functionality although I don't recall for sure when it was introduced (may have been 3.x).  There may be some other alternatives, these are the few that came to mind initially.  Good luck!

  • How to add a default user group for multiple document type's?

    Hi,
    I am trying to add same default user group for different document types when MA is created. Is there any way to setup using a single "Document Security Template"? Or I need to create different templates for different document types?
    Please confirm.
    Thanks,
    Saloni

    Hi Saloni,
    Based on what your specific requirement, it might be easier to do it with scripting.
    If you are doing it using Document Security Templates, you would have to create a Document Security Template for each of the 6 MA types and assign the default group. Create another one and leave the Document Type field blank, so it will apply to the other 4 MA types that don't have a default group.
    Regards,
    Vikram

  • Need Tutorial for Simple Voice Recording

    I'm running for public office, and a local newspaper invited me to submit a statement along with a MP3 audio file. I asked a question on another forum about software that can be used to make MP3 files on a Leopard platform, and I was told to use GarageBand.
    I viewed the video tutorial for Podcasts and also checked out another Apple tutorial, but they don't go very far. In contrast, GarageBand 3: Getting Started is overwhelming.
    I would like to start by making a very simple audio - nothing more than a two-minute recording of my voice, with no overlaid music, no images, loops or other enhancements.
    Can anyone list the steps I need to follow, from recording my speech to converting it to an MP3 file?
    I've cliked the Male track, recorded my voice, stopped the recording (though probably incorrectly), then double-clicked on the file to play it back, but nothing happens.
    Thanks.

    It's very easy:
    • Create a "real instrument" track and select a voice preset or no effects at all.
    • Hit "record" to record your voice, hit the record button again or the stop button to stop recording.
    • Move the playhead to the appropriate position for playback.
    • If you like your recording, select "Share to iTunes" from the menu and select compression with MP3.

  • Adobe DPS - pop-up panels video tutorial for Indesign Digital Magazine problem?

    Hello Everyone
    Trying to get info in a video tutorial for pop-up panels tutorial for a Digital Magazine I'm working on.
    Had advice to do a Multi-State Object - but this is exactly what I need it for and would love a video link i(f any is around).
    Doing a digital Tech Magazine - have about 12 images on a page.
    Want to touch one image and want a pop-up text box with Tech info on this product come up - I want all other images on page to ghost out on doing this - and then I need a button to click to close the panel down and go back to document and ready to click on another picture.
    Is there a tutorial online on how to do this. Hope someone has a link pleaae.
    thanks: Daz

    Here's the best way to attack this as a beginner.
    Create multipage InDesign file with number of pages being equal to the
    number of states you want for your MSO.
    On the first page design the base state. Copy/paste everything to the second
    page and now design the second state.
    On and on until you're done. Now group everything on each page and
    copy/paste in place everything into one page. Create the MSO.
    This is going to give you a pretty heavy file but will give you a good
    foundation for the thought process needed to do this.

  • Bapi for parking documents

    Hello!
    Does anyone know a BAPI for parking documents that works ok? (in spanish we call "documentos apartados")
    I have read about it on the internet and it seems that there is no bapi for it.
    I have found bapi for preliminars.... but nothing about parking.
    Thanks you in advance!
    Sabrina.

    Hi,
    If I understand your requirement correctly, you can use BAPI 'BAPI_ACC_GL_POSTING_POST' to park the FI documents. Fill the required interface parameters and call this BAPI.
    Let me know if the requirement is different.
    Regards
    Gangadhar

  • Inbound Idoc for material document cancellation

    Hello,
    Could you update me whether there is any Inbound Idoc type available for material document cancellation (like t.code MBST).  I found message type MGBMCR, but it's only allowing me to create the material document like GRs but not cancellations.
    /Mallik

    To my knowledge, there is no such IDoc. Cancellation is an exceptional situation and should be treated as such. If one needs an IDoc interface for cancellations, I'd have to say there is something very wrong with the business process.

  • How can I save zoom setting for a DOCUMENT so it opens at that setting?

    I find an optimal zoom setting for a document I'd like to use (say 42%) and want the document to open at that setting.  I save the document with File>Save Copy.  However when I open the document, it opens at the DEFAULT zoom setting set in the Preferences for program.  If I change the zoom level here to what I desire for that document, obviously all documents will open at that default setting.
    How can I save my desired zoom level for a document, which will most likely be different for EACH document, and have the saved document open at that setting?
    This seems like a trivial exercise / feature that should be easy to implement BOTH by the programmers of the software and the user setting the zoom level.
    Also, I want to suppress the bookmarks sidebar.  I save without the bookmarks but the documents opens with the side bar.  Can't THIS be set for each document?
    Why is it so difficult to tailor the viewing of a document to exactly what the viewer wants?

    OK.  Sorry for the mistake in posting the question here.
    Again it seems like it should be trivial to save a document in the Reader with a viewer's desired zoom setting.  I find this very helpful as I like to use a zoom setting that when scrolling down the document only one full page of the document is viewed (like turning the pages of a book).  Without this feature, partial pages are displayed when scrolling unless one experiments to find the correct zoom setting (often it is 60%).  One must do this every time one opens the same document, unless one remembers the zoom setting.
    Oh well ....

Maybe you are looking for

  • How To Retrieve All Data From a Submitted h:dataTable ... ?

    I have a table together with a button displayed in the browser. Upon click on the button, an action is invoked. I would like to retrieve the data in the entire table in this action. Because the displayed table is created by a managed bean class ListA

  • If I can buy apps on the iPhone 4, and then I want the same apps I bought it in the new iPhone that I have. Can or not?

    If I can buy apps on the iPhone 4, and then I want the same apps I bought it in the new iPhone that I have. Can or not?

  • Unable to enter to user Privilege EXEC Mode with catalyst 1900

    Hello I am setting up some lab network . I have 10  Cisco 1900 series switches . But when i try to power up it shows the below message. I am not able to get into user privilege mode. Catalyst 1900 Management Console Copyright (c) Cisco Systems, Inc. 

  • Create Task Error

    Users are getting a Create Task Error. This occurs when a User tries to submit the init form multiple times without actually going and filling the Forms that is assigned to them when the Init form is submitted..Anyone faced a similiar issue and has t

  • HOW TO CREATE TAX CODE IN FTXP ?

    Dear All ,                          pl help me to maintain tax code in FTXPin step by step manner,  , & i have to use cond type as  JVRD , ZSRT, ZEX3 , ZES3 so how i can club these cond with this tax code , i want all the necessary inputs for this it