Recruiting for redesign of Swing text editing components

With all due respect to the efforts of the Swing engineering team, I personally feel it is high time somebody took the incentive of completely reconsidering the implementations of JTextComponent and providing an open source replacement.
As those of us who have tried to make use of the existing JTextComponent will agree, it seems to be some of the most complex and obscure code in the entire Swing library, and has some serious deficiencies of fundamental design and implementation that do not seem to be being addressed.
I am appealing to anyone who wishes to contribute to such an effort to email me at [email protected] I would like to start by organizing a blue-ribbon team to review the current design, and a parallel effort to identify an ideal requirements set and a project plan moving forward.
Mitch Goldstein
Consultant, Swing Guru, Author of Hardcore JFC
[email protected]

As those of us who have tried to make use of the
existing JTextComponent will agree, it seems to
be some of the most complex and obscure code in the
entire Swing library, and has some serious
deficiencies of fundamental design and implementation
that do not seem to be being addressed.[...]
It's good to know I'm not the only one that was thinking that. Sorry Tim :-) (Tim Prinzing wrote the text package).

Similar Messages

  • Trick for disabling shortcuts in Text edit?

    Does anyone know a trick for overriding or disabling a keyboard shortcut while in Text edit mode in Fireworks?
    A while back, I added a custom keyboard shortcut (Shift +) to allow me to cycle forward through blend modes, via command. This is the default keystroke combination used by Photoshop, and it's also a shortcut that I've added to Illustrator, so it's my preferred choice. However, I recently noticed while in Fireworks' Text edit mode that I cannot type a simple "+" sign, because it triggers the blend mode command instead. This isn't a problem in Photoshop or Illustrator—somehow, they bypass keyboard shortcuts while in Text edit mode, but Fireworks 8 does not.
    It occurs to me now that I could temporarily switch to Fireworks' standard keyboard shortcuts set while I'm editing text, and then switch back to my custom set once I'm done. Alternatively, I could use the Character Viewer in the Mac OS to insert the "+" character—which is even easier to do if I add that character to my Favorites.
    These are pretty good solutions... but if anyone has a quicker method, I'd be interested. I'm also curious whether newer versions of Fireworks have the same issue. It seems like a number of users on this forum have had problems with Text suddenly disappearing... I don't know if there could be a correlation. In general, it would seem like a good idea for Fireworks to override shortcuts while in Text edit mode, à la Photoshop.

    Just came up with another solution, which is to use FW's Text Editor (under Text > Editor...). No problems when trying to enter a "+" sign while in this window. Cool.

  • New bee looking for applescript help with text edit app

    I have a huge text files (20+) , I want to find a list of words like weather, farmers, ploughing. I want to find these words one at a time, as my text file is 250+ Mb in size.
    I want applescript to count the how many times each word appears in the text.
    Paste that occurrence of word into an spreadsheet file in a row named after text file , and in a column named weather, farmers, ploughing.
    Please help.
    Thanks much.
    CF
    PS so far I can open the text files with applescript, that is about the extent of my ability in programing.
    Message was edited by: coldfusions onco

    For a file of that size, you would need to use some shell utilities to get decent performance. To count words, the following script breaks up the text into words, then counts the number of times the specified word is found (a dictionary file is used as an example, so the match is equivalent to 'contains'):
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #DAFFB6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    set theFile to "/usr/share/dict/web2" -- a 2.5MB list of words
    set someWords to {¬
    {theWord:"weather", theCount:0}, ¬
    {theWord:"farmers", theCount:0}, ¬
    {theWord:"ploughing", theCount:0}}
    repeat with anItem in someWords
    set aWord to quoted form of theWord of anItem
    try -- break up into individual words, then search and count
    set theCount of anItem to (do shell script "tr -cs '[:alpha:]' " & quoted form of linefeed & " < " & theFile & " | grep -ic " & aWord) as integer
    end try
    end repeat
    someWords
    </pre>
    Is this related to your Automator post?

  • Arabic numerals not displaying in Swing text components

    On a test system setup with Windows NT Arabic version, we had problems entering Arabic numerics into Swing text components.
    Other Arabic characters were displayed correctly, but numerals were all represented by Western characters ('0 to 9'). Even when using the "Alt-" method to enter the Unicode character codes via. the keypad, we still got incorrect characters.
    When using the keypad to enter the code '\u0660' (Arabic "1"), the code sent to the text component was '\u2022' (Bullet).
    We tried this on an English system and the same code was passed to the text component.
    Does anyone have any suggestions as to what might be the cause of this problem ?
    Thanks,
    Brian...

    hello!
    I am developing an arabic editor but i am unable to display the arbic numeric in swing text .Plz help me on this topic and send some code example on this topic.
    I have another problem about events i.e how can i handle the beckspace event, enter event, and spaceevent?
    plz send me mail .
    Thanx for advance.

  • Text Edit application for Mac Mini 10.4.11

    I am not sure if everyone is familiar with my "Mac Mini Saga", ( BDAqua certainly is! - by the way, congratulations for passing the 11000 mark! ).
    Now that the Mini is finally updated to 10.4.11,(without the original install discs), so that the elderly lady owner can use Skype, she would also like "my" Text Edit app. which is not listed in her apps. - i was told it should be there, but it is not!
    Looking at the details of this app on my iMac (version 1.5, 22.1 MB on disc), under File, i have the option: "Burn Text Edit to Disc". So, is it possible to include (transfer) this app. to her Mini after i copy it to a disc?

    Not exactly similar, this text editor and writing tool can do several things;
    and it (may still) runs free. I have a version of it.
    • Text Wrangler: powerful general purpose text editor...
    http://www.barebones.com/products/textwrangler/
    The original Text Edit, part of the System's original apps package, is more
    integrated with the original system installation; and should not be missing.
    However, you can choose to have another similar app as default to open
    or work with similar types of files.
    And for more office-like apps, there's a 'free running' donation-ware suite:
    • Neo Office:
    http://www.neooffice.org/neojava/en/index.php
    Text Edit version 1.4 from about 2005 (or so) should be what OS X 10.4.11
    would have included in the installer and then on the computer in question.
    The app is about 8.5MB, and may require the installer to place it correctly.
    You may look into the OS X 10.4.x Install DVD for Tiger and use Pacifist
    utility to look for and see if you can find the package in there, and extract
    it via Pacifist; then install Text Edit from the desktop via this utility. It will
    work in a demo mode, so you don't have to buy it, to try it out. It works.
    • CharlesSoft - Pacifist:
    http://www.charlessoft.com/
    There is no reason why the original TextEdit would not be in Tiger 10.4.
    Unless some files were corrupted at a point during installation process.
    Good luck & happy computing!

  • Looking for a word processor without word wrap, text edit doesn't cut it

    I'm looking for a word processor without word wrap, text edit doesn't work. In text edit, it automatically scoots my text over to the next line but I just want it to keep going with a horizontal scrollbar. Is there a text editor I can download from the app store or can I get textedit to work somehow where it uses a horizontal scroll bar instead of entering text to the next line?

    Hi,
    thought TextWrangler can do it.
    But it seems that the 'no word-wrap' "feature" isn't that much wanted anymore.
    Maybe one of these http://www.macupdate.com/find/mac/text%20editor can do it.
    Regards
    Stefan

  • Create text editable PDF for client to edit in Adobe Reader

    I would like to create a PDF from either Illustrator or InDesign so that my client can edit just the text in the document using Adobe Reader as necessary (for flyers and business cards etc). I want to set the file up in Illustrator or InDesign so all text is laid out properly where I have the proper tools to do so, rather than using the Acrobat form tool and guessing measurement/layout etc. I have tried exporting to PDF from both programs and then using Acrobat Pro's form feature but it won't recognise any of the fields. I am using CS4 and Acrobat Pro 9 and am unsure if my software is too old to complete these tasks or if I am doing it incorrectly. I have seen it done in plenty of places so I know it is possible, I'm just not sure how.
    Here are some links showing examples of what I am trying to do:
    Using an e.m.papers Wedding Invitation Template.mp4 - YouTube
    How to use an e.m.papers printable RSVP template.mp4 - YouTube
    So, basically any advice on the following would be greatly appreciated:
    How do I make text editable in Adobe Reader (from an Illustrator or InDesign file)?
    How can I easily put the same design onto the same page (eg 8 business cards on an A4 page with crop marks) multiple times so that if I need to change the design slightly, it will change the design on all of them?
    How can I make the PDF like it is in the YouTube videos, so that when you edit one "product/design", it will edit all on the page?
    Or, how can I create a file of multiple business cards on the one page where they can have a different employees details on each card?
    This is my first time using this forum so if you require any further information, please let me know. Any help will be greatly appreciated. Thanks in advance.

    that's filling in a form, not editing: Create fillable PDF forms | Acrobat
    <moved from Adobe Creative Cloud to Creating, Editing & Exporting PDFs>

  • Best external monitor for text editing

    Hi all - I have a 2011 MBP and want to connect it to an external monitor (+ mouse and keyboard) for text editing and web browsing. Text clarity is very important to me. First I've tried to connect  a mainstream Acer monitor, and then Lenovo ThinkVision eIPS LT2452pwc at work, and in both cases Mac fonts looked somewhat "fuzzy" where Windows and Linux fonts looked nice and sharp. In all cases I've used native screen resolution. There is nothing wrong with Laptop either (I tried a couple), and it has probably to do with different antialiasing algorithm that Apple is using, which looks good on higher pixel density laptop panels, but not that great on exteranal monitors.
    So... any advice from those using Macs with external monitor for text tasks? Obviously there are Mac displays, but I have some concerns about the glare. Then  I heard good feedback about Dell UltraSharp and NEC IPS monitors. Trully appreciate your input for somebody new to Mac.

    Yes, I did get Dell Ultrasharp U2713HM. I am happy with it with one caviat (which would be the same for 27 Apple monitor). The picture quality is absolutely amazing - the text is very shart and clear, I can't imagine it to be better. The color is very good and natural, plenty of brigtness and contrast to produce a good picture in any light conditions, plus *no glare* screen surface, arguably making this monitor better than the Apple monitor.
    The somewhat unexpected caviat is that since this monitor packs pretty high resolution in a 27" screen, the text appears smaller than on most other monitors (but would be the same as on Apple 27" monitor). It even *appears* smaller than on my 13" Macbook Pro, however at closer examination, that turned out to be not true. The text on the monitor is actually bigger than on laptop, but looks smaller since typically the external monitor is farther away from the eyes than a laptop monitor.
    At first I wanted to return the monitor and exchange for smaller and lower DPI (read bigger text) 24" Ultrasharp, but then got used to my 27" monitor and decided to keep it. Hope this helps.

  • Fix for PENDING in javax.swing.text.html.ParagraphView line #131

    Investigating source of HTMLEditorKit I found many PENDING things. That's fix for one of them - proper minimal necessary span detecting in table cells.
    Hope it will help to somebody else.
    import javax.swing.*;
    import javax.swing.text.html.*;
    import javax.swing.text.html.ParagraphView;
    import javax.swing.text.*;
    import java.awt.*;
    import java.text.*;
    import java.util.ArrayList;
    public class App extends JFrame {
        public static String htmlString="<html>\n" +
                "<body>\n" +
                "<p>The following table is used to illustrate the PENDING in javax.swing.text.html.ParagraphView line #131 fix.</p>\n" +
                "<table cellspacing=\"0\" border=\"1\" width=\"50%\" cellpadding=\"3\">\n" +
                "<tr>\n" +
                "<td>\n" +
                "<p>111111111111111111111111111111111<b>bold</b>22222222222222222222222222222</p>\n" +
                "</td>\n" +
                "<td>\n" +
                "<p>-</p>\n" +
                "</td>\n" +
                "</tr>\n" +
                "</table>\n" +
                "<p></p>\n" +
                "</body>\n" +
                "</html>";
        JEditorPane editor=new JEditorPane();
        JEditorPane editor2=new JEditorPane();
        public static void main(String[] args) {
            App app = new App();
            app.setVisible(true);
        public App() {
            super("HTML span fix example");
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JSplitPane split=new JSplitPane(JSplitPane.VERTICAL_SPLIT, createFixedPanel(), createOriginalPanel());
            getContentPane().add(split);
            setSize(700, 500);
            split.setDividerLocation(240);
            setLocationRelativeTo(null);
        JComponent createOriginalPanel() {
            JPanel p=new JPanel(new BorderLayout());
            p.add(new JLabel("Original HTMLEditorKit"), BorderLayout.NORTH);
            HTMLEditorKit kit=new HTMLEditorKit();
            editor2.setEditorKit(kit);
            editor2.setContentType("text/html");
            editor2.setText(htmlString);
            p.add(new JScrollPane(editor2), BorderLayout.CENTER);
            return p;
        JComponent createFixedPanel() {
            JPanel p=new JPanel(new BorderLayout());
            p.add(new JLabel("Fixed HTMLEditorKit"), BorderLayout.NORTH);
            HTMLEditorKit kit=new MyHTMLEditorKit();
            editor.setEditorKit(kit);
            editor.setContentType("text/html");
            editor.setText(htmlString);
            p.add(new JScrollPane(editor), BorderLayout.CENTER);
            return p;
    class MyHTMLEditorKit extends HTMLEditorKit {
        ViewFactory defaultFactory=new MyHTMLFactory();
        public ViewFactory getViewFactory() {
            return defaultFactory;
    class MyHTMLFactory extends HTMLEditorKit.HTMLFactory {
        public View create(Element elem) {
            View v=super.create(elem);
            if (v instanceof ParagraphView) {
                v=new MyParagraphView(elem);
            return v;
    class MyParagraphView extends ParagraphView {
        public MyParagraphView(Element elem) {
            super(elem);
        protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r) {
            r = super.calculateMinorAxisRequirements(axis, r);
            float min=getLongestWordSpan();
            r.minimum = Math.max(r.minimum, (int) min);
            return r;
        public float getLongestWordSpan() {
            if (getContainer()!=null && getContainer() instanceof JTextComponent) {
                try {
                    int offs=0;
                    JTextComponent c=(JTextComponent)getContainer();
                    Document doc=getDocument();
                    int start=getStartOffset();
                    int end=getEndOffset()-1; //don't need the last \n
                    String text=doc.getText(start, end - start);
                    if(text.length() > 1) {
                        BreakIterator words = BreakIterator.getWordInstance(c.getLocale());
                        words.setText(text);
                        ArrayList<Integer> wordBounds=new ArrayList<Integer>();
                        wordBounds.add(offs);
                        int count=1;
                        while (offs<text.length() && words.isBoundary(offs)) {
                            offs=words.next(count);
                            wordBounds.add(offs);
                        float max=0;
                        for (int i=1; i<wordBounds.size(); i++) {
                            int wStart=wordBounds.get(i-1)+start;
                            int wEnd=wordBounds.get(i)+start;
                            float span=getLayoutSpan(wStart,wEnd);
                            if (span>max) {
                                max=span;
                        return max;
                } catch (BadLocationException e) {
                    e.printStackTrace();
            return 0;
        public float getLayoutSpan(int startOffset, int endOffset) {
            float res=0;
            try {
                Rectangle r=new Rectangle(Short.MAX_VALUE, Short.MAX_VALUE);
                int startIndex= layoutPool.getViewIndex(startOffset,Position.Bias.Forward);
                int endIndex= layoutPool.getViewIndex(endOffset,Position.Bias.Forward);
                View startView=layoutPool.getView(startIndex);
                View endView=layoutPool.getView(endIndex);
                int x1=startView.modelToView(startOffset,r,Position.Bias.Forward).getBounds().x;
                int x2=endView.modelToView(endOffset,r,Position.Bias.Forward).getBounds().x;
                res=startView.getPreferredSpan(View.X_AXIS)-x1;
                for (int i=startIndex+1; i<endIndex; i++) {
                    res+=layoutPool.getView(i).getPreferredSpan(View.X_AXIS);
                res+=x2;
            } catch (BadLocationException e) {
                e.printStackTrace();
            return res;
    }Regards,
    Stas

    I'm changing the foreground color with
    MutableAttributeSet attr = new SimpleAttributeSet();
    StyleConstants.setForeground(attr, newColor);
    int start=MyJTextPane..getSelectionStart();
    int end=MyJTextPane.getSelectionEnd();
    if (start != end) {
    htmlDoc.setCharacterAttributes(start, end, attr, false);
    else {
    MutableAttributeSet inputAttributes =htmlEditorKit.getInputAttributes();
    inputAttributes.addAttributes(attr);   

  • Where is the Inspector Window for Text Edit for Office Org.

    Where is the Inspector Window for Text Edit for Office Org.  My tool bar does not look like this.  It's only one line with font, Style, size, font color,  BIU, alignment, line spaces and indentation options.  The help says that this is how I adjust my page margins.  That is my goal.
    Thanks

    The name field must match that found in the email confirmation. Even a missing Mr. will cause it to fail.

  • Seeking: Compatible text editing application for iPad/Mac/Windowsystem

    Hi,
    I am trying to locate a useful text editing app.
    That is compatible to be used across iPad/Mac and sometimes on a Windows based Laptop.
    I have been using both openoffice, and Textedit(Mac). Which I am using through USD Disk but Openoffice documents dont work on iPad, and as to Textedit documents dont appear on iPad as on my Mac!
    Anyone, using a Textediting app on their Mac, that makes the document appear exactly the same as on their Ipad?
    At this stage I would prefer an app that is for free, to play around with...

    I have been trying several of the documents text editing applications! But most are not compatible across i.e. iPad, Mac, Windows-systems.
    As I indicated I have converted an "openoffice" edited text into Mac's "Textedit" application everything looked simple and great on my Mac. But, on my iPad the documents didnt look identical. Also, wasnt fitting the iPad screen either, and most lines jumped few lines up or down, pictures were dislocated...
    In case you know an text edit application, that is able to make documents look exactly the same as they look across iPad / Mac / Windows. In that case I would very much appreciate if you could name me that application!

  • HT204266 Does Text Edit exist for iPad?

    Does "Text Edit" exist for iPad?

    This is the iPod touch forum.
    What do you mean by "Text Edit"?
    There are iPad text editing apps available.

  • Track Text Edits for entire Book

    In FMv8, is there a way to turn on/off 'Track Text Edits' for all documents in a book (outside of opening all documents and turing it on/off)?

    Thanks for the suggestions. Since I do have FrameScript (5.1), I'm in luck. The following code works for me, maybe someone else can use it. Now about that forthcoming release ... :-)
    Set PlatformEncodingMode = True;
    New ScriptVar NewVar(eDocUtils) File('DocUtils');
    Set gvBook = ActiveBook;
    If gvBook = 0
    LeaveSub;
    EndIf
    New SubVar NewVar(gvCallBackSub) SubName('ProcessDoc');
    Set gvCount = eDocUtils.ForAllDocsInBook{gvBook,gvCallBackSub};
    MsgBox Mode(Note) 'All changes have been accepted in the book.'
    Sub ProcessDoc using pvDocVar
    Execute FC KbdAcceptAllChange;
    Execute FC KBDTRACKCHANGE;
    Save Document;
    Close Document;
    EndSub

  • Text editing in Web Dynpro for ABAP

    Hi
    I am interested in getting ideas on the best way to achieve the following functionality in Web Dynpro for ABAP:
    1) A text-editor where some basic formatting is possible (Italic, Bold, etc.) for the user to enter formatted text.
    2) Save this text in some format to the dictionary maintaining the text formatting.
    3) This saved text should appear on a PDF printview from the WebDynpro. Of course the formatting should appear on the screen as it was created with the text-editor.
    TIA
    Regards

    Hi,
    here's the linkt to the messages documentation: http://help.sap.com/saphelp_nw2004s/helpdata/en/d8/2a934259a5cb6ae10000000a155106/frameset.htm
    Regards, Heidi

  • Text Edit software questions: is this the right forum for this software?

    I've got questions about, and issues using Text Edit software. The on screen HELP menus don't have the answers. Where can I post questions about Text Edit software???
    Thanks.

    Where can I post questions about Text Edit software???
    Here.

Maybe you are looking for

  • How do i install C++ 10 on Win8.1?

    I have a new installation of 8.1 on a clean drive. there is a particular piece of development software I use from QSC-Qsys Designer 3.whatever that requires C++ 10 to run however I cannot seem to find an installer for it anywhere I search on the Micr

  • Service Desk: System and client missing when creating a message.

    Hi Experts,      I would like to find out if anyone has encountered this problem before. The system and client fields were blanked out and I am unable to select/create the system when creating a message. Thanks!

  • File size increased substantially from CS 6 to CC.  Why?

    Using Photoshop CC that I just installed, I just made a few "tweeks" to the layer setting of an image I had created in Photoshop CS6.  In CS6 the file size was about 205 Mb but when I saved it with CC the size went up to 520 Mb.  What's going on?

  • How to write data to database

    Hello! In a special condition on our form is the value of the field not ident to the value in SAP database. Now I want to update the database with the actually field value. How to do that? thx for any idea! Best greetings, Gregor Brandstätter

  • X6 Connection Problems

    My daughter's new X6 accessed my wireless router with no problems until we went on holiday and turned the router off. Since we came back and turned the router back on, any attempt to connect the X6 to the internet using the wireless connection receiv