Good Explanations for Editors and Renderers

Hi
I need to write some custom renderers and editors for both trees and tables for a project I'm working on. I've looked at the Java Swing Tutorial, but it doesn't really explain how they are coded or how they work etc.
I've search the web and all the examples I've found don't explain how they work etc (lack of comments etc).
My needs are to use both panels with lots of objects and thing like Check boxes.
from the stuff I've tried doing, I've been getting some very strange results and bits disappearing etc. I'll try to put together a simple example and post it.
Thanks for your help.
Nick.

Hi
Apologies for the late response.
That link was most useful.
I tried searching for one relating to trees as opposed to tables, but couldn't find one.
Is there any major differences between renderers for trees and tables or are they fundamentally the same.
Thanks.
Nick.

Similar Messages

  • Differrent CELL Editors and Renderers in a Column

    Is it possible to have different cell editors and renderers within a single column? I would like to have text, CheckBox and ComboBox on different rows and within the same column.
    If yes, pls point me to somthing that describes this process.

    One thing that is often overlooked,due to a poor naming choice by Sun, is that a Renderer is not forced to return this as the component that will ultimately paint the cell: the only job of a cell renderer (as per the interface TableCellRenderer ) is to provide a component to do the painting. It is free to re-used the same component as much as possible (as a memory optimization), but it can also return either JComponent out of a set of 3.
    For example:
    public class MyRenderer implements TableCellRenderer {
        private JLabel componentThatRendersFoos;
        private JLabel componentThatRendersBars;
        public void getTableCellRendererComponent(...) {
            if (whatever criterion that identifies the cell as a foo) {
                componentThatRendersFoos.setBackground(...);
                return componentThatRendersFoos;
            else if (whatever criterion that identifies the cell as a bar) {
                componentThatRendersBars.setBackground(...);
                return componentThatRendersBars;
        }And similarly for editors.
    This has the advantage to enable to configure the renderer without havingto subclass JTable.
    Edited by: jduprez on Jan 20, 2011 10:51 PM
    Here is a reference to a discussion about the mixed concepts in renderers: {message:id=9161690}

  • Is (4770 3.5 i7 qouad core 8 mb cach) good enough for premier and after effect?

    Hi guys,
    am buying the new imac 27" with its maximum features: 32 GB, 1 TB ssd, NVidia gtx 780 with 4GB, but I am worried about the cpu (4770 3.5 i7 qouad core 8 mb cach) is it good enough for premier and after effect?

    Thanks John, but I've already read that page. I have just a simple question about the performance of "4 core" and "6core" if anyone had already tried both of them.

  • Good source for tables and reports

    Hello!
    Does any one know a good source for tables and reports in SRM (EBP) I really
    looking to report on the Org Structure.
    But any information you can give me would be really helpful.
    Regards
    sas

    Hi,
    See these threads :
    SRM Tables
    SRM Tables
    Re: Availability of Standard Reports in SRM
    SRM standard reports?
    SRM Reports
    For developing custom reports,you can use the stanadard tables and Function modules.
    BR,
    Disha.

  • Is it OK to re-use 1 instance of editors and renderers?

    Hi,
    The simple version of the question, is can I make 1 instance of my custom cell editor and cell renderer classes and safely use it in all my JTable instances?
    For example, I have a DateRenderer class, and instantiate it in a static member, and use it in all Date columns and tables, many of which will be instatiated at one time. If a column needs a non-default format, then I guess I'd create a special instance for it, other wise it would use the default instance.
    It seems to be OK so far, but but my program hasn't received any serious usage yet.
    As to why, I'm thinking this way, I've been messing around with CellEditors and renderers and despite wanting to use default functionality whenver possible, I find that I'm using custom versions for every situation... so if possible, I'd like to keep the number of instances to a minimum.
    Regards
    Iain

    OK, I see what you mean.
    Stop cell editing on focus lost isn't the default behaviour, but I've had to use it anyway (it seems to make sense).
    The reason I asked is that, to get the behaviour that I want, it looks like I'll have to have my custom renderers and editors on every column of every table so I'd like to avoid unneccessary instantiation.
    I'm aiming for a system where:
    - 1 click selects the row (default behaviour),
    - 2 clicks starts editing the cell (also default),
    - but tabbing or pressing enter after editing a cell keeps you in editing mode.
    I don't suppose that many people here have had experience with this, but entering Japanese (and presumably other non ascii type character sets) using MS's IME doesn't work very well with the standard JTable behaviour. If you don't double click, the entered japanese text appears in a little IME window somewhere on the screen (no neccessarily near the editing cell) and just gets lost when you press enter. You have to double click every time, and I can't see the users accepting that.
    I'll be investigating this over tme, and hopefully will be able to get it working smoothly.
    Thanks,
    Iain

  • Good graphics for black and white books?

    Can anyone suggest a website where I can get good compostion ideas for black and white work, layouts for books? Actually I’m working on a book on house designs so would like to get ideas for visual layouts for the same, captions, blow-ups etc.The book would have 3d sketchup model views of different types of house designs.

    Maybe a library or bookstore would be a better source, since you're designing a book.

  • Scriptable mail client with good support for html and flash

    Hi,
    on one hand I'm looking for the uzbl/luakit/.. equivalent in the mail client world: I want a very high level of control over how mails are fetched, filtered, displayed, scripts, keybinds, etc etc.
    On the other hand I also want the client to handle html mails properly, even when they include html5 sound/video clips and/or flash widgets/videos.
    This might sound ironic, but I use rss2email to get all my newsfeeds delivered to my mailbox.  I think this makes a lot of sense, a centralized repository for all the messages I want to get.
    But those newsposts often contain html5 and flash widgets, which I want to be able to use from inside the mailclient.
    Also I expect usage of the xdg basedir spec and sane use of files (a simple text config file, and maximum a few binary files for caches/indexes etc)
    A good search system based on sup/notmuch/xapian would also be welcome.
    I just can't find a mail client like this.  Any suggestions?  Maybe anything that's close, so I could hack it a bit myself?
    Claws-mail is the least sucky client I could find, but still it doesn't give me the advanced scriptability, it makes a mess in my homedir and doesn't support html5/flash.

    Thid may take you a bit away from your current setup, but if you have used sup you shouldn't be too scared ;D
    Ive started using mutt a while back, and if properly configured it can do a _lot_ of things and very well at that too!
    Anyway, to answer your post:
    1) Mutt can be configured to retieve your rss feeds, so you dont need to use rss2email and still get a centralilsed repo for your email and rss and, you will be able to keep your email account uncluttered with rss mail (but thats personal preference).
    2) Intrinsically, like all CLI mail clients, butt doesnt show html/html5 or embedded flash in email. /BUT/ you can configure it to use a differen program to handle this automatically.
    So, you will be able to get say uzbl, or jumanji or surf (if you're into your lightweight browsers) to open those multimedia emails. Edit: it seems you will probably have to use links2, but you may be able to use other clients (they will have to open as a seperate application though, whilst links2 is able to stay embedded. Maybe this can be done with the other browsers but I haven't tried nor researched this.
    Generally as: (in .muttrc)
    # enriched messages
    auto_view text/html # view html automatically
    alternative_order text/plain text/enriched text/html # but save it for last
    Credit for that snippet goes to something i found on dotfiles. If I ever find the author's name, I shall edit it in here.
    You will also need to create a .mailcap file with the relevant data. A basic google search reveals some good tutorials for this.
    Last edited by GalacticArachnid (2010-12-03 02:01:42)

  • Some good links for applications and games of all ...

    hi
    i recently applied a new 6280 and ive been wondering where i would obtain games and applications from. my mates have got some but they cant send them because you cant send things that automatically install in the phone. i heard theres an application that lets you send things that are installed into the phone eg. games, apps etc.
    anyway, please write some links for GOOD nokia 6280 games and applications.
    thanks very much.

    There's quite a few websites which offer you applications and games for your phone, but the Terms and Conditions of this site prevent recommendation of any specific ones.
    As a first stage you can go to the following website which will give you a sampler of the types of applications that are available for your phone :
    http://www.softwaremarket.nokia.com/Message Edited by edwardquan on 09-Jun-200711:13 PM
    Regards,
    Edward

  • Help! Need a good laptop for school and editing. Budget is around $800 (Canadian).

    I'm looking for a laptop for around $800 Canadian, I'm starting a science and technology program in high school so I will need decent graphics performance for editing and 3D modelling. My budget is a bit flexible but only by around $100 for a significantly better product. I've had my eye on the Lenovo y40-80 but some people say it's great and other call it a dissapointment. I was thinking about either ASUS, Lenovo, or MSI.  Any suggestions would be helpful, Thanks.

    I own an ASUS and a MSI laptop.  A little advice for you.... Visit the store and see if you can play a YouTube video.one laptop display appears dimmer and not so brightthe other laptop does a very poor job of rendering colors (especially with skin)Can't say this is a problem with today's newer machines.  But it was something that has troubled me.

  • Dual 2.3 G5, good enough for LP8 and rewire with Abe Live ?

    I have a Dual 2.3 G5 which i run with Logic Pro 7 and many plug-ins. There are only a few times when i freeze tracks and knock on wood my system runs really well.
    However i wanna upgrade to Logic Pro 8 and Live 7 and don't want to upgrade my machine until i can afford a Mac Pro 8 Core.
    Will my machine be able to comfortably run Log and Live rewired ?
    Or should i upgrade to an intel iMac for the time being, will that b considerably faster than my G5 ?
    Thanks
    F

    just make sure you have enough ram.
    I'm using Reason and Live 6 with no problems.
    If it's a big orch thing then I have to freeze tracks. Otherwise I'm using a 256k buffer all the time for tracking and mixing. If I start having trouble, then I'll bump up the buffer when mixing.
    It's hard to believe these machines are long in the tooth, but they are.
    I'm on the fence about getting a new machine, since everything is working so well now......but ymmv.
    Logic 8 is tons better than Logic 7.
    that's funny about guava!

  • Good Software for G3 and Tiger

    I am about to recieve an iBook G3. And will upgrade it to Tiger. And it seems to be a little difficult to find software that works on a G3, I would like to know if any of the apple community knows of any good free/paid software. I would appreciate you help
    Written on my iPod Touch 2G

    Two good places to look for software:
    http://www.versiontracker.com/macosx/
    http://www.macupdate.com/
    And for free alternatives to some popular software packages:
    http://alternativeto.net/

  • Is this a good way for loading and handling an xml file?

    I'm new to xml files, but it seems to me that a good way to handle them may be this:
    - create an xmltype table with a unique xmltype column
    - load the xml file in the xmltype column of the table
    - writing a procedure for scanning the whole column of the table by using the extractvalue built-in function for inserting the different nodes of the xml file (just loaded) in the final tables (to link correctly the father and son tags with foreign keys)
    Does it seem to you a good way to load the nodes of a xml file in a relation database?
    Thanks!

    Is this the 10gR2 Express Edition you mentioned over in How to load a XML file into a table or a different version?

  • Adobe Premier Elements 13 Win 8.1 64 Will not open. I get the login prompt for editor and sign in but nothing else happens.  I have uninstalled/reinstalled but get the same results.

    Premier elements 13 will not open after logging in.

    donaldc
    Let us go through the typical drill on your Premiere Elements 13 Window 8.1 64 bit issue, and then we can focus in more based on your replies.
    1. Does the problem exist with and without the antivirus and firewall(s) disabled?
    2. Are you using a pen and tablet device or mouse?
    3.According to the Device Manager/Display Adapters, what video card/graphics card does your computer use? How many cards, and is driver version
    up to date?
    5. Are you running the program as Administrator? Do you have the latest version of QuickTime installed on your computer?
    Please look at the following solutions for 12 to determine if they will work for you in 13.
    ATR Premiere Elements Troubleshooting: PE12: Premiere Elements 12 Editor Will Not Open
    Have you tried to open the program by going to the Adobe Premiere Elements.exe file, right clicking it and selecting/applying Run As Administrator, and then double
    clicking that file to open the program?
    If none of the above works, then delete the Adobe Premiere Elements Prefs file in the path
    Local Disk C
    Users
    Owner
    AppData
    Roaming
    Adobe
    Premiere Elements
    13.0
    and in the 13.0 Folder is the Adobe Premiere Elements Prefs file that you delete. If that does not work, then delete the whole 13.0 Folder in which the
    Adobe Premiere Elements Prefs file exists. Be sure to be making with Folder Option Show Hidden Files, Folders, and Drives enabled so that you
    can see the complete path cited.
    We will be watching for your results. Any questions or need clarification, please do not hesitate to ask.
    Thank you.
    ATR

  • Good book for edge and coding?

         Hello, i'm trying edge, everything works well..till the code start.
    i can copy things from other users or sites, but to understand would be beter, so that i know what i'm doing.
    Is all the code i see, just html? and is it 4 or/and 5
    or maybe a mix of different languages?
    Does anybody know a good clear book...I'm dutch, prefer also dutch, but don't think there is something good.
    So clear english is also good.
    There is a book as Edge animate for dummies...but maybe not the best, for my wish???
    grt marcel

    Hi, marcel-
    What you're seeing in the code is actually JavaScript, so you might want to get a book on that language.  There is also quite a bit in there that is specific to jQuery.  Reference manuals for both are available online, but if you're really looking for a book for a deeper understanding, those are the two topics that I would recommend.
    Thanks,
    -Elaine

  • Good news for Nokia and the N8

    Extract from a review of 2010 which isn't that kind to Nokia in parts but does include this -
    "The year drew to a close with the launch of Windows Phone 7, complete with an Office hub and Exchange readiness, to great fanfare and much TV advertising. Unfortunately for Microsoft the market reaction was distinctly "meh", with many retailers finding the mobile devices hard to shift, and only a rumored 40,000 sold in the first day. That might seem like a large number, but early indications are that Nokia's N8 running Symbian^3 is outselling Windows Phone 7 devices by a margin of 3 to 1."
    Enterprise Mobile
    And it looks like us N8 users have good things to look forward to in 2011 ....
    Top of O’Hara’s agenda is for Nokia to steal back some of the high end.
    “In the first half of 2011, you will see us become serious competitors with the N8, C7 and C3 smartphones. Maps, music, social networking and location-based services will all become more prevalent this year and we will be at the forefront of all of them.”
    Irish Times
    My current phone - Samsung Galaxy Note

    It wasn't a QT update. If you install the P2CMS software, it adds a component that allows you to read the MXF files. It was a happy discovery that I found when someone else posted how they were able to see the MXF files in QT and import them directly (without the Log and Capture) but were miffed that they had to sync audio later. I told them that they imported incorrectly, but was amazed that suddenly the Mac saw the MXF files.
    Still better to import the proper way..this way audio and video are tied as one file.
    Shane

Maybe you are looking for

  • IPhone 3G will not sync with Exchange 2003 after updating to 4.0.1

    I keep reading a lot of posts about users who updated to 4.0 not being able to get Exchange to sync and 4.0.1 was supposed to fix that however I just updated from 3.something to 4.0.1 and now my Exchange 2003 server email will not sync (kind of) and

  • When I click on a bookmark folder it doesn't stay open.

    This is a minor problem, basically an inconvenience. I click on Bookmarks on the menu bar and it drops down correctly. When I click on a folder in the bookmarks list, it no longer holds that folder open as I move the mouse across to select a bookmark

  • Clob field not working in BEFORE INSERT trigger

    Hello, everyone. I am trying to create a before insert trigger for a table (10g). I would like to create a value for a table field based on the xml query from a clob field. The table looks like this: SQL> desc lac_costing_upload Name Type Nullable De

  • Encrypt ear/war files

    hi my team is using oracle 10g Application srever[9.0.4] and jdeveloper.. ear/war files are prepared for deployment. can i encrypt them while deploying them at custmers site for testing.. regards avinash

  • What's with the diagonal line through Finder's video preview thumbnail?

    I recently upgraded to Snow Leopard, and while I really like the ability to play video files right from the icon in Finder, the thumbnail icon and subsequent video is split diagonally by a line.  The video quality on the upper left portion looks to b