Synth/Nimbus: how to implement a new UI-delegate?

my first steps in the region - so please be lenient :-)
Problem is that nearly everthing in the Synth package is package private, looks like a completely sealed shop. Even the ui-delegate creation doesn't follow the usual pattern (register the class and let the manager instantiate it later) but is hard-coded - hard to belief, but truely constructors called - in the SynthLookAndFeel. There is no way to extend that I can see.
Actually, the instantiation doesn't hurt us (== SwingX), because our AddOn mechanism takes care of it (and does a good job, fortunately).
what does hurt, afaics, is the fact that the delegates can't be implemented the synth-way: using context, state, region, painter ... many of those are invisible to external classes. It starts with the simple update method, standard in all synth delegates is
    public void update(Graphics g, JComponent c) {
        SynthContext context = getContext(c);
        SynthLookAndFeel.update(context, g); // invisble
        context.getPainter(). // invisible
                  paintListBackground(context,
                          g, 0, 0, c.getWidth(), c.getHeight());
        context.dispose(); // invisible
        paint(g, c);
    } Pretty sure I'm overlooking something obvious ... it can't be that the LAF was designed to not be extensible with new component types, or can it?
Any pointers, hints, examples highly welcome!.
Thanks
Jeanette
BTW: this is a cross-post from the swinglabs forum to get as wide a spread as possible :-) The discussion there is at
[http://forums.java.net/jive/thread.jspa?threadID=65533]

Ok.. so here's my understanding.
Suppose we create a bunch of new SwingX components.
public class XComponent extends JComponent {
    public final static String uiClassId = "XComponentUI";
    public XComponent() {
        updateUI();
    @Override
    public void updateUI() {
        setUI((XComponentUI) UIManager.getUI(this));
    public void setUI(XComponentUI ui) {
        super.setUI(ui);
}Now we need to make sure UIManager.getUI(this) actually works. So...
UIManager.put(XComponent.uiClassID,"blabla.SynthXComponentUI");Now we need to provide SynthXComponentUI.
package blabla;
import java.awt.Graphics;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.synth.*;
public class SynthXComponentUI extends ComponentUI{
    SynthStyle style;
    SynthStyle leftStyle;
    SynthStyle rightStyle;
    public static ComponentUI createUI(JComponent target) {
        return new SynthXComponentUI();
    @Override
    public void installUI(JComponent c) {
        super.installUI(c);
        style = SynthLookAndFeel.getStyle(c, XRegion.XCOMPONENT);
        leftStyle = SynthLookAndFeel.getStyle(c, XRegion.XCOMPONENT_LEFT);
        rightStyle = SynthLookAndFeel.getStyle(c, XRegion.XCOMPONENT_RIGHT);
    protected SynthContext getContext(JComponent c, Region r, SynthStyle style) {
        int state = 0;
        state |= c.isEnabled()?SynthConstants.ENABLED:SynthConstants.DISABLED;
        state |= c.isFocusOwner()?SynthConstants.FOCUSED:0;
        java.awt.Point mousePoint = c.getMousePosition();
        if(mousePoint != null) {
            if(r == XRegion.XCOMPONENT) {
                state |= SynthConstants.MOUSE_OVER;
            }else if(r == XRegion.XCOMPONENT_LEFT && mousePoint.x < c.getWidth()/2) {
                state |= SynthConstants.MOUSE_OVER;
            }else if(r == XRegion.XCOMPONENT_RIGHT && mousePoint.x > c.getWidth()/2) {
                state |= SynthConstants.MOUSE_OVER;
        return new SynthContext(c,r,style,state);
    @Override
    public void paint(Graphics g, JComponent c) {
        SynthContext context = getContext(c, XRegion.XCOMPONENT, style);
        ((SynthXPainter) style.getPainter(context)).paintXComponentBackground(
                context, g, 0, 0, c.getWidth(), c.getHeight());
        context = getContext(c, XRegion.XCOMPONENT_LEFT, style);
        ((SynthXPainter) leftStyle.getPainter(context)).paintXComponentLeftBackground(
                context, g, 0, 0, c.getWidth()/2,c.getHeight());
        context = getContext(c,XRegion.XCOMPONENT_RIGHT,style);
        ((SynthXPainter) rightStyle.getPainter(context)).paintXComponentLeftBackground(
                context, g,c.getWidth()/2, 0, c.getWidth()/2,c.getHeight());
}Here, I'm pretending the Component is broken into three regions. The whole component itself serves as one region. And then the left and right side of the component serves as subregions. I assume all regions are defined in this class called XRegion.
package blabla;
import javax.swing.plaf.synth.Region;
public class XRegion extends Region{
    public static final XRegion XCOMPONENT = new XRegion("XComponent","XComponentUI", false);
    public static final XRegion XCOMPONENT_LEFT = new XRegion("XComponentLeft",null,true);
    public static final XRegion XCOMPONENT_RIGHT= new XRegion("XComponentRight",null,true);
   //other regions would also be defined
    public XRegion(String name, String ui, boolean subComponent) {
        super(name,ui,subComponent);
}Presumebly, this XRegion class would contain all the new defined regions for your SwingX components.
In my UI, I'm also assuming that the StyleFactory returns a style whose SynthPainter is something called SynthXPainter.
package blabla;
import javax.swing.plaf.synth.SynthPainter;
import javax.swing.plaf.synth.SynthContext;
import java.awt.Graphics;
public class SynthXPainter extends SynthPainter{
    public void paintXComponentBackground(SynthContext context, Graphics g,int x, int y, int w, int h) {}
    public void paintXComponentBorder(SynthContext context, Graphics g, int x, int y, int w, int h) {}
    public void paintXComponentLeftBackground(SynthContext context, Graphics g,int x, int y, int w, int h) {}
    public void paintXComponentRightBackground(SynthContext context, Graphics g,int x, int y, int w, int h) {}
    //other painting methods for SwingX would be defined
}The SynthXPainter class would contain all the new paintXXX methods to paint your SwingX components. Much like SynthPainter does for Swing.
Then there's the SynthContext. In the UI I provided a method called getContext. All it pretty much does is calculate the state of the component and returns a new SynthContext based on that state. The only thing unique about it is that I decided to set the MOUSE_OVER flag only if the the mouse is over the region being painted. With the appropriate SynthContext and SynthXPainter, I can call the methods I need to paint XComponent.
Note that I don't need to call SynthContext#dispose (which is invisible) on the objects I create. This is because the SynthContext is not cached anywhere when using the public api for the class.
Now we need to provide a SynthStyleFactory that returns a SynthStyle appropriate for the regions.
SynthLookAndFeel.setStyleFactory(new SynthStyleFactory() {
   SynthStyleFactory wrapper = SynthLookAndFeel.getStyleFactory();
    @Override
    public SynthStyle getStyle(JComponent c, Region id) {
        if (id instanceof XRegion) {
            if (id == XRegion.XCOMPONENT) {
                return new XStyle(new XComponentPainter());
            } else if (id == XRegion.XCOMPONENT_LEFT) {
                return new XStyle(new XComponentLeftPainter());
            } else if (id == XRegion.XCOMPONENT_RIGHT) {
                return new XStyle(new XComponentRightPainter());
            } else {
                throw new IllegalArgumentException("Unkown region!");
        } else {
            wrapper.getStyle(c, id);
});Where I defined XStyle like so,
package blabla;
import java.awt.Color;
import java.awt.Font;
import javax.swing.plaf.synth.*;
public class XStyle extends SynthStyle{
    private SynthXPainter painter;
    public XStyle(SynthXPainter painter) {
        this.painter = painter;
    @Override
    public SynthPainter getPainter(SynthContext context) {
        return painter;
    @Override
    protected Font getFontForState(SynthContext context) {
        throw new UnsupportedOperationException("Not supported yet.");
    @Override
    protected Color getColorForState(SynthContext context, ColorType type) {
        throw new UnsupportedOperationException("Not supported yet.");
}I didn't actually implement XComponentPainter, XComponentLeftPainter, and XComponentRightPainter. But they would extend SynthXPainter and override the appropriate painting methods.

Similar Messages

  • How to add in new language for Messenger Express

    Guys, i need help on adding in new language for Messenger Express. My customer is asking for "Malay" language which is not come with default language pack. The information from Customization PDF is too little for me, wondering is there any template just like i18n.properties in UWC.
    Version : Sun Java(tm) System Messaging Server 6.2-3.04

    Hi,
    Guys, i need help on adding in new language for
    Messenger Express. My customer is asking for "Malay"
    language which is not come with default language
    pack. The information from Customization PDF is too
    little for me, wondering is there any template just
    like i18n.properties in UWC.There was an RFE (request for enhancement) to do just this implemented in the very latest hotfix (not out quite yet):
    6455821 - Admin should be able to add new language support for MS other than predefined languages/locales
    Suggest you log a Sun support case to get a copy of the MS6.2 patch which contains this RFE (scheduled to be in 125813-01) - and instructions on how to implement the new language.
    Regards,
    Shane.

  • How can I implement a new protocol over IP

    Hi,
    I want to implement a new protocol (my customized one) in solaris 8. This protocol will be something like UDP and will be using IP for communication.
    So how can i use IP stream module for that?
    thankx
    prasenjit

    I can give you some pointers regarding this. Although, I implemented protocol below IP.
    - Look for information on ipsecah and ipsecesp. These are pseudo devices on top of IP for Solaris 8.0.
    - Check how the protocol stack is built while booting.
    - If you intend to implement a module, rather than a driver then things might be little easy. You can push your module on top of IP. See man for "sad" and "autopush" mechanism
    - Sample drivers and modules from SUN are of great
    help. I came to know about the sample drivers very late.
    Otherwise, I would have saved some time.
    - Unix System V network programming by Rago is a very good reference.
    I hope this helps.
    -Ashutosh

  • How to create and implement a new work schedule rule successfully?

    Dear Community,
    How to create and implement a new work schedule rule successfully?
    In other words, what are all the basic steps to create and implement a new work schedule rule successfully?
    Thanks in advance.

    Hi,
    Follow the below steps to create Work Schedule:
    Holiday Calendar
    Transaction Code: SCAL
    Holiday calendar comprises of list of paid holidays to be given to employees on festivals by the company.
    Personnel Area/SubArea Groupings
    Go to SPRO --> Time Management --->Work Schedules --> Personnel SubArea Groupings
    Maintain perosnnel area/Subarea groupings for work schedule.
    i.e. Suppose in Mumbai you have WS = GEN ( 10 to 6) and in Chennai you have WS = NORM ( 8 to 4 )
    Work Schedule
    Go to SPRO --> Time Management --->Work Schedules -->Daily Work Schedules
    Go to SPRO --> Time Management --->Work Schedules -->Period Work Schedules
    Daily Work Schedule is actually your office timings with breaks (paid /unpaid) i.e. Planned Working Time which is then included
    in Period Work Schedule to make a week ( M T W T F S S )
    Daily Work Schedule (i.e. Day) -
    > Period Work Schedule (i.e. Week)
    Work Schedule Rules
    Go to SPRO --> Time Management --->Work Schedules -->Work Schedule Rules and Work Schedules
    After doing above mentioned configurations,maintain employee group/subgroup groupings in which you have to define which calendar is applicable for which type of employees for which work schedule.
    You will maintain this work schedule in infotype 0007 - Planned Working Time of employee via transaction code - PA30

  • Can't Figure Out How To Implement IEnumerable T

    I have no problem implementing IEnumerable but can't figure out how to implement IEnumerable<T>. Using the non-generic ArrayList, I have this code:
    class PeopleCollection : IEnumerable
    ArrayList people = new ArrayList();
    public PeopleCollection() { }
    public IEnumerator GetEnumerator()
    return people.GetEnumerator();
    class Program
    static void Main(string[] args)
    PeopleCollection collection = new PeopleCollection();
    foreach (Person p in collection)
    Console.WriteLine(p);
    I'm trying to do the same thing (using a List<Person> as the member variable instead of ArrayList) but get compile errors involving improper return types on my GetEnumerator() method. I start out with this:
    class PeopleCollection : IEnumerable<Person>
    List<Person> myPeople = new List<Person>();
    public PeopleCollection() { }
    public IEnumerator<Person> GetEnumerator()
    throw new NotImplementedException();
    IEnumerator IEnumerable.GetEnumerator()
    throw new NotImplementedException();
    class Program
    static void Main(string[] args)
    // Create a PeopleCollection object.
    PeopleCollection peopleCollection = new PeopleCollection();
    // Iterate over the collection.
    foreach (Person p in peopleCollection)
    Console.WriteLine(p);
    Console.ReadLine();
    That code compiles (basically because I haven't really done anything yet), but I get compile errors when I try to implement the GetEnumerator() methods.

    The List<T> class implements the IEnumerable<T> interface, so your enumerator can return the GetEnumerator call from the list.
    class PeopleCollection : IEnumerable<Person>
    List<Person> myPeople = new List<Person>();
    public PeopleCollection() { }
    public IEnumerator<Person> GetEnumerator()
    return myPeople.GetEnumerator();
    IEnumerator IEnumerable.GetEnumerator()
    return myPeople.GetEnumerator();
    class Program
    static void Main(string[] args)
    // Create a PeopleCollection object.
    PeopleCollection peopleCollection = new PeopleCollection();
    // Iterate over the collection.
    foreach (Person p in peopleCollection)
    Console.WriteLine(p);
    Console.ReadLine();

  • How to add a new button in IC tool bar and handle the event for the button?

    Hi,
        I am working on CRM 2007 Interaction center. To add a new button to IC toolbar, customizing is available to define a new button and then assign in to the profile.
    In SPRO->CRM->IC webclient->Customer Specifc System Modifications->Define Toolbar Buttons, I defined one new button with ID ZSTART.
    Now in SPRO->CRM->IC webclient->Basic Functions->Communication Channels->Define Toolbar Profiles , I selected Default profileid and in Generic Layout Buttons Tab, I added the new button ZSTART in Position 3.
         So after completing the customizing when the user logs in using role IC_AGENT,  the button (with ID:ZSTART) gets displayed in the IC toolbar too.
          Now on click of this button, I need to create an object.
    To do so, I have to catch the event which is raised by this new button.
           Please let me how to implement the event handler for this new button. What will be the event name for this button click event and how I can subscribe for it ?
         Please let me know if anyone of you have already worked on similar requirements.
    Regards,
    Manas.
    Edited by: manas sahoo on Jul 22, 2008 7:49 PM

    Hello Manas,
    There are a couple of threads in the community that might help you out (if you haven't already found them):
    Re: IC Web Client Toolbar
    /message/3621917#3621917 [original link is broken]
    Regards,
    Renee Wilhelm
    Edited by: Renee Wilhelm on Nov 6, 2008 7:46 PM

  • How to create a new place in iPhoto 11 without doing any harm?

    Yes, I know how to create a new place for a photo -- theoretically:
    Select the photo.
    Make sure the Info icon in the lower right portion of the iPhoto window is clicked and the too-tiny-for-any-but-the-youngest-eyes map is displaying.
    Click in "Assign a Place..." and begin typing a place that iPhoto will search for.  It searches in both "your places" (i.e., those that you have already defined) as well as in Google Maps.
    When you see a place in the search results list that you think might be close to the one you mean, select it.
    A pin appears on the itsy-bitsy map.  Move it to the exact place you mean.  You can make controls appear on the map by moving the mouse over the bottom of the map.  The controls allow you to zoom in and out, and to change views (Terrain, Satellite, Hybrid).  When the pin is where you want it, click it. The current name of the location appears.  Modify it to the name you want, then click the check mark.
    That's "all" there is to it ... except for a couple of "gotchas."
    There's a difference between what happens when you select a place that you've defined and when you select a place that Google found in the search results.  If it's a place that you've defined, and you then move the pin to a new location and/or change its name, this will affect all photos assigned to the custom place.  In effect, you are modifying the place.
    All places have a radius associated with them, thereby making them circles.  You can adjust the radius only in the Maintain My Places window.  In the itsy-bitsy map it doesn't even appear.  However, if the newly defined place overlaps existing ones, all the photos assigned to the overlapped places will be assigned to the new one.  Their pins will remain where they were.
    Now, before anybody suggests sending feedback to Apple, let me emphasize that I have been sending Apple feedback on the wrong-headed implementation of Places since iPhoto 9.0.  New versions have come and gone (the current one is 9.1.2), but these "features" have remained.  So my purpose in opening this thread is to consolidate work arounds to these "features" in one place.  My work around: 
    Whenever I define a new place, I select only a single photo.  I try to name my places so that I can distinguish them from those that Google finds.  In order to avoid Gotcha 1 I select a place that Google finds and try to place the pin close enough to where I want it, but far enough from any other places that I've defined.  I give it a name that I can easily find it Manage My Place.
    I immediately open Manage My Places and select the new place.  I first note the pins near it, then decrease its radius, move the pin to the desired location, note the nearby places, and give it its final name.
    I then view Places and navigate to the new place to view the photos assigned to it.  If I'm lucky, there's only one.  Otherwise, I have to reassign the other photos to their correct places.
    Richard

    So... in the hope it will not confuse folks more, let me be more specific of a procedure that works for me...
    Procedure to create a new My Places location.
    OK there is more you can do with a non-GPS Coord linked photo.
    Click Info and then click Assign a Place in the lower right of screen. (if your photo has a location linked to it already the Assign a Place will NOT show up.)
    Choose a location name near the actual location that Google Maps can find.
    Click that location in the Google Maps list that appears and your photo will be temporarily assigned to that location.
    Now  type over that  location name in order to make sure to give that location a unique name that will show up in your My Places list and click that name after you have typed it  to be sure it is accepted.
    Now in iPhoto click Window/Manage My Places and go the that newly named location in the large My Places map. There's no easy search. You have to run down through the alphabetical list.
    Drag the flag to the location you want this place to be and click Done.
    The location name is now in your My Places list at the location you dragged the flag to!
    It is important to note that only your unique named locations show up in your Places list, so if you want to modify the location coordinates you have to establish a unique name for it.
    This is much more complicated that previous iPhoto versions!
    But Yeah!!!!!!!!!!
    It really works!!!!!!!

  • How to implement a java class in my form .

    Hi All ,
    I'm trying to create a Button or a Bean Area Item and Implement a class to it on the ( IMPLEMENTATION CLASS ) property such as ( oracle.forms.demos.RoundedButton ) class . but it doesn't work ... please tell me how to implement such a class to my button .
    Thanx a lot for your help.
    AIN
    null

    hi [email protected]
    tell me my friend .. how can i extend
    the standard Forms button in Java ? ... what is the tool for that ... can you explain more please .. or can you give me a full example ... i don't have any expereience on that .. i'm waiting for your reply .
    Thanx a lot for your cooperation .
    Ali
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by [email protected]:
    Henrik, the Java importer lets you call Java classes on the app server side - I think what Ali is trying to do is integrate on the client side.
    If you want to add your own button then if you extend the standard Forms button in Java and then use this class name in the implementation class property then the Java for your button will be used instead of the standard Forms button. And since it has extended the basic Forms button it has all the standard button functionality.
    There is a white paper on OTN about this and we have created a new white paper which will be out in a couple of months (I think).
    Regards
    Grant Ronald<HR></BLOCKQUOTE>
    null

  • How to add a new url link in a view of an existing webdynpro component?

    How to add a new url link in a view of an existing webdynpro component?

    hi ,
    refer SAP online hep :
    Implementing Enhancements in a View
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/46/233f2189f74f08e10000000a114a6b/frameset.htm
    To enhance the layout of the view, you can create new UI elements. This procedure is no different u2013 from a technical viewpoint u2013 from creating UI elements in components themselves. All UI elements created within the enhancement implementation can then be processed as usual.
    Enhancements  means inserting user developments into SAP development objects at predefined positions.
    The Enhancement Framework enables you to add functionality to standard SAP software without actually changing the original repository objects, and to organize these enhancements as effectively as possible.
    refernce :
    have a look at this article
    How to Create Enhancement Implementation in Web Dynpro ABAP
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/700317da-bd79-2c10-368e-8f18bf5d8b81&overridelayout=true
    as pointed correctly by Saurav in earlier thread
    regards,
    amit

  • How to add a new universe in population for Predictive Analysis

    Post Author: izhar
    CA Forum: Performance Management and Dashboards
    Hi all members I am working on BOXI R2, SP2 I have to ask that, How to add a new universe in population for "Predictive Analysis". Currently i can only view universe of "Direct Customers and Direct Products"
    Any member please help me hereRegards Izhar

    Hi Anne,
    It really depends on how your portal is set up. And there are 101 ways this could have been done.
    I've used the Home Page Framework as an easy to define and extend framework to show applications. I've used it both for ESS and MSS, Using the HPF requires that an application has an iView in the portal.
    The main point to be made here is that this is not a Web Dynpro ABAP specific question - but rather one about MSS portal implementation - you would probably be better posting a question in either one of the ESS/MSS or Portal forums.
    As it is not a WDA specific question, I'd ask that you kindly close this thread and reopen in another forum.
    Thanks for your understanding, it would be nice to be able to answer all questions in all forums (perhaps with some sort of tagging system) but currently forum rules are that questions must be specific to the forum posted.
    Thanks,
    Chris

  • How to implement reading data from a mat file on a cRIO?

    Hi all!
    I am not even sure, this is plausible, but I'd rather ask before i start complicating. So far, I have not found any helpful info about reading in data to a RT device from a file (kind of a simulation test - the data is simulated). 
    I have the MatLab plugin that allows the data storage read a MAT file, which has a number of colums representing different signals and lines representing the samples at a given time (based on the sample time - each sample time has it's own line of signal data). 
    I have no idea of how to implement this to cRIO.
    The idea is:
    I have some algorithms that run on the RIO controller in a timed loop. As the inputs to these algorithms, i would need to acces each of the columns values in the line, that corresponds to the sample time (kind of a time series - without the actual times written).
    I am fairly new to RT and LV development, so any help would be much appreciated.
    Thanks, 
    Luka
    Solved!
    Go to Solution.

    Hi Luka!
    MAT file support in LabVIEW is handled by DataPlugins. Here you can find the MATLAb plugin:
    http://zone.ni.com/devzone/cda/epd/p/id/4178
    And here you can find information on how to use DataPlugins to read or write files of a certain format:
    http://www.ni.com/white-paper/11951/en
    There is also an open-source project that addresses the problem, you can find it at
    http://matio-labview.sourceforge.net/
    Unfortunately, RT systems are not supported by DataPlugins, so fist you'll have to write a VI on the Host computer to convert your files to a usable format (I suggest TMDS for compactness and ease of use), and the work on the converted files in the cRIO VI. If you have other questions about DataPlugins or anything else, please get back to me.
    Best regards:
    Andrew Valko
    National Instruments
    Andrew Valko
    National Instruments Hungary

  • How to create a new row for a VO based on values from another VO?

    Hi, experts.
    in jdev 11.1.2.3,
    How to create a new row for VO1 based on values from another VO2 in the same page?
    and in my use case it's preferable to do this from the UI rather than from business logic layer(EO).
    Also I have read Frank Nimphius' following blog,but in his example the source VO and the destination VO are the same.
    How-to declaratively create new table rows based on existing row content (20-NOV-2008)
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/13-create-with-params-169140.pdf
    I have tried:
    1.VO1(id,amount,remark1) and VO2(id,amount,remark2) are based on different EO,but render in same page,
    2.Drag and drop a Createwithparams button for VO1(id,amount,remark),
    3.add: Create insertinside Createwithparams->Nameddata(amount),
    4.set NDName:amount, NDValue:#{bindings.VO2.children.Amount}, NDtype:oracle.jbo.domain.Number.
    On running,when press button Createwithparams, cannot create a new row for VO1, and get error msg:
    <Utils> <buildFacesMessage> ADF: Adding the following JSF error message: For input string: "Amount"
    java.lang.NumberFormatException: For input string: "Amount"
         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    Can anyone give some suggestions?
    Thanks in advance.
    bao
    Edited by: user6715237 on 2013-4-19 下午9:29

    Hi,CM,
    I'm really very appreciated for your quick reply! You know, today is Saturday, it's not a day for everyone at work.
    My principal requirement is as follows:
    1.select/check some rows from VO2, and for each selection create a new row with some attributes from VO2 as default values for VO1's corresponding attributes, and during this process the user may be cancel/uncheck or redo some of the selections.
    --so it's better to implement it in UI rather than in EO.
    2.it's better to implement this function with declarative way as in Frank Nimphius' blog.
    --little Jave/JS coding, the better. I only have experience in ORACLE FORMS, little experience in JAVA/JS.
    In order to get full information for the requirements of my use case, can take a check at:
    How to set default value for a VO query bind variable in a jspx page?
    (the end half of the thread: I have a more realworld requirement similar to the above requirement is:
    Manage bank transactions for clients. and give invoices to clients according to their transaction records. One invoice can contain one or many transactions records. and one transaction records can be split into many invoices.
    Regards
    bao
    Edited by: user6715237 on 2013-4-19 下午11:18
    JAVE->JAVA

  • How to add a new custom field to one set of employees within one country?

    Hi,
    I am thinking of a scenario where a new custom field is dispayed in PA30 for IT0006
    only for one set of employees in US (such as for a employee group or employee sub group).
    Other employees should not have this custom field.
    All employees in this scenario is for US country only.
    Is this possible? Do we need ABAP for this or only IMG will do?
    Any details on how to implement this etc..
    Thanks for any help.

    Thanks for everyone for the responses.
    I really liked the decoupling infotype solution.
    However, since some work has been done in the old way, I will try to describe the problem in detail.
    Our ABAPer already created a new screen 0200 as a sub-screen in ZP000600 module (I am assuming it is a module pool) using PM01 and assigned to 2010 screen; an alternate screen specified in IMG for country 10 as key (instead of standard screen 2000 for IT0006).
    This new screen 0200 is assigned to 2010 in PM01 transaction.
    These steps displays the 0200 sub-screen with added fields to all the US employees hiring in the respective personal action.
    I want to create a new scenario to suppress these additional fields for some US employees (say company code BKUS)
    I placed a new entry in T588M for module pool as ZP000600 , key is 10, alternate screen as 0200 and hide all the fields
    But, these additional fields are still displayed always for US employees for whom I want to hide.
    Did I miss any thing?
    I do not want to hard code in ABAP whom to display and who not to.
    Is there a IMG way to do this so that I can change the criteria later as we go.
    Thanks

  • How to implement select all files (Ctrl-A) in open file dialog??

    I successfully created file open dialog. However, in most windows file open dialog,
    if you press "Ctrl-A," it will select all the files in the directory. If you press "Ctrl"
    key with arrow key, it will highligh the files you want. ie. It allows users to open
    more than one files at the same time. How to implement it in Java??

    For doing this, you have to enable the file multiselection.
    If you have created a JFileChooser as :
    JFileChooser fileChooser = new JFileChooser();
    Add the following statement to set the multiselection property.
    fileChooser.setMultiSelectionEnabled(true);
    Manish.

  • How to implement setLineWrap equivalent method in a JTextPane

    I using a JTextPane in a chat Window, but if in this are writing a very large line this don't break lines as in the case of the setLineWrap(true) method for a JTextArea.
    How to implement break lines in a JTextPane equivalent to the setLineWrap(true) method for a JTextArea?

    ???import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Test3 extends JFrame {
      public Test3() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container content = getContentPane();
        JTextPane jtp = new JTextPane();
        StringBuffer sb = new StringBuffer();
        for (int i=0; i<100; i++) sb.append("this is some text.  ");
        jtp.setText(sb.toString());
        content.add(new JScrollPane(jtp), BorderLayout.CENTER);
        setSize(400, 400);
        setVisible(true);
      public static void main(String[] args) { new Test3(); }
    }

Maybe you are looking for