Cell rendering to specific cell

Does anyone know how to render specific cells once a button is clicked. I do not want to render all the column or row but only certain cells.

First of all quit posting multiple question on the same topic. How are people supposed to know what has already been suggested when you keep starting new postings?
sorry, it does not extend the abstract table model. Is there any other options pls? I'll bet you it does. Why on earth would you attempt to write your own TableModel without extending AbtractTableModel. Maybe you are extending DefaultTableModel, which in turn extends AbtractTableModel.
Anyway, that is not the problem. Firing the event only tells the table to repaint a cell. It does not tell the table how to paint the cell. You need to have custom code in your renderer that knows what color to paint the cell. Just clicking on a button doesn't magically cause the cell to be painted a different color.
Maybe something like this will get you started:
http://forum.java.sun.com/thread.jspa?forumID=57&threadID=606504

Similar Messages

  • Item renderer for specific rows

    I need to have a checkbox item renderer for a spark datagrid column. I am using the following to get an item renderer into column:
    var checkBoxRenderer:ClassFactory = new ClassFactory(GridCheckBoxItemRenderer);
    column.itemRenderer = checkBoxRenderer;
    My question is if I need to show a checkbox for specific rows can I do that without going into GridCheckBoxItemRenderer's source code?
    Thanks

    Hi Zolotoj ,
    Please go through following links :
    http://stackoverflow.com/questions/1952940/show-itemrenderer-in-specific-datagrid-rows-oth ers-empty
    http://www.flexer.info/2009/01/09/different-rows-in-datagrid-programmatically-added-itemre nderers-classfactory-and-ifactory/
    It will provide you some idea to how to proceed further for this problem.
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • Are laggy adjustments/rendering camera specific?

    The thread on thumbnails got me to thinking, some people report snappy adjustments, quick rendering and great performance with A3. Others (like myself) experience slowdowns on some photos after applying several layers of edits to a photo ("processing" thumbnails, slow rendering of adjustment changes etc.)
    Just a few things that tend to take a long time to render an updated screen view for me (i.e. I get a low quality jaggy preview and it takes up to 20 seconds to "sharpen up" and show the changes:
    . ANY changes to the Raw Fine Tuning brick, especially in 100% view
    . some brushes take a long time to render changes (skin soften and sharpening to name a couple) again, worse in 100% view
    . noise reduction (worse in 100%)
    . Edge Sharpening (worse in 100%)
    . rendering a proper image after zooming 100% into a photo after it's been adjusted moderately with the above adjustments, or cropped/straightened. Also slow to render if scrolling around in 100% view.
    Notice that the worst wait times tend to appear in 100% view, though zoomed out sometimes I still get the "loading" pinwheel. These are adjustments that I prefer (justifiably so) to do in 100% view but the lag is just terrible sometimes. Some photos are worse than others, and it tends to be worse as the adjustments pile up.
    My equipment is listed in the sig, my MBPro tends to be a bit faster than the iMac. Before you ask, I've done all the standard performance enhancing things (previews settings, faces off, defrag etc etc etc).
    I am using Canon 7D full size raw files (18mp, ~25MB files). A couple people in the other thread mentioned this sort of lackluster performance with their 7D files, and I've seen people with 5DMk2's complain as well. I wonder if Aperture has a hard time dealing with large raw files, specifically Canon raw files.
    So informal poll, three part question:
    (1) Are you experiencing slow downs in rendering of adjustments on your photos, especially at 100% view?
    (2) What type of file from what camera are you using (i.e. large .jpg from Nikon D70, full size raw from Canon 1dMk4 etc)
    (3) What is your computer set up?
    I wonder if this is a trend, and am just curious to see if my wild theory has any merit.
    I see no reason why my two machines run LR and PShop flawlessly and with instant graphical feedback of ALL adjustments, while A3 lags and chews on the adjustment for up to half a minute before showing me what my sharpening move did to the photo at 100%.
    If it is some sort of trend, maybe it's fixable in a software update that might be forthcoming. I really, REALLY like Aperture 3, it's pretty much exactly what I want/need for a photo management/editing program (save for the lack of output sharpening, but that's another thread for another day :)) I just wish it was as snappy as the Adobe products with my 7D files.

    I certainly think that the size of the file is a factor . My 5d MKII files (>20Mbyte) are slower than files from my S90 (around 10MByte ), but on my system configuration perfectly manageable and usable.
    I think the file size, GPU memory/speed and memory in general are all factors that interact together to create what some see as lags and slow downs.
    Sharpening and noise reduction is a fairly intensive algorithm to apply in real time ( I know, I have written code to do it in non real time and it's a lot of pixel sampling and comparing, computing ).
    I have conducted extensive testing with Aperture 3.0 and for that matter Lightroom as well ( lot's of people point to LR as being much better and I'm fed up with the generalization ). The reality is, both programs struggle to keep up with the application of real time application of localized brush strokes with large files, especially when you have lots of adjustments applied. I have some interesting data comparing these things and might publish it one of these days.
    I think Apple need to be realistic with minimum system requirements to run fully all of the features with programs like AP3. Sure, you can apply adjustments to a small JPEG when you only have 1GB of RAM of 128MB GPU RAM etc, but it's common sense that at some point when you files are 20, 50, 100MB you are going have an issue when you are attempting to overlay in real time multiple computations to an image.
    I also think Apple has not yet optimized the code in this area. I have carefully monitored the number of processor threads, memory usage and CPU cycles when some of these things are being applied and, while I am not privy at all to anything under the hood with Aperture, as a fairly seasoned software developer of real time automation software, I think they have some tweaking to do, that will make this better for more people across a range of hardware and image sizes. At least I hope so! It will be interesting to see what the next update brings.
    AP3 is really a very, very powerful tool and I liken it to the first and early releases of Final Cut in the video world. I remember lots and lots people complaining about performance with Final Cut - mostly it was the system setup, limited resources in the machine and not yet knowing the best work flow. I see the same trend on some of these threads with AP3.
    No doubt in my mind Apple could have done a much better job of quality control here and I fear they bowed to pressures to release something early. For some the out of the box experience has been good for others not so much. I have no doubt they will get it right, but it doesn't help people having issues at the moment.
    Just my 2-cents.

  • Rendering only specific portion of timeline

    If you have items throught the timeline that require rendering,
    how do you get it to render only one portion? Using In and out points
    around that area doesn't appear to work.

    No probs!
    as you probably know if you go to main menu>Sequence>Render only you have a range of alternative rendering options depending what you want to render and how your timeline is set (ST or RT)

  • JSF RE-Rendering a specific Component

    hey guys,
    need a bit of help here... I am doing a JSF Page.. where a person selects a vehicle type (vehicle he wants to book for... as in a chauffeurs service) the two options he can choose from are - limo and sedan.
    now as per the choice i need to populate a f:oneSelectMenu.... with available models. say if the person picks up a limo.. then the menu should only show limo models but not sedan's.
    for this i have already put up a listener on the f:selectOneRadio that offers the choice of two types of vehicles. as the person selects any type the listener populates a variable... and a backing bean that fetches the data from the database and populates the f:selectItems... that should go ii the f:selectOneMenu.
    everything till here is fine... even i an populate the f:selectItems in the backingbean. But as this is all in the same page.... i want my f:selectOneMenu to re-render so that it can pick those f:selectItems to show the desired data.
    I have struggled a lot searching on google.. but did not get any relevant solution for this prob.
    Could anyone please help me with this.. It would be great help....
    Regards

    Thanks for your reply sir...
    and yes i would like to do it async. what I want is as soon as the user choses a particular value using the :selectOneRadio, the values in the f:selectOneMenu should be populated accordingly.... both of these components are on the same page. and yes without hitting submit...
    Ok is there a way.. to refresh the whole page... using the valueChangeListener? or something equivalent? anything frm the bean?
    Regards

  • Air 3.0 rendering problem

    I just packaged up an android game using Air 3.0 and the captive runtime (very excited about that!)
    Much to my surprise I now have a few new rendering bugs.
    (GPU mode / full screen, Android 2.3 Motorola droidX)
    Graphics are intermittently missing, then will appear later than they were added.
    I have a movieClip which is "tiled" with an image pattern from the library. This "pattern" movieClip is the only one which is randomly failing to appear, also the seams where the image repeats are now slightly off/overlapping a bit.
    when i minimize the app... if i open it back up later, it might start to open, then just drop back the the apps menu... basically it crashed. When i open it next the game is starting from scratch when it should have been in a paused state.
    this is all intermittent and only happens in 3.0 (except the slightly overlapping image tiling made w the paint bucket tool, thats constant)
    I'm going to do some more testing with this...
    Has anyone else noticed any differences in rendering/performance specific to gpu rendering?

    the texture i was using was a funny size.
    Although this had worked fine in all other version of Air, I changed the texture (.png) to 256x256 and the seams match up normal again.
    However i am seeing a difference in GPU behavior, i will try and take it up in the Air 3.0 forum here
    http://forums.adobe.com/thread/891523?tstart=0

  • Cell specific rendering with default renderers?

    I searched but I can't find the answer to my (hopefully) simply question.
    I know that I have to overwrite the getCellRenderer method in my own JTable class to specify cell specific renderers. Now my problem:
    I want to use the same renderers as the default one does like rendering a boolean value as a checkmark. How can I do this? What instance do I have to return to accomplish this?
    Thanks in advance!
    Chris M.

    How about creating your own TableCellRenderer for the column? In it you have a check, and if that check is met, return a custom component, otherwise, just return the default component by calling DefaultTableCellRenderer's version of getTableCellRendererComponent.
    public class MyTableCellRenderer extends DefaultTableCellRenderer {
        public Component getTableCellRendererComponent(JTable table,
                                                       Object value,
                                                       boolean isSelected,
                                                       boolean hasFocus,
                                                       int row,
                                                       int column) {
            if (<your condition>) {
                return <special component>;
            } else {
                return super.getTableCellRendererComponent(table, value, isSelected, hasFocus,
                    row, column);
    }Then set that renderer for your table column:
    MyTableCellRenderer myCellRenderer = new MyTableCellRenderer();
    TableColumn myColumn = myTable.getColumn("myColumnName");
    myColumn.setCellRenderer(myCellRenderer);Hope this helps!
    Barb

  • How to set table cell renderer in a specific cell?

    how to set table cell renderer in a specific cell?
    i want set a cell to be a button in renderer!
    how to do?
    any link or document can read>?
    thx!

    Take a look at :
    http://www2.gol.com/users/tame/swing/examples/SwingExamples.html
    It is very interesting, and I think your answer is here.
    Denis

  • Help needed in JTables

    Hello,
    Can any one help me in a small question.
    I use JTable to display some values it is a two dimentional table.
    Now can any one tell me how to put an icon in to a particular cell of the table
    it may be and cell.
    Best Regards,
    Sreedhar

    You can use a custom TableCellRenderer to do this. There are good examples of doing this in the JTable lessons in the turorial on this site. To put icons in particular cells you need to define the conditions where a icon should be displayed and then code that logic into your renderer.
    After you have read the tutorial and started on your own renderer post specific questions.
    Cheers
    DB

  • Why do images within a PDF look jagged when viewed in Acrobat Pro 10.1.6?

    Using a MacBook Pro running Mac OS version 10.7.5 with NVIDIA GeForce GT 650M 1024 MB graphics card. High-resolution source images look fine in other software, and embedded images in a PDF look fine when viewed on Google Drive, but curves and diagonal lines look jagged when viewed in Acrobat Pro 10.1.6. Checking smoothing options in Preferences only adjusts the position of the jagged edges; it neither enhances nor ameliorates them.
    I created a sample PDF to illustrate the problem I'm having. Created in illustrator, exported to PNG and converted to PDF. Here is a screenshot of the source PNG side-by-side with the PDF I created from it:
    Please note that when I preview the PDF in Finder, and when I view the PDF in Chrome using Google Drive, the image looks fine. Here's a link to the sample PDF:
    http://www.sendspace.com/file/77f5m6
    Any assistance is appreciated. Thanks!

    Unfortunately, as I mentioned in my original post, I've already tried toggling smoothing options. They don't make the jagged edges go away—they just change them slightly. In some cases, as with the sample file provided, it does help smooth the art out, but it never looks as good as it did going in, in a recent project, toggling smoothing options didn't affect the appearance of the image at all. Zoom does not appear to relieve the artifacting.
    A little clarification: this PDF was created from a flat PNG, but I have had this issue with PNGs and TIFFs as well, generated by both Photoshop and Illustrator. To reiterate, the PDFs display fine in other software—Finder preview looks great, and the same file viewed in my browser via Google Drive looks as intended as well. A colleague was able to replicate this issue in Acrobat on his Windows machine. This appears to be a rendering issue specific to Acrobat with regards to the files I use it to create.

  • Error compiling movie 'unknown error' premiere elements 11, tried every troubleshoot, what now?

    I'm trying to export a video and I keep on running into this error message, which stops the export process.  I've already visited and tried the troubleshooting suggestions on this page and this page, and this page, and none of those suggestions have worked.  Here's a list of what failed:
    Export in various file formats, every single one failed
    I removed each asset individually and tried to export the video after each removal (100+ assets, imagine how long that took) and I got the error after every single time
    I removed the front half of the video and tried exporting, still failed.
    I removed the back half of the video (because if it failed if I removed the front, the problem asset should be in the back, right? nope.) and tried exporting, it still failed.
    I don't have any Auto Color, Auto Contrast, Auto Levels, or Shadow/Highlight on any of my clips, although if I did, I'd try removing them.
    All of my video files are the same format, so it's not a mix of formats in my timeline which is causing the problem.
    I tried disabling auto-save, but it already tried to auto-save during the first 20 times I've attempted this, so the damage might already be done.
    I obviously didn't use any other programs during this process
    I moved all my assets to a different location on my harddrive, then reopened the project and refound the assests one by one, each of which had no problem getting into the timeline.  I tried rendering after this, and the render bar sailed along until a certain point, where it got stuck indefinitely.  I cancelled the render, which froze the program.  I had to close it and re-open the project, and re -link every asset again.  Once again there were no problems adding the assets.  I saved the project before the next render, so I wouldn't have to do this a third time, and it was a good idea I did, because the program froze again during the subsequent render.
    My computer didn't go to sleep or hibernate during the first 5-10 times I tried various methods for exporting.  It has slept in some of the 10+ times I've tried it since, because I don't have the patience to sit in front of my screen and watch it fail again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again.  CAN YOU TELL THAT I'M FRUSTRATED???
    The first thing I noticed that was wonky with this project was when I first tried to render my sequence. The render window chugged along just fine until it got to a certain point (can't remember the %), at which point it got stuck indefinitely.  I had to cancel the render, and then render other parts of the sequence bit by bit, avoiding what I thought was the problem part.  I tried rendering the problem part, and it got stuck again, so I eventually just decided that that clip didn't need to be in this movie, so I deleted it from the timeline.  All should be good at this point, my whole timeline is green from being rendered.  But, when I tried to export the video, I started down this tourtuous path of failed exports and frustration, and now here I am, posting in the forum, hoping someone can help me out.
    The problem asset (if that was the problem in the first place) isn't in the timeline any more, but I'm still having issues exporting the movie.  The fact that rendering still gets stuck after re-linking assets, and after getting rid of the first problem asset, makes me think that there is some bigger underlying issue, but I have no idea what that could be.  I followed these instructions and re-opened the project, tried to export, and still got that 'Unknown Error'.
    Please assist before I put my fist through this company computer.

    maxlong99
    Thanks for your update. Let us go through it.
    You wrote
    During one of my isolation tests, I stripped the timeline off all assets except clips from the same footage and I also removed that New Blue effect, and the project exported without issue.
    Did you run a control which included "with the New Blue effect" in this isolated test which does not sound like the "Full Project" as suggested in what you wrote next?
    You wrote
    Could multiple renders and project files be part of the problem?  I've created many, many different versions of this project to test and see where the problem is, which in turn means I've created many different render files for each different project.  If this could be part of the problem, should I keep the original project and delete all my test projects and associated render files therein?
    Each of the projects should have its own name which will be applied to its files. And each project should have rendered files specific to it (for SD project whether video or still clip = DV .avi file; for HD project whether video or still clip = MPEG2.mpg file). Are you naming these different projects with distinctive names?
    Have you expanded the Timeline with the -+ slider and closely inspected the track content for
    a. leftovers such a very thin vertical black lines scattered about
    b. gaps
    c. transitions, and especially audio placement
    You have probably seen the following, but I will post the link just in case. I suspect you have been there and done that.
    http://helpx.adobe.com/premiere-elements/kb/error-error-compiling-movie-render.html
    Please let us know what the closer inspection of the Timeline content (as mentioned) revealed.
    Thanks.
    ATR

  • Document Language not exported into PDF when viewed in Acrobat Pro 9?

    I've been working on making our PDFs accessible, but it looks like the LiveCycle-generated forms are causing some issues. While I can set the Form Locale in LiveCycle ES (8.2.1), generating a PDF from this and viewing it in Acrobat Pro 9 leaves the Reading Language field greyed out. I'm new to LiveCycle, so it might be something simple (but I've tried Googling everything).
    I've tried saving it as both a Static PDF and Dynamic XML PDF form without luck. The Generate Accessibility Information Save Option is checked. I am doing a Save As rather than in-app generation (I understand this can be the cause of some issues).
    Help!?

    Unfortunately, as I mentioned in my original post, I've already tried toggling smoothing options. They don't make the jagged edges go away—they just change them slightly. In some cases, as with the sample file provided, it does help smooth the art out, but it never looks as good as it did going in, in a recent project, toggling smoothing options didn't affect the appearance of the image at all. Zoom does not appear to relieve the artifacting.
    A little clarification: this PDF was created from a flat PNG, but I have had this issue with PNGs and TIFFs as well, generated by both Photoshop and Illustrator. To reiterate, the PDFs display fine in other software—Finder preview looks great, and the same file viewed in my browser via Google Drive looks as intended as well. A colleague was able to replicate this issue in Acrobat on his Windows machine. This appears to be a rendering issue specific to Acrobat with regards to the files I use it to create.

  • Weirdness when trying to use javascript to submit a button on a jsf page

    code in question:
    document.forms['logoutForm'].elements['logoutForm:_id7'].click();
    alert("button clicked");
    This works fine as is, the form gets submitted. I have to use this because there are multiple submits in this form for different things. Edit: What I mean is that I am submitting if the user presses the enter key from a text input and since I have multiple submits, I have to choose a particular one, I can't just use the form.submit() function.
    The problem arises if I take out the alert. No alert box, it stops working - no submit. Alert popup included, I get the popup, but the page submits correctly AFTER I close the popup, even though the alert is after the submit in the code.
    Anyone know what gives and how I can get the submit to work without the alert?
    Message was edited by:
    kdavenport
    It appears that this might be an IE issue as it works in Firefox. Any thoughts?
    Message was edited by:
    kdavenport

    This reply skirts around your actual question, but perhaps it may be useful for your situation. This link describes a JSF component that allows you to define the default action for your page, that is, the one that gets submitted when the Enter key is pressed:
    http://www.jsftutorials.net/defaultActionTag.html
    Note that you will see some warnings flash across the console when this component loads on the page (if you're monitoring that). As I understand it, this is because no renderer is specifically assigned for this component. Your default renderer will kindly do the job, but you'll still see the warning in development. It's nothing to worry about.

  • Hyperlinks do not open in iPad landscape mode

    Hi,
    We have our application in SharePoint 2010 and we have an issue wherein hyperlinks do not open in iPad when held in landscape mode. However, the links are opening when iPad is held in portrait mode.
    Any help would be appreciated.
    Regards,
    Vijay

    Hi,
    According to your post, my understanding is that you filed to open Hyperlinks in iPad landscape mode.
    It seems to be a Brower issue.
    I recoemmend to use the Width attribute to control the rendering contents, specifically for the pages with custom branding and Mobile view turned off.
    You can refer to:
    Managing SharePoint Rendering on Mobile Browsers (iDevices)
    Regarding iPad, for quick and accurate answers to your questions, it is recommended that you initial a new thread in iPad forum.
    Using iPad https://discussions.apple.com/community/ipad/using_ipad
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Draw image in a indexed bufferedimage

    When i draw a image in a indexed bufferedimage the destination image is distorted. As source image i use a 256 color gif image. But when i use a TYPE_INT_RGB bufferedimage it's all good. I don't get it. Here's a is the simple code i'm using.
    Image image = new ImageIcon("E:/Java/MapEdJava/MapEditor/pics/"+ImageName).getImage());
    BufferedImage bi = new BufferedImage(image.getWidth(this),image.getHeight(this) , BufferedImage.TYPE_BYTE_INDEXED);
    Graphics2D g2d = bi.createGraphics();
    g2d.drawImage(image, 0, 0, this);

    First, a plea to all posters: if you write "why does my code do this..." either include a brief program that recreates the problem, or give the url to such code. On one hand, posting a long listing doesn't encourage assistence from the forum -- you should be motivated enough to recreate your problem "in the small". On the other hand, not posting enough information doesn't help either: for example, if a particular image is giving you grief, include its url, or find an image with a publicly-reachable url. [Getting off soapbox :-]
    Here's some quick&dirty code that, perhaps, demonstrates the poster's problem. It features a certain bald, chunky guy (no, not me!)
    import java.awt.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class ImageTest extends JComponent {
         public static void main(String[] args) throws java.io.IOException {
              java.net.URL url = new java.net.URL(
    "http://java.sun.com/people/jag/JagWithDukeSmall.gif");
              JFrame frame = new JFrame(url.toString());
              Image image1 = new ImageIcon(url).getImage();
              BufferedImage image2 = javax.imageio.ImageIO.read(url);
              BufferedImage image3 = new BufferedImage(image2.getWidth(),image2.getHeight() ,
                   BufferedImage.TYPE_BYTE_INDEXED);
              System.out.println("image2 colormodel="+image2.getColorModel().getClass().getName());
              System.out.println("image3 colormodel="+image3.getColorModel().getClass().getName());
              Graphics2D g2 = image3.createGraphics();
              g2.drawImage(image1, 0, 0, null);
              frame.getContentPane().add(new ImageTest(image1, image2, image3));
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.pack();
              frame.show();
         Image im1, im2, im3;
         ImageTest(Image im1, Image im2, Image im3) { //assume loaded into memory
              this.im1 = im1; this.im2 = im2; this.im3 = im3;
         public Dimension getPreferredSize() {
              return new Dimension(3*im1.getWidth(null), im1.getHeight(null));
         protected void paintComponent(Graphics g) {
              g.drawImage(im1, 0, 0, null);
              g.drawImage(im2, im1.getWidth(null), 0, null);
              g.drawImage(im3, 2*im1.getWidth(null), 0, null);
    }Why is the third image grainy? I tried adjusting g2's rendering hints, specifically KEY_COLOR_RENDERING and KEY_DITHERING, but I couldn't see any difference. Perhaps the graininess is because image3 is constructed with (I assume) a generic half-tone(?) IndexColorModel. If you know your image has lots of blues, you could construct an ICM with more blue-tones and pass it to constructor:
    BufferedImage(int width, int height, int imageType, IndexColorModel cm)On the other hand, image2 has an ICM and it looks OK -- why not load images using java.imageio.ImageIO.read()?
    --Paul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for