About Delimiter when do copy action in JTable

copy action in JTable will copy the strings that selected on JTable, like below
|ab|dd|
Assums there is 1 row and 2 columns
when copy these data from JTable and paste into text edit, they will be seperated by tab, like below
ab \t dd
Here I want to set the \t be other String, I do it like below:
Transferable tf = Toolkit.getDefaultToolkit().getSystemClipboard().
                  getContents(null);
              try{
                String o = (String)tf.getTransferData(DataFlavor.stringFlavor);
                String s = o.replaceAll("\t", "==");
                Toolkit.getDefaultToolkit().getSystemClipboard().setContents(
                    new StringSelection(s), null);
              }catch(Exception e) {
                e.printStackTrace();
              }And it work well. When I past selection text into text editor it look like what I want :
ab == dd
But I want to know how to set this delimiter string for JTable, it exists in some place in swing global configuration?
Thanks.

I believe this is the relevant code from the BasicTableUI class:
                StringBuffer plainBuf = new StringBuffer();
                StringBuffer htmlBuf = new StringBuffer();
                htmlBuf.append("<html>\n<body>\n<table>\n");
                for (int row = 0; row < rows.length; row++) {
                    htmlBuf.append("<tr>\n");
                    for (int col = 0; col < cols.length; col++) {
                        Object obj = table.getValueAt(rows[row], cols[col]);
                        String val = ((obj == null) ? "" : obj.toString());
                        plainBuf.append(val + "\t");
                        htmlBuf.append("  <td>" + val + "</td>\n");
                    // we want a newline at the end of each line and not a tab
                    plainBuf.deleteCharAt(plainBuf.length() - 1).append("\n");
                    htmlBuf.append("</tr>\n");
                // remove the last newline
                plainBuf.deleteCharAt(plainBuf.length() - 1);
                htmlBuf.append("</table>\n</body>\n</html>");
                return new BasicTransferable(plainBuf.toString(), htmlBuf.toString());So the "\t" would appear to be hardcoded.

Similar Messages

  • My Photoshop CS 5 has some strange actions when I copy a portion of a photo using the clone stamp  to transfer to another part of the image. It carries the entire layer (not just the stamps selection) across the screen and I cannot place it where I need t

    My Photoshop CS 5 has some strange actions when I copy a portion of a photo using the clone stamp  to transfer to another part of the image. It carries the entire layer (not just the stamps selection) across the screen and I cannot place it where I need to. It appears as if I selected the entire layer on purpose (which I did not)
    The below items appeared when I opened Photoshop CS 5:
    “Photoshop has encountered a problem with the display driver and has temporarily disabled G & U enhancements. Check the video card malfunctions website for latest software. GPU enhancements can be enabled in the performance panel of preferences.”
    (I believe this started after the automatically updated Windows was applied. It was coincident with the before mentioned problem . . . but I don’t really know if it had anything to do with it. )

    For the Clone Stamp problem, check the Clone Source panel and Clipped is probably unchecked.
    If so, check Clipped and see if that makes a difference.
    (Window>Clone Source)
    As to the video card problem:
    Which version of windows are you using?
    What is the make and model of your graphics card?
    Do you know which update windows installed?

  • I am just about giving up!  I have upgraded Pages to 0.9 4.3.  Now when i copy text from an incoming email and paste it it pastes in as an Object and I can't work on it.

    I am just about giving up!  I have upgraded Pages to 0.9 (4.3).  Now when I copy text from an incoming email and paste it into Pages it pastes in as an Object and I can't work on it.  It has a border round it and corner markers.  I have never had this problem before.  I have looked at every conceivable thing but cannot find how to get rid of this Object and just paste in the wanted text.  If I fiddle and fiddle within this text I can eventually get a cursor and work on the text - but how on earth can I get rid of the surrounding box?  
    I don't know if this is at all clear but I can't think of any other way to describe this - but it looks like this in Pages with corner and top, bottom and side markers.
    Monthly summary for .................March, 2013
    Four more elephant Rescues during the month - first a yearling female named “.......................................
    Lecia

    Peter hello - I have been copying and pasting for as long as I can remember and it has NEVER done this before - so why now!? Anyway, Jerry has told me about Paste and Match Style --- yet another new thing! 
    I have also discovered that I don''t need to hold down Option when I go to Save to get Save As -  I can hold down 4 keys (shift, option, command and S) and it will bring up Save As!! 
    Thanks for your response.
    Lecia

  • Activate Block Organization Plan in Infotype 0001 when it copied

    Hi All,
    I want to activate block organization plan in infotype 0001 when I copy or  create that infotype.
    I have tried to search any available resources in sap notes but couldn't find it.
    How to activate this?
    Thank you in advance,
    MAL

    Dear semvladigo ,
    it's not about integration between PA and OM.
    What I want to do is I want to copy infotype 0001 directly from PA30, and then change the percentage of the position directly without using Action (PA40).
    I tried to copy it using PA30 but I cannot change the percentage because it is in grey out. How to make it possible to change the percentage directly.
    Thank You,
    MAL.

  • Permissions sticking to read-only when folders copied to local drive

    Hello! So... I have a sharepoint that is read-only (archived jobs) everything works fine, but when people copy a folder to their local drive, they are forced to enter the server admin password when they try to move it to the their trash. If they copy individual files, they can erase those, but folders are retaining the server's permissions.
    Everyone is on 10.5.6, I tried making the group both POSIX and ACL and it didn't make a difference.
    Is there a fix? THanks - Don

    Please provide a read-out of your file stricture using *ls -ela* for the directory in question, and showing a file that, when copied, becomes read-only.
    Generally speaking, when a file is copied, the copy's permissions are set like this:
    * The POSIX permissions are preserved. So if they are rw-rw-r-- (0664), then they remain that way on the copy. Note that umask behavior would put those at rw-r--r-- (0644) by default.
    * The POSIX owner is changed to the action-bearing user. The action-bearing user is the one that performs the copy, so that's typically the currently logged-in user. Where the user is defined (either locally or via remote directory does not matter.)
    * The POSIX group is changed to match the POSIX group assigned to the copy's parent folder.
    * Any explicit ACLs will be preserved on the copy, if the destination filesystem supports them. (Destination filesystem ACL support is turned on in 10.5 client by default, but not in 10.4 or 10.3 client.)
    * Any inherited ACLs as defined on the original will not be set on the copy.
    * The copy will inherit any inheritable ACLs as defined on its new parent.
    Now I'll take a wild guess: Since you're having this problem with 10.4 and 10.3 clients, I'm thinking that the POSIX permissions of the original file have the POSIX owner set to read-only. This would produce a read-only copy because the POSIX permissions are preserved! There is a reason for the default umask and create masks that set POSIX owner to read and write!
    Of course, if this is the case, then the copy's POSIX owner can change the permissions on it and open it with read-write access.
    --Gerrit

  • HT4528 When I copy a photo or anything, where does it go to and how can I view and /or retrieve it?

    When I copy a photo or anything else, where does it go to and how can I view and/or retrieve it?

    JimHdk wrote:
    If you "Save" a photo it goes to your Camera Roll in the Photos App.
    If you merely "Copy" a photo it doesn't go anywhere until you "Paste" it somewhere as, for example, into a email or document.
    Well if you want to get technical about it ...

  • Muse 2014.2 : when I copy and paste svg from Illustrator to Muse, i have no transparency.

    Hello. Muse 2014.2 : when I copy and paste svg from Illustrator to Muse, i have no transparency. Only by importing saved svg file I have transparency.
    In official Adobe (promo) Tutorial  in the same operation - svg is transparent, link: Import SVG | Adobe Muse CC tutorials
    Please help me!. It would be very usefull copy&paste svg with transparency.
    Andrew Maola

    Hi.
    Thank you for explaining the theory about rendering in Muse but something doesn't work.
    I'm running on Win7 - CC2014.2. on 2 different computers. Efe Of course the transparency displays correctly when I preview my page in the browsers (All browsers - also IE11).
    Also in preview mode svg is very good but in design mode
    In order to render the SVG at design time, Muse hands the SVG to Safari on the Mac and Internet Explorer on Windows and asks it for a bitmap. This bitmap is only used at design time and when viewing the site in a browser that does not support SVG. Unfortunately, the bitmap returned by Internet Explorer strips out partial transparency. Fully transparent pixels should be preserved at design time and all transparency should be preserved when you actually view your site in the browser.
    We have not seen or heard of differences in the handling of transparent pixels between copy/pasting and save/import. Hence, I'm wondering if the copy/paste issue is only with partially transparent pixels and if the case that succeeds in a save/import workflow is for fully transparent pixels. To be clear, this transparency issue should only be during design time on Windows. There shouldn't be any issues on the Mac or in the browser.
    Muse 2014.2 : when I copy and paste svg from Illustrator to Muse, i have no transparency. 

  • When I copy and paste an image from Word for usage in a Framemaker document it becomes blurred.

    Hi,
    I am saving graphics from Word for usage in a Framemaker document. When I copy and paste the file into photoshop it becomes blurred and unusable. How do I resolve this? I have tried saving the file in it's highest resolution but that doesn't work either.
    Thanks,
    Niall.

    The problem has to be the image itself, but then you give us zero information.
    We don't even know what platform you are on, Macintosh or Windows, what exact version of the OS, of Photoshop, or Word you are using, how you are getting what kind of image from Word, etc.
    It could be that you're just copying the low resolution thumbnail preview from MS Word, but we know nothing about its dimensions, resolution or format.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • How do I disable the tracking feature when I copy and paste text into a website window -- a tag line shows up at the beginning of the newly inserted text?

    On the Ink Frog website, when I copy from a Word text file to insert into their auction lister, a tracking header is inserted.
    When I insert "Line of copy", this shows up:
    Version:1.0 StartHTML:0000000168 EndHTML:0000003709 StartFragment:0000002351 EndFragment:0000003673 SourceURL:file://localhost "Line of copy"

    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    etc.,
    someone may be able to help you (not necessarily this poster).
    a screen shot of your settings or of the image could be very helpful too.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • When i copy songs thrrough itunes some albums are copying as single songs but not as one album

    If it can copy all as album folders its easy to run one album at atime and can here. Now it not working like that and i need to select always song.

    JPSchrader wrote:
    when I copy an artist over to itunes and that particular album has multiple albums...
    Should that read "when I copy an artist over to itunes and that particular artist has multiple albums," because if not, I don't understand?
    If I'm right about that, I'm still not really clear at all about what you're doing. Where are you importing these songs and albums from? Is it existing songs files and if so, what format are they in?

  • Why, when I paste my selection in a new layer, is it 10 times larger than when I copied it?

    Why, when I paste my selection in a new layer, is it 10 times larger than when I copied it?

    Kevin If you don't understand don't try to take the discussion offline via private message.  Other that have the same problem will not benefit if taken offline here is you PM.
    Hi,
    Thanks for your response to my question. What is the best way to adjust to match resloutions of pictures/photos, etc in PSE 12. I am trying to layer photos and selections from photos but when I cut and paste, sometimes I get this HUGE image that doesn't even come close to fitting on the screen.
    Thanks!
    Kevin
    Kevin
    You need to understand pixels better know what is going on when you do things.  All pixels are not created equal.  Some have better quality the others.
    When you have a camera that take captures  3000x2000 px for an image and you have a good lens and exposure setting you wing up with 6,000,000 quality pixels for your image.
    If you resample that image  for the web to fit within 300x200 pixels you wind up with a 60,000 high quality web size image. Or a high quality image that will fit on your display at its resolution. The images resoultion setting is meanless for displays use their resolutuin they do not support image print DPI resolution setting.  And Displays do not hava a 72DPI resolution. 
    So when your post processing think about Pixels DPI is meaningless except when you use a unit based on DPI like inches.  However also remember Displays do no support the images print dpi resolution.  The only time 1" on display equal 1" in print is when the images print resolution is the same as the display you are using. All displays do not  have the same resolution/ Most desktop displaye are around 100DPI that is changing and Laptop and tablets can have resolution above 300DPI. So what will nor fit on your displat may well fix on a laptop or tablet.
    DPI is actual pixel size 100DPI pixels a 1/100" x 1/100" = 10,000 per square inch  300DIP 1/300"x 1/300"  90,000 px per sq inch.
    The same number on pixels image on a 300dpi display is 9 time larger on a 100Dpi display. What may not fit one your low resolution display may fit on the same size high resolution display for the display  displays more pixels then your display can.
    If you resample that 300x200 web size image to back to a 3000x2000 pixel image for print you wind up with 6,0000,000 lower quality pixels. 
    Though the 300X200 pixels image was a high quality web size image much of the original 6,000,000 image quality was reduced in the 300x200 px image. Much of the detail you had in the original 6,000,000 pixels image was discarded in the process.  The new 6,000,000 pixels image was made only from a 60,000pixel image they were not captures using a camera exposure.  The camera had the actual real detail in front of it to capture.  All the computer had were 300x200 pixels it has to add details for the larger image and it does by interpolating the 300x200px image.
    Preserve the pixel you get from your cameras. They are the highest quality pixels you will ever have for your images.  Every time you resample an image up or down in number of pixels you loose some image quality.   Not one of the original pixels remain intact you wind up with a totally new image created by interpolating the old image.  Do not save the new image over the old image and loose your good high quality pixels. 

  • Do not duplicate the graphic style when you copy and paste a feature

    I rely heavily on the use of graphic styles.  However, when I copy and paste a feature that has a graphic style assigned to it, a duplicate of the graphic style is created.  I sometimes end up with a large number of these duplicate graphic styles that I have to trash.  This does not happen with the selection tool+alt shortcut for copying.  However, I can't use this shortcut when I want to paste in front or paste in back, which is the case at least half the time.

    Only advice I can offer is Option Left cursor, then right cursor, to make an exact copy in same position.
    This will give you a clone as the action does form the previosu poster, but unfortunately no oslution for when you want to target layers.
    If anyone else has any input on this here is how to reproduc:
    New document, create a graphic style (eg: fill yellow, stroke none) and save
    Close the document
    Open the document
    copy and paste the element with the graphic style, and with every paste multiplies faster than a tribble on Star Trek
    I played with changing the clipboard options, no luck. Exists on CS4 Mac, CS5 Mac & PC, might go back as far as graphic styles do.

  • Why does my block diagram change when I copy my code to another system?

    I am doing development work on a laptop on Win XP and using LabVIEW 2009 with service pack 1. When I copy the code to the target system, my block diagrams are changed and no longer fit the screen. Much of the code is spread out, mainly down. The target system is running Windows 7 and also has LabVIEW 2009, SP 1.
    I notice that any constants that are clusters are expanded when copying the code to the other system. I've gone in and turned off the autosizing for these clusters but they are still expanded. I like to shrink them to a small size for saving space.
    I've gone through and manually re-adjusted the block diagram on the target system, but when I copy it back to my development laptop, the same thing happens again. This is not an acceptable way to develop code and it has caused a real problem to proceed. I'm contracting this work and must develop this code offsite. Can anyone please help me with this? I can't keep restructuring my block diagrams every time I copy the code from one system to the other.

    Windows XP used Tahoma size 8 as its basic system font.  When MS came up with Vista, they changed it to Segoe size 9.  I'm not sure what Win 7 is, but I think it is the same as Vista.  That font change, and certainly font size change seems to be the underlying cause for block diagrams changing their appearance.  (And for front panel controls and labels as well.)
    LV seems to use the Windows system font as its default font.  Interestingly, it seems like the font sizes in LV are something like size 12, 13, 14, 15.  I think a size 9 is equivalent to a size 15, but I'm not sure about the comparisons.  (Check out this thread.)
    There are a few things you can do to try to make one system look more like the other.
    1.  Go into the Windows screen settings. In Vista, right click desktop, Personalize.  Window color and appearance.  Open classic appearance properties.  Try changing the color scheme from Windows Aero, to something like Windows Classic or Windows standard.  They both use Tahoma 8.
    2.  Or same as Step 1, but go further into Advanced button.  Pick on any option that uses font such as Menu, Message Box, Active or Inactive Title Bar and change the font there.  I'm not sure which of the items that has a font setting is the key one.
    3.  LV uses 3 fonts called Application, System, and Dialog.  I think each of those map to one of those Windows options, but I'm not sure which goes to which.
    4.  In LV, Tools/Options/Environment has a subsection called Fonts.   Those 3 basic LV fonts are selectable there.  There is also a checkbox for me which is checked and says to use default.  If you uncheck that checkbox, a Font Style button becomes enabled.  You go in there and you can choose fonts and sizes.  And the Application, System, and Dialog fonts as well as all the usual fonts names (Arial, MS Sans Serif, Greek, ....) are selectable along with fonts sizes.  Play around in there.  The whole section is very confusing, and I have no idea how it works.  I recommend going to this idea A better way to specify (default) fonts and putting in a vote.   Also this idea, Fix font behavior between windows versions, platforms & executables, deserves some love.
    5. Some of these settings can also show up in your LabVIEW.ini file.
    FPFont = "0" 15
    BDFont = "0" 13  (I think the "0" means app font, "1" means system font, and "2" means dialog font)
    Also,
    appFont="Tahoma" 13
    systemFont="Tahoma" 13
    dialogFont="Tahoma" 13
    (And if necessary, put these in your built application's .ini file)
    As you can see, there are a lot of different things going on and they also seem to conflict with each other.  I starting stumbling on the block diagram issue between working on my app on XP at work and on my Vista machine at home about 6 months ago.  I think my problem actually started with the front panel when I was trying to align labels, and use some arrow head decals on boolean buttons.  I think I did the customization of buttons in a couple different ways (because I did some, came back later to do others, and couldn't remember exactly how I did it.)  As a result some decals looked different than others when I changed machines.  And I swear going from XP to Vista, or Vista to XP the problem got both worse ways rather than let's say larger one way, and smaller the other way.
    Replying to your message is about as much to me trying to combine all the pieces of knowledge I've stumbled across over the past months and year as it is for trying to help you.  Hopefully, this information gives you some places you can look at and play with.  (I bet #1, would be a quick, easy way to solve your immediate problem, but I haven't really tried it myself to be sure.)
    I hope someone from NI who has a better understanding than me about these font issues could jump in and correct any mistakes I made, or add anything I might have left out.  What we really need is some sort of "nugget" or National Instruments white paper that really explains all of this in ways we can use rather than us stumbling around in the dark doing things trial and error to figure it out.  Generally, any changes to the .ini files require you to shutdown LV and restart it to take effect which can take a couple minutes.  And considering all the various combinations of things that can be done above, your talking about dozens of possible restarts, and sending .vi's between two different PC's with two different operating systems, before figuring these things out.

  • Deletion of Preferred or Fixed Vendor when we copy the SC from Old SC's

    Hey SRM Experts,
    When we copy the SC from the Old SC's, Is it possible to delete only the Preferred or Fixed Vendor Information and all other information should be copied to the new SC?
    Thanks for your input on this. Helpful answers will be rewarded.
    MP

    Hi,
    You can modify the SC data using the BADI "BBP_DOC_CHANGE_BADI".In the BADi,based on the action "COPY"(Check SY-UCOMM),you can delete the value for the vendor in the SC data.
    BR,
    Disha.
    Pls reward points for useful answers.

  • Firefox is encoding parentheses when i copy and paste URLs

    When I copy and paste a URL from Firefox it is currently encoding parentheses instead of just copying said parentheses.
    For example, when I copy the link:
    http://en.wikipedia.org/wiki/Japan_(band)
    it pastes:
    http://en.wikipedia.org/wiki/Japan_%28band%29

    Except there are other programs than Firefox that use URL's. The question isn't about the use of the link it's about using the encoding that Firefox previously used.

Maybe you are looking for