Custom OBJECT sizes and HTMLEditorKit

Hi there all, I have a fairly tricky problem that I'm in a rush to get fixed.
I need to know how to get a TextComponent (JTextArea etc) to wrap when being displayed as part of a web page in a JEditorKit.
Don't worry, I'm not writing a HTML editor, but am using HTML as a template for a report with the OBJECT tag being the point where the application inserts custom components. The problem I'm having is that when using JTextArea as one of these components the text doesnt want to wrap and just stays on one line. I tracked the problem to a preferredSize issue and the underlying layout not forcing sizing constraints on the text component, letting it just carry on, on the same line.
If anyone knows how to get the component to take its width from the parent component but specify its own height, help would be much appreciated.
Also on a similar note, the ideal solution to this would be to not to use Components at all but override the existing ParagraphView in the text.html package, but I need these View components to be able to show menus and things, which is why I opted for the Component aproach. If anyone knows of an easy way to get these Views to accept events then I think this would be preferable.
Hope that all makes sense :o)
Example:
<html>
   <head/>
   <body>
      <table width="100%">
         <tr><td>Created by <object classid="companyLogo" /></td></tr>
         <tr><td><object classid="companyMotto" /></td></tr>
         <!-- Some other stuff -->
      </table>
   </body>
</html>This template will display (in a JEditorPane) a table with the text "Created by " then the application will insert an image (the company logo), then the EditorKit will insert another row and the application inserts the company motto. But if the company motto is long then i want it to wrap onto another line, but instead it will just keep going off the edge of the page.
NOTE I am setting all sizes (pref, min and max) of the JEditorPane and it stays the same size but the text just carries on past the boundry and doesn't get painted.
Thanks for any help in advance.
deej

I fixed the problem, i forgot to put the setLineWrap(true) in there :$ oops. Found an interesting bug tho. Given the HTML :
<html><head /><body>
   <table width="100%">
      <tr><td>some text</td><td width="100%">some more text</td></tr>
      <tr><td colspan="2"><object classid="paragraph" /></td></tr>
   </table></body>
</html>I get a wierd resizing problem where the JTextArea i use to display paragraph resizes itself until it has only one line and goes off the side of the page. The only way i found to fix it so far is to place the second row into its own table. Not sure where this bug lies but it was fairly surprising when it first happened.
deej

Similar Messages

  • Want to make a report on Custom Object 4 and 3...what am i doing wrong?

    My Custom Object 4 has a field which refers to an item of type Custom Object 3. I want to write a report that shows What Custom Object 3 each Custom Object 4 is related to.
    So i went to the report builder, clicked the "Advanced Custom Objects" reporting, and made a really simple report that has:
    Custom Object 4: Name | Custom Object 3: Name
    When i preview it, it says "No Results". But that's not true. All my Custom Object 4 objects refer to a Custom Object 3 object. What's going on here? Can custom objects 4-15 not interact with 1,2, and 3 in reports?
    Thanks!
    -Kevin Green

    Hi, Yes, it is weird but that is how it is. May be fixed in next release. To hide the column, choose column properties -> column format tab -> Click the field "Hide this column"
    -- Venky CRMIT

  • Object Size and Position values not being retained

    Hi,
           I'm trying to set the size and position of a picture object in a report. This logo, should appear on the top right corner of the report.
    The margins of the report are Left - .79 in, Right - 0.79 in, Top - 0.79 in and Bottom - 0.39 in.
    The size of the picture object should be 1.574 x 0.79 inches.
    I have ensured that File -> Page Setup -> dimensions are in INCHES.
    I right click the logo and select 'Size and Position'.
    I set 'Y' (distance between top of object and top margin) = 0. This is to perfectly align the object with the top margin.
    Now, i set the height of the object = 0.79 inches. Ok the dialog and close.
    The strange thing happening is, when i re-open the size and position dialog, i see that the values i set are not being retained.
    0.79 becomes 0.810
    and
    0 become -0.010.
    What am i doing wrong here? How can i make sure the values i specify in the size and position dialog are  retained.
    Thanks.

    Ensure File | Options | Layout tab has the following UNMARKED!!!!
    Design View
      Guidelines
      Grid
    Preview
      Guidelines
      Grid
    Ensure that "Snap to Grid" is turned off.
    Make your grid size larger (.5 inches for example)
    What is occurring (I suspect) is that your objects are snapping to the grid - thus changing the position and possibly size due to the Snap to Grid being turned on.

  • Many to Many with Custom Objects 4 and up

    Hello,
    Pls. I need to define a new CO4 that will have a many to many relationship with Contact.
    From OD help pg.775 I understand that I should use another CO (f.ex. CO5) to be the intersection. Help file indicates how to rename the objects...and put them in the related info. section... but I don´t know what FIELDS (if any) I should define in the intersection CO5.
    Pls. Anyone could help ?
    Txs. a lot.
    Antonio

    Yes. You have to define them in CO5 Layout.
    You should see Name, Contact and Custom Object 04 (you may have renamed it). Not the Id field.
    Then when you add THE CO5 layout to Contact Related section, you can add new association between Contact and CO4.
    Don't forgot to enable the Access Profiles in Contact, CO4 and CO5.

  • Customizing page size and layouts

    Three topics:
    CUSTOM PAGE SIZE.  There have been lots of requests for the ability to set custom sizes.  One "easy" way would be to create page margins in the same way that padding allows cell margins.  This way, a user can create (for example) a 10.5x9.5 "page" on a 12x12 platform.  Particularly for those of us printing our own, it's one way to allow customization.  All of the built-in layouts would then have to be scaled to fit within the page margins.
    If this is done, the next logical extension would be to add a few common paper sizes to the Book Settings.  This way, a user could create virtually any page size.  For example 14W11H on a 13x19 sheet.
    COPYING LAYOUTS.  Would also be great to "copy-paste" layouts.  After I pick a starting layout and then adjust cell padding, move captions, change fonts, and so forth, I'd like to replicate that elsewhere.  In fact, I'm trying to create a left-page/right-page 11x11 on the 12x12 platform using cell padding, and it would be great to copy my customized "left-page" layout to all the left pages.
    HIGH-QUALITY PRINT YOUR OWN.  I've not yet tried printing via exported pdf on my local printer.  Will it be as high resolution and as well color managed as if I printed directly from the Print module?  I use icc profiles (some from vendors, some custom created) specific to each paper.  I've now spent a lot of time narrowing choices of dual-sided paper to print my own books and I don't want to lose that capability.

    Printing from the exported PDF. The quality I get is exactly just as good as printing any file directly.
    I have two methods but they are for my Mac system, but I guess you can interpret them if you are on windows.
    1 Set the desired parameters for the PDF in the book module (quality, profile to embed etc) and export to a folder
    2 import into Photoshop and adjust the parameters if necessary
    In Photoshop "save as" whatever file you wish which you can then print normally from PS or else import into LR and print with profiles from there
    3 Printing from the PDF by opening in Adobe Reader, setting Page Setup and then "file-Print"
       In Mac choose your paper preset, and under Copies and Pages drop down menu you can find print settings (color adjustment "off" etc.) and under color matching on Mac I choose Color Sync, and "Other Profiles"
    which shows me all my custom paper profiles
    Sorry for the long post
    Another simple way on the Mac is to <right click> or <Control click> on the PDF file and choose "Open with Preview" It's important to choose the correct color profile in the Book Module before exporting to PDF so that the correct profile is used in Preview

  • Problems with Custom Paper Size and Address Book

    I'm having some trouble printing from Address Book onto a custom paper size. I'm attempting to set up a notecard, and only print one at a time, rather than multiple columns as in the Labels option. The trouble is that when creating this small size, Address Book doesn't recognize it as anything other than a regular sheet of US Letter, and thus prints the address in the middle of the page.
    I have no problem printing envelopes, though, which seems odd because they too go in the manual feed for my printer. The notecards are similar width to the envelopes, but only about half the length.
    Has anyone else experienced problems with custom paper sizes printing improperly? I'm using an HP 4515 LaserJet, but have access to a few other laser printers. Thanks for any insight

    I have had the same problem, and with the same result; Adobe Tech Support can't help or fix, after 15 hours on phone, Level 2 support. It is a software bug Adobe has, and can't seem to fix.  I just upgraded to Lightroom CC, and my problem migrated with the upgrade.  I print in Photoshop fine.
    If you found an answer, I would appreciate  knowing how to do it!
    Thanks

  • Custom book sizes and "print guides"

    Anyone knows how to get "guides" on custom size books so that I can know where the trim line will be?

    You're not alone with this frustration. If you chose one of Apple's book themes then you can have a book for 20 to 100 pages.
    There are other book printers to consider and most have some kind of book making software. Different companies also offer different sizes. Some of them are Blurb, MyPublisher, Shutterfly, VioVio, Lulu, Digi-labs, Picaboo, PhotoBookPro.... There also are book printers for professional photographers and designers such as AsukaBook.

  • Custom button sizes and function

    I've read a lot of posts on custom buttons, but none address how to make my .psd pen button move from selection to selection. Also, for some reason, the pen appears, but it is very tiny. I made the pen a size of 720x480, used a mask and made it transparent. I just want the pen to move to whatever link I have on my main menu screen. And I can't get the pen to appear at each line link. Any ideas?

    The tutorial link in the previous post is what you want. Here's another one: http://forums.macrumors.com/showthread.php?t=134402 Scroll down a few posts and you'll see the steps.
    Basically, you've got to make another file, called an overlay in Photoshop (or GIMP). There ARE some buttons in DVDSP that will do what you want, but not all of them. You're looking for the buttons to be invisible until you select something.
    The "simple button" (I think it's called) will do this. Most of the buttons in DVDSP that look white in the shapes tab can be set to 0 opacity for the normal state, meaning invisible. There are others that aren't white colored as well, but you need to test them out.
    To test, I'd just do ahead and drag a button over, start with the square simple button. Drag it over to the menu. It should say button 1. Add text if you want and then click the button with the mouse so it's selected.
    Cycle through the various states, normal, selected, and activated, and note the color changes. Change the "normal" state colors in the button inspector so that it has a setting of 0 for opacity. If the button disappears then you're good to go. If it doesn't, then you need to use a different button then.
    You should really learn the photoshop overlay method though as it allows you to really customize your buttons and use any shape in the exact way you want. For one of my last menus, I had a menu overlay where the buttons where little martini glasses that moved from menu item to menu item. It is a very valuable skill to learn for DVDSP!
    Look in the zip file the previous poster uploaded. In there is an overlay file. Use that on your menu (but not the other files) and you'll see football shaped buttons appear whenever you select a button. This is what you want to do. Create an overlay with arrows in the appropriate locations. Even though you'll have many black arrows together, only one at a time will appear in DVDSP *** you select them.
    I hope I managed to clear it up a little and didn't confuse further!

  • Custom Page Size and PDF

    I am using CR 2008 (I have purchased it and the upgrade was well worth the cost); HOWEVER, it is not doing the same thing on my development environment as my server environment.
    I am using asp.net 2008 and in a web environment I am using a web form to create a CR document and show it as a pdf in a web browser.
    All of the forms work great and as expected.  I have a form that is a label 7/8" X 2 1/4 ".  In the development environment (vista 32), the web app pulls up the label and everthing works.
    When I move the code to my production envoroment (Windows Server 2003, asp.net 2.0)  The labels come up full screen.  This does not seem to be printer related as it work on a 8 1/2 X 11 ink jet printer in the dev enviroment.   The same machine using the same code over the Internet from the production site does not give me the same report.
    Any ideas or similar issues?
    Thanks

    Hello, David;
    The usual cause for this is not having access to the correct printer diver on the server.
    A web application may not have rights to the printer drivers folder.
    The correct printer driver for the network printer may not be installed to the server.
    If the application is loading a default printer driver, it may not have the ability to format the correct size.
    Our Modules utility is useful to compare drivers loading in each case.
    [Modules Utility|https://smpdl.sap-ag.de/~sapidp/012002523100006252802008E/modules.zip]
    Run our Modules utility on the working server when viewing a report through the browser. Save the resulting file as working.mdl.
    Do the same on the non-working server. Save that as nonWorking.mdl.
    I usually minimize it in the task bar until the application is running the report and then open it and choose File|New .... Modules in Memory.
    Elaine

  • Custom object classes and access rights

    Hi,
    I have added a few object classes to the NDS schema; objects
    belonging to one of them should be able to authenticate against the
    directory and retrieve some attributes. I managed the login part having
    the class inherit from ndsLoginAttributes, but if I login as the object
    itself, I can't retrieve any attributes. I can browse the entry (it's a
    container), but all I get are DNs and objectclass attributes. Is there a
    way to grant the object the right to retrieve its own attributes, or
    some of them, through the Java LDAP interface?
    Thanks,
    Juan
    jheguia
    jheguia's Profile: http://forums.novell.com/member.php?userid=84575
    View this thread: http://forums.novell.com/showthread.php?t=415769

    Hello,
    I found a solution which is *almost* the right one. Basically I
    deleted the class and created it again with a default ACL:
    X-NDS_ACL_TEMPLATES ( '2# subtree#[Self]#[All Attributes Rights]' )
    This allows the object to do as it pleases with its own attributes. I'd
    prefer it to be only able to read them, but I haven't found a syntax for
    ACLs. Is there anything I can read to see how to fine tune the access
    rights templates?
    Thanks,
    Juan
    jheguia
    jheguia's Profile: http://forums.novell.com/member.php?userid=84575
    View this thread: http://forums.novell.com/showthread.php?t=415769

  • Problem with custom book size and print to PDF

    I'm trying to create a 20 page 8x8 book which consists of 10 16x10 spreads. In other words, page 1 and page 20 are not start on the right and left respectively, there are exactly 10 16x10 spreads. This is a requirement for KISS wedding books. I am running into two problems:
    1. The album designer seems to be forcing me to have the first page consist of a single 8x8 page, even though the last page can consist of a 2 page spread.
    2. When I do print to PDF, I get 20 8x8 pages. If I change the paper size to 16x8, each 16x8 spread is followed by a single 8x8 repeat of the right side of the previous 16x8 spread. I could live with the 20 8x8 pages if there was an easy way to recombine these as 10 16x8 pages.

    PS: Since my edit timed out, I was going to add speculation of a way in
    ColorSync to enable or make Filters which could be used to save settings,
    at least for color and printer matching schemes, this is supported in PDFs.
    Not sure where I could take up where I left off to write a PS to my own post;
    since I had a few links to documents I found by doing some research reading.
    These may be related, but perhaps not directly enough to be of help.
    • ColorSync - Wikipedia (note info on settings, filters, printing pdfs)
    http://en.wikipedia.org/wiki/ColorSync
    • ColorSync on Mac OS X: TN 2035 (technical note detail)
    http://developer.apple.com/mac/library/technotes/tn/tn2035.html
    {And if you have Acrobat, the retail application, you likely have
    several other printing options unavailable to a reader app; in
    that PDF print settings may be encoded into a document.}
    In any event, I'm on my way out to talk to that neighbor's dog...
    (The one I mentioned in my timed-out post that had been
    barking up the wrong tree, while I was concentrating.)
    Good luck & happy computing!

  • JoinFieldValue function and custom object 4,5

    Hi,
    Can JoinFieldValue function be used for custom objects 4 and 5? If I want to update the Account field on custom object 5 based on the Account field in custom object 4, can this be done using JoinFieldValue ? How?
    Regards,
    Ani.

    Hi Ani,
    Currently JoinFieldValue is not supported in Custom Objects 04-15. You will have to use web services for Updating Account field on Custom Object 5 or else you can try the URL method to update the Account field .
    Thanks & Regards
    Sablok

  • Leads and its associations with Custom Objects 4-15

    I have been trying to create a Real time report with Lead associating with Custom Objects 3 and 5. But the report does not show up any data. I know that we cannot associate Custom objects 1,2 and 3 with Lead. I wanted to know if we can associate Lead with Custom Objects 4-15 or not ?

    Yes. You have to define them in CO5 Layout.
    You should see Name, Contact and Custom Object 04 (you may have renamed it). Not the Id field.
    Then when you add THE CO5 layout to Contact Related section, you can add new association between Contact and CO4.
    Don't forgot to enable the Access Profiles in Contact, CO4 and CO5.

  • Unable to Set Custom Paper size setting of 15 (width) x 12 (Height) using J

    Hi,
         I am unable to print the report using the custom paper size setting of  15 (width) x 12 (Height)  with printer friendly fonts so that we can print on Line or dot matrix printer.
         This problem is not solved from last 3 months and we dont get help anywhere.
         We are using Java with Crystal Report XI R2 design for the same. 
                           ITable table=null;
    DatabaseController dbCtrl=null;
    ReportClientDocument oReportDoc=null;
    try {
    String reportName=fileName;
    oReportDoc=new ReportClientDocument();
    oReportDoc.open(reportName,0);
    dbCtrl = oReportDoc.getDatabaseController ();
    rs=ad.sqlStringBigST(query);
    table = dbCtrl.getDatabase ().getTables ().getTable (0);
    dbCtrl.setDataSource (rs, table.getName(), "Runtimeres");
    Object oreportSource=oReportDoc.getReportSource();
    IReportSource reportSource=(IReportSource)oreportSource;
    PrintReportOptions printOptions = new PrintReportOptions();
    printOptions.setPrinterName("EPSON FX-2175 ESC/P");
    printOptions.setPaperSize(PaperSize.useDefault);
    options.setPaperSource(PaperSource.manual);
    oReportDoc.getPrintOutputController().printReport(printOptions);
    } catch (Exception e) {
    System.err.println(e.toString());
    Please let me know what is the solution for the same.
    Regards,
    Raj

    Hi,
        Yes i can understand that you need to first understand the root of the problem to give me the solution.
        I am here to answer to your questions until you understand what is the problem.
        Yes if i set the standard page size which are given in API doc , it sets up the page correctly.
        Following page size as given in the API doc works fine.
        http://devlibrary.businessobjects.com/businessobjectsxi/en/en/RAS_SDK/rassdk_java_api_doc/doc/rassdk_java_apiRef/com/crystaldecisions/sdk/occa/report/document/PaperSize.html
       It is rejecting the custom paper size and custom fonts (which in my case are printer friendly fonts).
    Regards,
    Rajshekhar SIpoy

  • Missing Image Size and Position Data

    In AI CS5 the size and position of an image were displayed in the top toolbar when you selected the image.  This is missing in AI CS6, how can I get it back?

    Well I did discover that what I need is called "Transform" but it's already checked in the menu you suggested.  In fact EVERY box is already checked in that menu, and checking or unchecking them from that menu has absolutely no affect on anything anyway. 
    I found that I can expand one of the menus from the right side, and the "Transform" box is there, and that's fine.  But that data (object size and position) was very useful when displayed on the top toolbar in CS5. Any idea how to make it appear in the top toolbar?  It will un-dock (and is very difficult to re-dock)

Maybe you are looking for

  • InDesign CS4 repeated crashes

    Hi We have been using InDesign CS4 for several months now, and suffer repeated crashes.  Our systems support contractors have looked at the network, and say its a software issue.  Running it on 2 PCs, Windows 7 OS. Initaially we thought it was networ

  • No horizontal scroll bar on the Jtable. In order to see long column.....

    No horizontal scroll bar on the tJable. In order to see long cell data we have to eliminate other columns of the table. I need an horizontal scroll bar on the JTable if the data in a cell is longer. Could somebody help me out? Thanks in advance.

  • WD4Abap and EP 6.o

    Hello, I'm new to WD4Abap and I have a question: Is it possible to integrate a WD4Abap (WAS 7.0) application into a Enterprise Portal 6.0 with WebDynpro IView for Abap? Thanks in advance, Thomas

  • ITunes reports the following on startup: "iTunes was not properly..."

    All of a sudden whenever I start iTunes it gives me an error message telling me that "iTunes was not properly installed. If you wish to import or burn CDs, you need to reinstall iTunes". I've read and did everything that other threads like this have

  • Icon view, icon position not kept

    Most of my files are displayed in icon view. I have group them in positions easy to remember. Since upgrading to SL every now and then a folder (or two) will have the icons ordered by name and positioned in a grid even if I haven't give that command.