UI-delegate architecture for complex components

Hello,
I've got a question regarding how to architect a new complex component (similar to a color-chooser for example) to be very reusable and configurable with respect to the Swing architecture:
When implementing such a reusable and configurable component (like a color-chooser for example) should I implement an UI-delegate fitting into Swing's MVC way, or should I implement the view on my own architecture following more general MVC.
The component I am about to develop is a composition of other controls (like a color-chooser is compound of a tabbed-pane, a few buttons, a few panels, and a few sliders). So does implementing a UI-delegate with such a coarse-graind component make sense? I seem (or at least hope) to have understood what a UI-delegate is intended for when dealing with atomic controls (like buttons, labels, comboboxes, etc.), but does a UI-delegate make sense when dealing with larger aggregated components?
For instance, when setting a custom UI-delegate implementation for a JColorChooser (overwritten from javax.swing.plaf.basic.BasicColorChooserUI), the "paint"-method gets called but seems to be useless, since overwriting it does not produce any effect on how the color-chooser is presented (as I expected, since the JColorChooser is made out of other controls and therefore does not implement its own painting directly). So am I missing some important point here, or is the UI-delegate thing not really intended for compound components made of other smaller ones, and therefore - for the compound components - just a retrofitted implementation to make all Swing components alike?
So my question is about architecture of a larger component than for what I believe a UI-delegate was intended for. But though I would like to be as close to Swing's way of doing it as possible... So if it would be cleaner to fit my component into the UI-delegate way of doing it, how - for example - do I register a default UI-delegate implementation with the current L&F? And what happens if a user switches to another L&F that does not implement (neither directly nor through inheritance) my component's UI-delegate?
Please correct me if I am missing some point here or heading into the completely wrong direction!
Steve

Hi,
it seems you are talking about javabean.

Similar Messages

  • Architecture for Design in Swing

    Hi,
    I am developing a standalone application using Swing.
    It is recommended to use GridBag Layout for the design.
    Grid Bag Constraints are having 11 parameters to be set to all the components.
    which will increase the lines of code and maintainability issues may raise.
    I request, to suggest an architecture for the same.
    A sample would be helpful to us to build on.
    Thanks in advance.
    Nagalakshmi

    Having started my first Java project (and first OO for that matter) at the beginning of the year, I was tasked to redesign our current GUI (non-Java), which is almost 100 frames. After reading up on different layout managers, the consensus from the books/tutorials that I read was that GridBag was the most complex, but also the most powerful. I tried a few others, but their limitations were obvious to me in short time. Ever since I turned to GridBag, I haven't looked back.
    I suggest you do not use GridBagLayout.
    It's inconvenient.I couldn't disagree more. What's inconvenient about total control?
    You can use BorderLayout, GirdLayout and FlowLayout to
    layout component in many case.True, but I can use GridBag in all cases.
    Grid Bag Constraints are having 11 parameters to be set to all the components.
    which will increase the lines of code and maintainability issues may raise.Very true if you let a GUI builder do it for you. I prefer to whiteboard the layout of my components first, then hand-code it. I also wrote some convenience methods to help me with the constraints and sizing and such, so that I don't have 12 lines of code each time that I want to add a single component, I just have one method call.
    Since I'm running 1.4, I haven't looked at SpringLayout yet (1.5 only, I believe). If DrLaszlo is endorsing it, then that's enough for me to know that I should at least check it out.
    Good luck.

  • Setting Look & Feel - doesn't work for all components...

    Hi there.
    I'm setting the L&F in my application
    (UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());)
    For some strange reason two comboboxes still have the default L&F - all other components switch as expected.
    Anyone ever encountered such a problem?

    There is currently only one delegate distributed for the JSpinner class -- the BasicSpinnerUI class. Ideally, there would also be MetalSpinnerUI, WindowsSpinnerUI, and MotifSpinnerUI classes also available, but, until they are, JSpinner's are going to look the same regardless of the look and feel specified.
    I submitted this as a bug report to Sun several months ago and should be visible on the Bug Parade as bug 4449972.
    On the other hand, I have thought about writing my own delegates for this class. If you're interested in collaborating on such a project, let me know at [email protected]
    Shaun

  • Pusing 2 complex components to one tileList

    Hi
    In a nutshell – I need a way to push 2 separate components
    needing 2 separate item renderers into one tileList – letting
    me set the width of the tileList to 100%.
    I am wanting to use a tileList containing 2 separate
    components and move the contents of the tileList onto a new line /
    row when it reaches the browser / application width limit.
    For example if a tileList consists of many
    “circle” components (“circle.as”), and the
    width of the tileList can only fit 10 of these components per row,
    then the tileList should force / place the remainder amount of
    components onto a new line – which it can!
    E.g. if there are 15 circle components within the tileList,
    the first level row should contain 10 circle components and the
    bottom row should contain the 5 remaining etc….
    This works fine simply by giving the width of the tileList a
    percentage width of 100%
    However, if you need to add more than one type of compoenet
    to a tileList how can you keep this functionality of pushing
    components onto a new row / level of a tileList???
    This is my current problem!
    E.g. lets now introduce a square component called
    “Sqaure.as” and I want to add this square component to
    the same tileList that my circle component is added to.
    Additionally, my components are complex therefore needing
    there own distinct item rendered!!! – Can I still add them to
    the same component using two speerate item renderers???
    Due to the fact that I neend 2 separate item renderers for my
    components (circle and square) I decided to (as a work around) use
    2 separate tileLists to display my components, and then push these
    2 tileLists together aligning them horizontally so they look like
    they are on the same row etc….
    This works, however, I now loose the functionality of pushing
    the components to a new row within the Tilelist(s) as I have to
    manually work the needed widths of each tileList depending on the
    amount of compontens within the tileLists - therefore this is not a
    dynamic / percentage width.
    Basically in a nutshell – I need a way to push 2 separate
    components needing 2 separate item renderers into one tileList
    – letting me set the width of the tileList to 100% and
    allowing the functionality I desire.
    if anyone could help me out on this one - it would be much
    appreciated
    Thanks,
    Jon.

    I suggets combining the two dataProviders. Then you have two
    options. One, use a TileList and create an itemRenderer that
    displays one of the two components, depending on the dataProvider
    item. Two, use a Tile container and a Repeater, and create a custom
    component that switches between the components, again depending on
    the data in the dp item.
    In either case, the item component would be very similar, but
    Repeater does not have the as stringent requirements for its
    components as a TileList + itemRenderer.
    Tracy

  • Architecture for Identity Management

    I have to install the sun identity management platform and configure it.
    Is there a recommended architecture for the installation of components in high availability?
    Thanks in advance

    There is some advice in the documents. I'd look through the Installation Guide and the Deployment Guide.
    At a very high-level, to achieve high-availability, you want to make both the REPO (data tier) layer highly available and make the Application tier (e.g. IdM in an App Server) highly-available.
    There are many questions you have to ask yourself in doing this. Are you making the solution highly-available against the loss of a Data Center, the loss of a Server or some thing else entirely. This also plays into how you want to size the servers.
    Net -- I'd poke through the documents to educate yourself, but would engage someone who has "been there, done that" a few times to make sure you're approaching it correctly and such that you can make simple adjustments in the future based on load predictions.
    Good Luck!

  • Problem with XMLEncoder for complex java object i

    Hi All.
    My problem with XMLEncoder is it doesnt transfrom java objects without default no arguement constructor. I was able to resolve this in my main java object class, by setting a new persistence delegate, but for other classes that are contained in the main class, they are not being encoded.
    Thanks in advance for your answers

    Better to put this in java forum :-)
    Just check, if this helps.
    http://forum.java.sun.com/thread.jspa?threadID=379614&messageID=1623434

  • Prevent creation of reservation for selected components on Production order

    Hello all,
    I am aware that the production order reservation creation is dependant on the order type, but is it possible to avoid the reservation creation for few components on the order ? Any techincal way? We want to issue our components to a different batch than the one reserved during the production order creation.
    Any help will be greatly apprciated.
    Thanks,
    Swetha

    Your material is get reserved for Production order as per the Order start date & Order release. What you can do is make the start date of the Production order & release it. If any other production order are already there & you can re set the ATP of that production order.
    Say there is one production order starting 2 days after & your all raw material is blocked for this production order. And the other production is having date after this now you want to give ATP from 1st order to 2nd order. For this 1st make the start date of 2nd prod order before 1st. Then Go to COMAC select both Prod Ord & GO ATP with check reset ATP. You see that ATP is passed from 1st Prd order tp 2nd.
    Regards
    Abhijit Gautam

  • Planning of Dependent Requirements for BOM Components in Make to Order scen

    Hi Friends - I want to execute a full cycle Make to Stock Scenario with Materials planning using MRP.
    The scenario will include BOM Components with Routing.
    The process flow I want to execute -
    1. Create a Sales Order for a Finished Product (Product should have a BOM for Production)
    2. Do the product Materials Planning for the Sales Order through MD50
    3. Get all the dependent material requirements (both for products as Planned Order and also for BOM Components - all the BOM components should also be planned)
    4. Convert Planned Order for Product to Production Order
    5. Convert Planned Orders for BOM components to Purchase Requisition
    6. Confirm Production Order
    To execute this I have done the following
    1. I have created a Material Master data for Finished Product (FERT).
    2. I have assigned Item Category Group - NORM, and General Item Category group as NORM
    3. I have assigned MRP Type PD in MRP 1 View and Strategy Group 20 (Make to Order Production) in MRP 3 View.
    4. Now created a Universal (Type 3) BOM for the product with one material component.
    5. Now also created a Routing for the Material with two operations having PP01 a control key.
    6. Now created a standard sales order for the product.
    7. Executed the MD50 for the Sales Order Item.
    Now where do I find the BOM components for this material in the Sales Order?
    After executing the planning Run MD50 I am only getting the requirements for Product only. I can't see any dependent requirements for the BOM components.
    How do I make sure that the BOM components are also planned while the product is planned?
    I have checked the component Stock Requirement List - there are no requirements generated from the Sales Order Product BOM.
    Pls help me on this. How to do this so that the raw material components are also planned?
    Thanks
    Purnendu

    Hi Dhaval, Sandeep, Ashok - Thanks a lot for your replies.
    I have checked the Planned Order Created through Planning Run.
    If I click on the Components Tab I am getting following message
    No material components were determined
    Message no. 61027
    Diagnosis
    Until now, no BOM explosion has been carried out or no BOM has been created for this material yet.
    Procedure
    Either explode the bill of material for this material, or
    create the components manually by processing the planned order in change mode.
    If I try to explode the BOM through Header Menu - Edit> Explode BOM
    I am getting the same message.
    If I click on the Bill of Material Tab - I am getting the same above messge.
    Ashok - I have tried both the Selection Method -
    Nil - Selection by Order Quant.
    1 - Selection by Explosion Date
    But with no effect.
    Waiting for your advice.
    Thanks and warm regards
    Purnendu

  • Batches not getting  for order components at time of order creation

    Hi Folks,
    My requirement is that when I create a production order and save automatic batch determination should take place for all components. For this I have done all the settings for eg
    1) Assigment of batch search proceduree to order type
    2) Define batch search strategy,procedure , condition , access sequence
    3) Create batch strategy record for order type/ plant/component by COB1
    4) Create sort rule and assign to batch strategy record
    5) Batch classification is there and value of the sort chracteristic is populated in all batches
    6) There is enough available stock in the batch at that storage location
    But batch field is not getting populated .. Even if I press the batch determintion button manually
    on the component overview screen batch selection screen is appearing but no batches are getting determined for selection .I have checked the selection criteria and it is correct and I was expecting batch 'ZSWETA' to b determined as it is satisfying the selection criteria. I am really wondering why this is happening as I have done all the required config settings but batch determination is not happening..
    Can you please help me out of this...
    Regards
    Suchandra

    Hi,
    kindly check the following things-:
    Material master -: Purchasing View tick in check box of Batch Management
                               MRP 2 -:Batch Entry(Select 3-Auto Batch entry on Release)
                              Work Scheduling -: Batch Entry & Batch Management.
    hope it will help you to get the auto Batch Number.
    Regards,
    Mukesh

  • Help needed regarding the deployment architecture for PROD env

    Dear All,
    Please help me with some clarifications regarding the deployment architecture for PROD env.
    As of now I have 2 single node 12.1.1 installations for DEV and CRP/TEST respectively.
    Shortly I will be having a PROD env of 12.1.1 with one DB node and 2 middle tier (apps) node. I need help in whether -
    1) to have a shared APPL_TOP in the SAN for the 2 apps node or to have seperate APPL_TOPs for the 2 apps node. The point is that which will be benificitial in my case from business point of view. The INST_TOPS will be node specific in any case right?
    2) Where to enable the Concurrent Managers, in the DB node or in the primary apps node or in 2 apps node both for better performance.
    12.1.1 is installed in RHEL 5.3
    Thanks and Regards

    Hi,
    Please refer to (Note: 384248.1 - Sharing The Application Tier File System in Oracle E-Business Suite Release 12).
    For enabling the CM, it depends on what resources you have on each server. I would recommend you install it on the the application tier node, and leave the database installed on one server with no application services (if possible).
    Regards,
    Hussein

  • AIR Plug-In Architecture For HTML/AJAX Development?

    Hi everyone,
    Doing an AIR project. Mentor suggested to do app with plug-in capability, "Great idea! i'll get sraight on it!!" but now..... not so good :'(
    I would have a pretty strong background in programming for a student and would hate to srink to the challange but I can't find any documentatin on building a plug-in architecture for AIR? I have developed many apps during my studies but never one with any sort of plugin architecture.
    Without any more background into my problem my question is..... does anyone know of any good documentation for me to follow or that i could look through and would set me on the right track in order to create this? Or could you explain briefly how you would go about creating this type of application?
    Thank you so much for any help that anyone can give to me in advance, hope you all having a good day,
    IrishAIRMax

    ?

  • Nested SQL statements for complex, detailed queries.

    Is it  possible to write nested SQL statements for complex, detailed queries. A nested query
    has a WHERE clause that includes a SELECT statement ? Is it true or false ?

    Hi wahid,
    Here are pretty good examples: 
    http://www.databasejournal.com/features/mssql/article.php/3464481/Using-a-Subquery-in-a-T-SQL-Statement.htm
    http://technet.microsoft.com/en-us/library/aa213252(v=sql.80).aspx
    Regards Harsh

  • [svn:fx-trunk] 5170: Round 2 of bug fixes for the Spark skins for Halo components.

    Revision: 5170
    Author: [email protected]
    Date: 2009-03-04 17:50:32 -0800 (Wed, 04 Mar 2009)
    Log Message:
    Round 2 of bug fixes for the Spark skins for Halo components. Thanks to Alex for help with the data grid issues.
    Bugs fixed:
    SDK-19655 - Setting rowCount property on DataGrid causes extra blank row to be displayed
    SDK-19652 - Items in a DataGrid do not line up after scrolling.
    SDK-19605 - disabled Halo ColorPicker with Gumbo skin draws too dark
    SDK-19596 - When you have a single button on an Alert, the left edge looks flatter than the right
    SDK-19585 - Menus compiled with the halo theme in Flex 4 have a different backgroundColor than in Flex 3
    SDK-19665 - Halo List with Gumbo skin doesnt draw the alternating item color all the way to the right edge of the control if VScrollBar is present
    SDK-19651 - odd header rendering issue on Halo DataGrid with Gumbo skin
    QA Notes: The alert layout code was positioning the buttons/text on sub-pixel boundaries if the width or height of the alert was an odd number of pixels. We always snap to pixel boundaries now, but this may cause bitmap compare issues with Alert.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-19655
    http://bugs.adobe.com/jira/browse/SDK-19652
    http://bugs.adobe.com/jira/browse/SDK-19605
    http://bugs.adobe.com/jira/browse/SDK-19596
    http://bugs.adobe.com/jira/browse/SDK-19585
    http://bugs.adobe.com/jira/browse/SDK-19665
    http://bugs.adobe.com/jira/browse/SDK-19651
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/alertClasses/AlertForm.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as
    flex/sdk/trunk/frameworks/projects/halo/defaults.css
    flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ColorPickerSkin.mxml

  • Change BgColors, FgColors for all Components in a Container?

    Is there a possibility to change the Background Color, the Foreground Color and the Fontsettings for all Components in a Container? Each Component in the Container should get the Colorsettings of the Container...

    Just overwrite the add, setBackground(), setForeGround() and the Font-methods of the Container:
    public void add(Component c){
    super.add(comp);
    comp.setBackground(...);
    comp.setForeground(...);
    //...the Font-stuff
    public void setBackground(Color c){
    for(int i=0;i< getComponentCount(), ++i){
    getComponenetAt(i).setBackground(c);
    //the same for setForeground and the Font-methods.

  • Table for PO components

    HI All,
    Plz let me know the table used for PO components.
    Regards,

    Hi,
    Use the tables mentioned below in the sequence mentioned to get the components:
    MAST -- Material to BOM Link
    STKO -- BOM Header
    STPO -- BOM item
    Regards,
    Chandra
    Edited by: chandra piminty on Dec 9, 2009 1:09 PM

Maybe you are looking for