Word Wrap after tagging

Hello all,
we have a problem mit the hypernation, when tagging a text.
There is a pharagraph with different fonts (Univers and UniversCE).
We use that document with a plug-in tagging different words.
In that paragraph the hyphernation after tagging is wrong.
There ist a reflow in the paragraph.
Here's the phrargraph before tagging
And here after tagging
Can someone help me with that?
I don't think that tagging should reflow the pharagraph
Thanks for help!
Regards,
Michael

Googling for "minimal java browser" turns up one open-source alternative and one commercial alternative that appears to be in open beta.
The installation process for third-party applications is detailed, in several different variants, in tutorial A70 - How to Deploy and Distribute Applications.
I have not personally attempted this process, but would be interested in trying it out for experience's sake.
-Chris

Similar Messages

  • Resizing ListCellRenderers using JTextArea and word wrap

    Hi,
    I'm trying to create a ListCellRenderer to draw nice cells for a JList. Each cell has a one line title and a description of variable length. So, I create a custom ListCellRenderer, which consists of a JPanel containing a JLabel for the title and a JTextArea for the description. I set the JTextArea to do wrapping on word boundried and it all almost works.
    But, the list cells don't resize to accomodate the variable height of the cells. They show only 1 line for the title and 1 line for the description.
    I have seen a few threads relating to this including the article, "Multi-line cells in JTable in JDK 1.4+" in the Java Specialists' Newsletter, which seems to do a similar trick for JTables. But so far nothing I've tried works.
    Curiously, using println debugging, my getListCellRenderer method seems to get called for each cell twice while my GUI is being drawn. It looks to me like the TextUI view that draws the JTextArea seems to do the word wrapping after the first set of getListCellRenderer calls. But, it's the first set of calls that seems to establish the layout of the list.
    Any help would be appreciated. I've pulled out quite enough hair over this one.
    -chris
    package bogus;
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.Font;
    import java.util.ArrayList;
    import java.util.List;
    import javax.swing.*;
    public class CellRendererTest {
         public static void main(String[] args) {
              final CellRendererTest test = new CellRendererTest();
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        test.createGui();
         public void createGui() {
              JFrame frame = new JFrame("Testing Bogus ListCellRenderer");
              JList list = new JList(createBogusListItems());
              list.setCellRenderer(new MyListCellRenderer());
              frame.add(list);
              frame.setSize(200, 400);
              frame.setVisible(true);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         private MyListItem[] createBogusListItems() {
              List<MyListItem> items = new ArrayList<MyListItem>();
              items.add(new MyListItem("First item", "This is a nice short description."));
              items.add(new MyListItem("Another one", "This is a longer description which might take up a couple of lines."));
              items.add(new MyListItem("Next one", "This is a ridiculously long description which is total gibberish." +
                        "Blah blah blabber jabber goo. Blither blather bonk. Oink boggle gaggle ker-plunk."));
              items.add(new MyListItem("No Desc", null));
              items.add(new MyListItem("Last one", "Boink!"));
              return items.toArray(new MyListItem[items.size()]);
         static class MyListCellRenderer extends JPanel implements ListCellRenderer {
              private JLabel title;
              private JTextArea desc;
              // hack to see if this is even possible
              private static int[] rows = {1, 2, 3, 0, 1};
              public MyListCellRenderer() {
                   setLayout(new BorderLayout());
                   setBorder(BorderFactory.createEmptyBorder(6, 4, 6, 4));
                   setOpaque(true);
                   title = new JLabel();
                   title.setFont(new Font("Arial", Font.ITALIC | Font.BOLD, 11));
                   add(title, BorderLayout.NORTH);
                   desc = new JTextArea();
                   desc.setFont(new Font("Arial", Font.PLAIN, 9));
                   desc.setOpaque(false);
                   desc.setWrapStyleWord(true);
                   desc.setLineWrap(true);
                   add(desc, BorderLayout.CENTER);
              public Component getListCellRendererComponent(JList list, Object value,
                        int index, boolean isSelected, boolean cellHasFocus) {
                   MyListItem item = (MyListItem)value;
                   title.setText(item.title);
                   if (item.description != null && item.description.length() > 0) {
                        desc.setText(item.description);
                        desc.setVisible(true);
                   else {
                        desc.setVisible(false);
                   // uncomment next line to to somewhat simulate the effect I want (hacked using the rows array)
                   // desc.setRows(rows[index]);
                   if (isSelected) {
                        setBackground(list.getSelectionBackground());
                        setForeground(list.getSelectionForeground());
                   else {
                        setBackground(list.getBackground());
                        setForeground(list.getForeground());
                   return this;
         static class MyListItem {
              String title;
              String description;
              public MyListItem(String title, String description) {
                   this.title = title;
                   this.description = description;
    }

    This seems to work
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Font;
    import java.awt.Insets;
    import java.util.ArrayList;
    import java.util.List;
    import javax.swing.*;
    import javax.swing.text.View;
    public class CellRendererTest {
         int WIDTH = 220;
         public static void main(String[] args) {
              final CellRendererTest test = new CellRendererTest();
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        test.createGui();
         public void createGui() {
              JFrame frame = new JFrame("Testing Bogus ListCellRenderer");
              JList list = new JList(createBogusListItems());
              final MyListCellRenderer renderer = new MyListCellRenderer();
              list.setCellRenderer( renderer );
              JScrollPane listScrollPane = new JScrollPane(list);
              frame.add(listScrollPane);
              frame.setSize(WIDTH, 400);
              frame.setVisible(true);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         private MyListItem[] createBogusListItems() {
              List<MyListItem> items = new ArrayList<MyListItem>();
              items.add(new MyListItem("First item", "This is a nice short description."));
              items.add(new MyListItem("Another one", "This is a longer description which might take up a couple of lines."));
              items.add(new MyListItem("Next one", "This is a ridiculously long description which is total gibberish." +
                        "Blah blah blabber jabber goo. Blither blather bonk. Oink boggle gaggle ker-plunk."));
              items.add(new MyListItem("No Desc", null));
              items.add(new MyListItem("Last one", "Boink!"));
              items.add(new MyListItem("Ooops this one breaks things by being longer than my fixed width", "Blabber babble gibber flipper flop."));
              return items.toArray(new MyListItem[items.size()]);
         static class MyListCellRenderer extends JPanel implements ListCellRenderer {
              public JLabel title;
              public JTextArea desc;
              Color altColor = new Color(0xeeeeee);
              public MyListCellRenderer() {
                   setLayout(new BorderLayout());
                   setBorder(BorderFactory.createEmptyBorder(6, 4, 6, 4));
                   setOpaque(true);
                   title = new JLabel();
                   title.setFont(new Font("Arial", Font.ITALIC | Font.BOLD, 11));
                   add(title, BorderLayout.NORTH);
                   desc = new JTextArea();
                   desc.setFont(new Font("Arial", Font.PLAIN, 9));
                   desc.setOpaque(false);
                   desc.setWrapStyleWord(true);
                   desc.setLineWrap(true);
                   add(desc, BorderLayout.CENTER);
              public Component getListCellRendererComponent(JList list, Object value,
                        int index, boolean isSelected, boolean cellHasFocus) {
                   Insets insets = desc.getInsets();
                int rendererLeftRightInsets = insets.left + insets.right + 8;  // 8 from panel border
                int topDownInsets = insets.top + insets.bottom;
                int listWidth = list.getWidth();
                int viewWidth = listWidth;
                   int scrollPaneLeftRightInsets = 0;
                   JScrollPane scroll = (JScrollPane) SwingUtilities.getAncestorOfClass( JScrollPane.class, list );
                   if ( scroll != null && scroll.getViewport().getView() == list ) {
                        Insets scrollPaneInsets = scroll.getBorder().getBorderInsets(scroll);
                     scrollPaneLeftRightInsets = scrollPaneInsets.left + scrollPaneInsets.right;
                     listWidth = scroll.getWidth() - scrollPaneLeftRightInsets;
                     JScrollBar verticalScrollBar = scroll.getVerticalScrollBar();
                     if (verticalScrollBar.isShowing()) {
                         listWidth -= verticalScrollBar.getWidth();
                     viewWidth = listWidth - rendererLeftRightInsets;
                   MyListItem item = (MyListItem)value;
                   title.setText(item.title);
                   if (item.description != null && item.description.length() > 0) {
                        desc.setText(item.description);
                        desc.setVisible(true);
                        View rootView = desc.getUI().getRootView(desc);
                     rootView.setSize( viewWidth, Float.MAX_VALUE );
                    float yAxisSpan = rootView.getPreferredSpan(View.Y_AXIS);
                        Dimension preferredSize = new Dimension( viewWidth, (int)yAxisSpan + topDownInsets );
                        desc.setPreferredSize( preferredSize );
                   } else {
                        desc.setVisible(false);
                   title.setPreferredSize( new Dimension( viewWidth, title.getPreferredSize().height ) );
                   // uncomment next line to to somewhat simulate the effect I want (hacked using the rows array)
                   //desc.setRows(rows[index]);
                   if (isSelected) {
                        setBackground(list.getSelectionBackground());
                        setForeground(list.getSelectionForeground());
                   else {
                        if (index % 2 == 0)
                             setBackground(altColor);
                        else
                             setBackground(list.getBackground());
                        setForeground(list.getForeground());
                   return this;
         static class MyListItem {
              String title;
              String description;
              public MyListItem(String title, String description) {
                   this.title = title;
                   this.description = description;
    }

  • Word wrap problems in 36.0

    When entering text into a web form the text no longer "wraps" at the end of the box. The first part of the text runs off the left side. It is working fine in THIS text entry box but is now a problem on some other sites.
    See: http://www.thedirectoryclassifieds.com. Start placing a listing and then start entering text into the description box. Once you reach the end of the line the text does not wrap, just runs off the left side as typing continues. After this testing, just exit (back out) without continuing placing the listing.
    When encountering this problem I did a test on another computer that had 35.0.1 and word wrapping worked fine. Then I upgraded to 36.0 on that computer and now the problem is there too.
    So this definitely means a problem with 36.0 as it wasn't there in earlier versions.

    That particular form control has:
    &lt;textarea id="main_description" name="b[description]" '''style="white-space: pre;"''' class="editor field">&lt;/textarea>
    For the first time in Firefox 36, the white-space property is being honored for textarea controls. So there's your trouble: "pre" means Firefox should emulate the preformatted tag, which requires manual line breaks.
    It would be great if you can convince the site to change this to:
    &lt;textarea id="main_description" name="b[description]" '''style="white-space: pre-wrap;"''' class="editor field"></textarea>
    which is supported by all modern browsers (per the compatibility table here: [https://developer.mozilla.org/docs/Web/CSS/white-space#Browser_compatibility]).
    But that likely will take some time, so what is the best short-term workaround? I need to think about that a bit.
    To manually hack this form control, you can right-click it and choose Inspect Element (Q). This should open the web console to the Inspector in the lower part of the tab. Firefox should highlight the HTML tag I listed first above, and on the right, show the style rules for it. Under "This Element" you can uncheck the box for that rule to have the textarea styled using default rules. But you would need to do this after each time you load the page, which is a hassle.

  • How can I turn off word wrap in the View Source output?

    I'm trying to extract HTML from Word and one way to do that is to save the Word file as a .htm file and then View Source in a browser and copy that. But the words are wrapped in the View Source file. I want each paragraph to be all on one line. Is there a setting for the View Source feature that will turn off word wrap?
    Once I have that done and copied into a plain text editor, I will use Search>Replace to get rid of all the stuff Word puts there and just end up with the simple paragraph tags at the end of each paragraph, all on one line.

    You can disable wrapping and syntax highlighting in the View menu in the Edit > View Source window.

  • Read Only TextAreas with Carriage Return, Line Breaks and Word Wrapping

    Hi all,
    I know there are a few posts around this subject but I cannot find the answer to the exact problem I have.
    I have a page that has a 'TextArea with Character Counter' (4000 Chars) that is conditionally read only based on the users credentials (using the 'Read Only' attributes of the TextArea item).
    When the field is editable (not Read Only) everything works fine but when I make the field Read Only I start to have problems:
    The first problem is that the Carriage Return and Line Breaks are ignored and the text becomes one continuos block. I have managed to fix this by adding pre and post element text of pre and /pre tags. This has made the Carriage Return and Line Breaks word nicely and dispaly correctly.
    However, it has introduced a second problem. Long lines, with no Carriage Returns or Line Breaks, now extend to the far right of the page with no word wrapping, making my page potentially 4000+ characters wide.
    How can I get the field to be display only, with recognised Carriage Returns and Line Breaks, and Word Wrapping inside a fixed width of, say, 150 characters?
    Many thanks,
    Martin

    Hi,
    Just a cut and paste of yours with the field name changed:
    htp.p('<script>');
    htp.p('$x("P3_COMMENTS").readonly=true;');
    htp.p('</script>');I also have the following in the page HTML Header, could they be conflicting?
    <script type="text/javascript" language="JavaScript">
    function setReleaseToProd(wpTypeCode){
       //setReleaseToProd($v(this))
      var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=set_release_to_prod',0);
      get.addParam('x01',wpTypeCode);
      gReturn = get.get();
      if(gReturn) {
         $s('P3_RELEASE_TO_PROD',gReturn);
      get = null;
    </script>I am a long way from knowing much about Javascript (this page code was written by someone else) so all help is much appreciated.
    Martin

  • Force word wrap in JTextPane (using HTMLEditorKit)

    Hi!
    I have a JTextPane on a JScrollPane inside a JPanel. My text pane is using HTMLEditorKit.
    I set the scrolling policies of my JScrollPane to: JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED & JScrollPane.HORIZONTAL_SCROLLBAR_NEVER.
    I did not find in JTextPane�s API any relevant property I can control word-wrapping with (similar to JTextArea�s setLineWrap) and I have tried a few things to force word-wrapping but nothing worked...
    What happens is my text is NOT being wrapped (even though there is no horizontal scrolling) and typed characters (it is an enabled editable text componenet) are being added to the same long line�
    I�d like to force word-wrapping (always) using the vertical scroll bar whenever the texts extends for more then one (wrapped) line.
    Any ideas?
    Thanks!!
    Message was edited by:
    io1

    Your suggestion of using the example only holds if it fits the requirements of the featureDid your questions state anywhere what your requirement was?
    You first questions said you had a problem, so I gave you a solution
    You next posting stated what your where currently doing, but it didn't say it was a requirement to do it that way. So again I suggested you change your code to match the working example.
    Finally on your third posting you state you have some server related issues causing the requirement which I did not know about in my first two postings.
    State your problem and special requirments up front so we don't waste time quessing.
    I've used code like this and it wraps fine:
    JTextPane textPane = new JTextPane();
    textPane.setContentType( "text/html" );
    HTMLEditorKit editorKit = (HTMLEditorKit)textPane.getEditorKit();
    HTMLDocument doc = (HTMLDocument)textPane.getDocument();
    textPane.setText( "<html><body>some long text ...</body></html>" );
    JScrollPane scrollPane = new JScrollPane( textPane );If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

  • DataGrid, HTML Text, and WORD WRAPPING

    I have a datagrid, with 2 columns:
    - comment
    - date
    The dataprovider that feeds the datagrid is an array
    collection, with each object containing the following fields:
    - comment
    - date
    - viewed
    What I want to do is BOLD the comment cell if the comment has
    not yet been viewed. What I first tried doing was to just insert
    the <b></b> tags on the server and then feed them up to
    Flex. So here's the code that I had tried to do this with:
    <mx:DataGridColumn>
    <mx:itemRenderer>
    <mx:Component>
    <mx:HBox>
    <mx:Label htmlText="{data.comment}" />
    </mx:HBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    This works, but I lose the word wrapping for long comments (I
    have wordwrap="true" defined on my DataGrid).
    Then I tried changing my approach and doing something a
    little more simple to try and preserve the word wrapping, like
    this:
    <mx:DataGridColumn dataField="comment" width="100"
    wordWrap="true" fontWeight="{(data.viewed==0 ? 'bold' : 'normal')}"
    />
    Yet that doesn't seem to work either, it appears to just
    completely ignore everything... no bolding whatsoever.
    So my question is: what's the best to to control the BOLDING
    of a DataGrid cell while at the same time retaining the word wrap
    features?
    Thanks,
    Jacob

    <mx:DataGridColumn>
    <mx:itemRenderer>
    <mx:Component>
    <mx:HBox>
    <mx:Label htmlText="{data.comment}"
    wordWrap="true" height="100%"/>
    </mx:HBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    You might also have a little more luck working with a
    TextArea

  • Word Wrapping JLabel

    I'm having trouble getting JLabel's to word wrap. I've tried using html tags. Is there any way I ca do this? What I'm trying to do is read in from a file, get Questions and Answers, and display quesitons and answers to a JLabel using setText(). The dimensions are (400, 450) but even with html tags on the text I'm setting, it just runs right off the panel.
    Any suggestions would be much appreciated.
    Thanks,

    Below is my JTextArea. As you can see I have it set for 2 rows and 40 col. When I run the program, it's still just one line of text straight off my panel.
    Do you see anything I'm missing here?
                quesJTextArea = new JTextArea("",2,40);
                quesJTextArea.addMouseListener(this);
                quesJTextArea.setLineWrap(true);
                quesJTextArea.setWrapStyleWord(true);
                quesJTextArea.setEditable(false);
                quesJTextArea.setBackground(Color.gray);

  • JLabel Word Wrap

    I'm building a simple chat application to work on my network programming skills. I ran into an issue that I can't quite find a solution to.
    I Have a JPanel inside of a JScrollPane, and inside of it JLabels with the messages received are added as they come. I would like the JLabels to wrap the text after it reaches a certain width. Here's the testing code I'm using for this:
    import java.awt.*;
    import javax.swing.*;
    class ChatBody {
         public static Container createChatBody() {
              JPanel body = new JPanel(new GridBagLayout());
              GridBagConstraints c = new GridBagConstraints();
              c.fill = GridBagConstraints.BOTH;
              c.weightx = 1.0;
              c.weighty = 1.0;
              JPanel messages = new JPanel();
              JScrollPane messagesPane = new JScrollPane(messages);
              messagesPane.setPreferredSize(new Dimension(608, 478));
              messagesPane.setBorder(BorderFactory.createLineBorder(Color.black));
              messagesPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
              JLabel messageOne = new JLabel("This is a label that I'm going to make really long to test the wrapping abilities of a JLabel/JPanel/JScrollPane. This needs to be really long so it will reach the end of the scroll pane and *hopefully* wrap on it's own, so I won't have to do any work =D");
              messages.add(messageOne);
              c.gridx = 0;
              c.gridy = 0;
              body.add(messagesPane, c);
              return body;
    }Please note I took some irrelevant code out.
    Is there a method or something to make JLabels word wrap? Or will I have to be creative and make something up?
    Edit: I don't know if this is relevant, but this is the class with the main() method:
    import java.awt.*;
    import javax.swing.*;
    class JavaChat {
         public static void createChatWindow() {
              JFrame frame = new JFrame("Java Chat");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setMinimumSize(new Dimension(800, 600));
              //frame.setJMenuBar();
              frame.getContentPane().add(ChatBody.createChatBody());
              frame.pack();
              frame.setVisible(true);
         public static void main(String args[]) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        createChatWindow();
    }That's needed for anyone that needs to compile my code for some reason.
    Edited by: shadowayex on Dec 24, 2009 1:47 PM

    Wrapping is not support in a JLabel.
    Most people would use either a JTextArea or JTextPane which do support wrapping.

  • Word wrap last space to be blank

    hi prestnl in a notepad file output of report the word wrap is being done at positon 225 as the last field county is of three char but the valurs indatabase is two so the word wrp is done on position 225
    we need to display a blank space after "MY' in below eg ie the word wrap for notepad file shold display one blank space after MY
    pls sugges how to do
                                                         11900      Penang                                   MY

    hi,
    use like this.
    SHIFT ld_field LEFT DELETING LEADING SPACE.
    Regards
    Reshma

  • Word wrap not working in office 365

    After the latest version upgrade to Firefox 28, word wrap functionality is not working correctly in office 365 owa. Email tries to compose all on one line. Have tried updating Java and resetting Firefox back to default settings.

    Office 365 is an entire suite inlcuding outlook. Outlook Web App light version does work because the interface uses frames.

  • Word wrap on scrolling textPane

    Hi,
    How do I turn the word wrap off on a textPane so I can have a scrollable continuous string?
    Thanks
    Andy

    Having read different posts on this forum I have determined that there are two ways to turn line wrapping off:
    1) add the JTextPane to the center of a JPanel using the BorderLayout
    2) override the getScrollableTracksViewportWidth() method ot JTextPane. (after testing I determined it was sometimes necessary to also override the setSize() method as well. )
    Here is my sample program showing the two approaches.
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.text.*;
    public class TestNoWrap extends JFrame
         JTextPane textPane;
         JScrollPane scrollPane;
         public TestNoWrap()
              JPanel panel = new JPanel();
              panel.setLayout( new BorderLayout() );
              setContentPane( panel );
              // no wrap by adding a text pane to a panel first
              textPane = new JTextPane();
              textPane.setText("1234567890 1234567890 1234567890");
              JPanel noWrapPanel = new JPanel();
              noWrapPanel.setLayout( new BorderLayout() );
              noWrapPanel.add( textPane );
              scrollPane = new JScrollPane( noWrapPanel );
              scrollPane.setPreferredSize( new Dimension( 200, 100 ) );
              panel.add( scrollPane, BorderLayout.NORTH );
              // no wrap by overriding text pane methods
              textPane = new JTextPane()
                   public void setSize(Dimension d)
                        if (d.width < getParent().getSize().width)
                             d.width = getParent().getSize().width;
                        super.setSize(d);
                   public boolean getScrollableTracksViewportWidth()
                        return false;
              textPane.setText("1234567890 1234567890 1234567890");
              scrollPane = new JScrollPane( textPane );
              scrollPane.setPreferredSize( new Dimension( 200, 100 ) );
              panel.add( scrollPane );
         public static void main(String[] args)
              TestNoWrap frame = new TestNoWrap();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setVisible(true);

  • How can I copy and paste a pdf form onto my Mavericks Clipboard. I only see word-wrapped text.

    How can I copy and paste a pdf onto my Mavericks Clipboard. I only see word-wrapped text.

    Yes, Thank you for using the term Place. You moved my focus off the clipboard, and Place set me back on course. Somewhere, the terms Copy and Paste need to be tagged to Place and Export. I'm a database designer who only uses Illustrator for forms the database fills. My need isn't yet met, but the rest should come with reading the right references. Thanks Larry!

  • JEditorPane word wrap problems

    I am using a JEditorPane in a chat window that is used, like instant messenger, between two clients. The ability to insert icons and different fonts is available after setting the editor kit to an HTMLEditorKit. However, after using an HTMLEditorKit, the word wrapping is a bit funky in that the words are cut off when wrapping.
    Is there any way to get aroudn this while STILL using a JEditorPane (or something similar that can accept HTML?). I would be able to use JTextPane, which wraps correct (I believe...I'm trying to think back to my first implementation), but the icons begin to get tricky there. I know how to insert them, but if I have multiple icons, I would need to find all of the first occuring icons since the string needs to be printed immediately to the screen.
    Thanks for any help.

    I don't have an HTML document. Maybe you are mis-interpreting what I am trying to do :)
    I am implementing a simple instant messenger (much like AIM). Right now, I have a JEditorPane that is using an HTMLEditorKit to render HTML. This is used to display emoticons and also change the font and font color. So, the HTML I am generating is manually put in there in the code so text will show up differently - say, the senders name will be red and the recipient will be blue.
    Everything is working fine, except the text is wrapping and words are being cut off. In other words, this is happening:
    | This is an exa |
    | mple of some |
    | thing that is ha |
    | ppenning in m |
    | y chat window. |
    -----------------------

  • Textflow and flowComposer word wrap

    Hi
    I have a word wrap question re...
    I have a textflow that I'm splitting into multiple sprites (pages). I also have a columnCount of 2, so the text fits into two columns, and then continues onto the next page.
    Here's an example of the text...
    testString+='<p ALIGN="LEFT">Description</p><textformat blockindent=10>Product details with decent length that that overruns the column line '+i+'</textformat>';
    ... and I've concatenated it 500 times so I have a decent length test string to put into the textFlow.
    Which comes out like (imagine 3 lines per page)...
    Description                                                                                                Description
      Product details with decent length that that overruns the column line 1            Product details with decent length that that overruns the column line 4
    Description                                                                                                Description
      Product details with decent length that that overruns the column line 2            Product details with decent length that that overruns the column line 5
    Description                                                                                                Description
      Product details with decent length that that overruns the column line 3            Product details with decent length that that overruns the column line 6
    (page break)
    Description                                                                                                Description
      Product details with decent length that that overruns the column line 7            Product details with decent length that that overruns the column line 10
    Description                                                                                                Description
      Product details with decent length that that overruns the column line 8            Product details with decent length that that overruns the column line 11
    Description                                                                                                Description
      Product details with decent length that that overruns the column line 9            Product details with decent length that that overruns the column line 12
    (etc for about 10 pages until we get to the 500th pair)
    It works nicely, however, I'm wondering how you set it up to NOT word wrap on 'Product details with decent length that that overruns the column line 1' - so in other words, cut that line of if it hits the column edge?
    I tried LineBreak.EXPLICIT, but that only allows one page to be created, and no word wrapping occurred.
    Or is there a way to set it up within an html tag?
    Thank you.

    kethryvalis wrote:
    The "Name" text bounding box that I've created is set to a specific height/width (and needs to stay that way) with a font size of 94.22 pt; however, some of the names are REALLY long and are too big for the bounding box.  They word-wrap.  When I run the "data merge," I need Photoshop to automatically resize the text in the bounding box so that it doesn't word wrap.
    That is not possible its a contradiction resized text would not be font size 94.22.  Data driven graphics as far as I know does not have any text re-sizing feature.  Your template needs to be sized to support the longest text possible.   Text length need to be limited to fit within the space provided in the template psd file.
    It may be possible to write a Photoshop script to resize text layers to fit within some bounds. However is not possible to explain to you thoroughly in simple terms that would enable you to write the script. You most likely know the logic needed to do the resize and really don't need it explained to you.   What you lack is Photoshop scripting knowledge.  You have no script programming skills.  Learning a supported scripting language takes time and of top that you need to learn Adobe Document Object Model and it limitations and about Adobe's Scriptlistener Plug-in that records Action Manager scripting code. Developing Photoshop scripts is not an easy user feature like Adobe Actions Palette recorder/editor. Scripts need to be designed and programmed and debugged.
    Scripts are easy to use like actions and are more powerful then actions. You most likely have use some that are shipped with Photoshop,  Image Processor, Fit Image, Photomerge, lens correction  etc. Find your Photoshop version version Presets\Scripts folder and open any of the  .jsx file in the folder in a text editor see if you can understand somewhat what is written.  If you can you may want to learn scripting Photoshop.  Most Photoshop users never write a Photoshop script.

Maybe you are looking for

  • [Solved] OOo won't start

    i try to start openoffice but i get an error: [me@MyComp ~]$ oocalc %U [Java framework] Error in function createSettingsDocument (elements.cxx). javaldx failed! terminate called after throwing an instance of 'com::sun::star::uno::RuntimeException' i'

  • How to suppress the HTTPS alert in a JSP page?

    Hi, I have a JSP page which is https, If I try to move from that page to another https site or refresh the same page , I am getting the security alert , How to suppress that alert Please help me out, It is more urgent ....

  • Securing webaccess with ssl

    OK, I will admit right now I don't fully understand how webaccess and ssl works. In my current setup I used a self-signed key generated and stored in eDir. This key is used in httpd.conf like: SecureListen xxx.yyy.zzz.1:443 "SSL Certificate" I know h

  • Folder connection limit

    Hi there! I recognized a strange behavior when using JavaMail. Most likely it is due to a usage error by me but maybe you can help me to fix it. I'm connecting through JavaMail 1.4.2 to an Exchange server (2007). Then I try to open as much folders as

  • UWL - Substitution rule not visible to switch it off

    Hello, User A maintains substitution for user B. In ECC, the substitution is active in table HRUS_D2. But User A is unable to see the rule in "Manage substitution". As a result he is not able to switch off the substitution rule from portal. Thanks, P