Restricting The DragSource to a particular area in JPanel

Hi everyone,
I have a JPanel which I have registered as a Drag Source as well as a a drop target. Now I have a header in the JPanel and need to restrict the Drag source to the rest of the JPanel except for the header.
Also there are various polygons drawn on the JPanel. The positions of these can be changed. I need to restrict the drag and drop to these polygons. ie if a drag is initiated on any blank space it should not continue and the drag cursor icon is to be disabled.
Can u give me ideas on how to go about this
Thanks

Hi everyone,
I have a JPanel which I have registered as a Drag Source as well as a a drop target. Now I have a header in the JPanel and need to restrict the Drag source to the rest of the JPanel except for the header.
Also there are various polygons drawn on the JPanel. The positions of these can be changed. I need to restrict the drag and drop to these polygons. ie if a drag is initiated on any blank space it should not continue and the drag cursor icon is to be disabled.
Can u give me ideas on how to go about this
Thanks

Similar Messages

  • Restricting the order type to sales area!!!

    Hi All,
    I want some clarification!!!!
    Scenario:
    (1)We have two sales areas
    1000,10,00 and 1000,20,00.
    (2)We have two order types zor and zare both have same Document priicng procedure 'A"
    (3)Now the client wants to restrict the order typr zor to one sales area 1000,10,00.The system should not allow to raise an order with 1000,20,00 with combination of ZOR and A.
    (4)As the client has raised a number of orders with 1000,10,00 with the combination of ZOR.now if we change the document pp of zor to X .will it effect any other documents.
    Regards,
    RK

    T.Code: SPRO
    IMG --> Sales & Distribution --> Sales --> Sales Document Type --> Assign Sales Area to Sales Document Type.
    Here, based on Sales Area, it is possible to restrict the Sales Order Type. This will take care of point number (3).
    (4)As the client has raised a number of orders with 1000,10,00 with the combination of ZOR.now if we change the document pp of zor to X .will it effect any other documents.
    This will depend on copy control settings.
    Regards,
    Rajesh Banka

  • Restrict the transaction authoriztions with Business area

    Hi All
    I want to restrict the access of transaction PCP0 with Business area.
    Please suggest me for the same
    Regards
    Aditi Singh

    The standard SU24 settings for PCP0 allow restricting the authorizations based on funds management areas using object
    F_FICB_FKR Cash Budget Management/Funds Management FM Area
    But there is not authorization check for business area in this transaction. You can alter the ABAP code for an authority check for business area using some user exit and a custom authorization object.

  • Help with placing the JComponents at a particular location in JPanel

    Hello All,
    I think it is simple in placing JLabel with an icon or just just text at a particular location in the JPanel. But it is notworking. I know it is very simple but i think i am missing something. Here is code please help with this code.
    Thanks
    Smithaimport java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.FlowLayout;
    import java.awt.LayoutManager;
    import javax.swing.*;
    public class DocumentGraphicalRepresentation {
         public void buildDocumentation() {
              JFrame frame = new JFrame("Graphical Representation");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setBounds(0, 0, 475, 265);
              JPanel panel = new JPanel();          
              panel.setBounds(0, 0, 475, 265);
              panel.setBackground(Color.lightGray);
              //panel.setLayout(new BorderLayout());          
              JLabel label0 = new JLabel(new ImageIcon("c:/arrow.gif"));
              label0.setLocation(61, 68);
              label0.setOpaque(false);
              panel.add(label0);
              JLabel label1 = new JLabel(new ImageIcon("c:/bulb.gif"));
              label1.setLocation(338, 139);
              label1.setOpaque(false);
              panel.add(label1);
              frame.getContentPane().add(panel);
              frame.setVisible(true);          
         public static void main(String args[]) {
              DocumentGraphicalRepresentation document = new DocumentGraphicalRepresentation();
              document.buildDocumentation();
    }

    When adding components to a null layout you must set both a location and size for them to show up.
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.FlowLayout;
    import java.awt.LayoutManager;
    import javax.swing.*;
    public class DGR {
         public void buildDocumentation() {
              JFrame frame = new JFrame("Graphical Representation");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setBounds(0, 0, 475, 265);
              JPanel panel = new JPanel();          
              panel.setBounds(0, 0, 475, 265);
              panel.setBackground(Color.lightGray);
              //panel.setLayout(new BorderLayout());          
              JLabel label0 = new JLabel(new ImageIcon(//"c:/arrow.gif"));
                                         "images/geek/geek-----.gif"));
                    Dimension d = label0.getPreferredSize();
                    label0.setSize(d);
              label0.setLocation(61, 68);
    //          label0.setOpaque(false);
              panel.add(label0);
              JLabel label1 = new JLabel(new ImageIcon(//"c:/bulb.gif"));
                                         "images/hawk.jpg"));
                    d = label1.getPreferredSize();
                    label1.setBounds(338,139,d.width,d.height);
    //          label1.setLocation(338, 139);
              System.out.println("label1.isOpaque = " + label1.isOpaque());
    //          label1.setOpaque(false);
              panel.add(label1);
              frame.getContentPane().add(new JScrollPane(panel));
              frame.setVisible(true);          
         public static void main(String args[]) {
              new DGR().buildDocumentation();
    }

  • Validation to restrict the user at parking level

    Hi,
    I have created a validation to restrict the user to use particular G/L codes only using GGB0. It is working fine and it gives the error message in T-code FB50 & FB60 immediately after entering the un-authorized g/L codes. But still the user is allowed to park the document. and the same validation works in Z tcodes. But in Z tcodes the error message comes only at the time of Simulate/Save as complete or Post.
    But i want the error to display immediately after entering the G/L Codes in Z transaction also. Can you please help me to complete the validation by restricting the user to park also

    HI,
    Yes. Thanks for your valid answer. It will not work in parking T codes. It will work only in Posting T-codes. The Z-tcode what we are using all the parking transaction. Then I should try using the Badi. I will try.
    Divya S
    Edited by: S Divya on Dec 8, 2011 5:12 AM

  • How to restrict the manual accrual posting in Rebate?

    Hi friends,
    I am working with Retroactive Rebate.
    As on now, the total accrual posted to FI is 20000 INR.
    If I am taking the past Billing documents into consideration then the Total accrual is 35000 INR.
    So, I need to post a Manual Accrual for the difference of 15000 INR. It is running fine.
    Now, I want that user should be able to post more than the difference amount. During Manual accrual posting, one can post any amount he wants which I want to restrict upto the difference amount.
    That means, system should not allow the user to enter more than the difference amount.
    Can any body please guide me how to do it?
    Regards
    Pradyumna

    Hello Pradyumna,
    there is not standard way to restrict the manual accrual value.
    Are you using the old rebate processing (with S136 not active) ?
    If so I would advice you to pass to new rebate processing. See the note 105681.
    In this way the retroactive rebates can be easily handled.
    If you prefer to old rebate processing, please try to test the report RV15B005 to post accrual for old invoices
    Best regards,
    Ivano.

  • How to restrict the standard notifications processing

    Dear PM Gurus,
    i copied standard notifications and i used customized notifications. Now i want to restrict the standard notifications using. users are using standard notifications mistakely and system generates the standard notification "M1" actually i customized "z1", so i required when ever user enter the notification type "M1" in IW21 t.code and execute it system should throw an error message. please guide me and help me to restrict the "M1", "M2" & "M3". if its required any user exits please tell me the user exits also.
    thanks to all in advance.
    regards
    jalu

    First Method:
    You can unassign number range for the unused notification types.
    Second Method:
    In selection of notification type in IW21, press F4. It will pop up window with all the types. Click the notification types which should be used & click Insert in Personal list button in the top near Find button. But This should be done each & every user if user name is different.
    Also don't teach them about this functionality as this can be revoked by them without any restriction.

  • Need to restrict HR payroll Roles on Payroll area

    Hi,
    Can anybody pls guide me how can i restrict HR payroll roles on Payroll area Level.As of now system is not checking the payroll area value as authorization relevant.
    if the solution is through org key, pls explain the detail process of using org key.
    if it is through custom object, pls clarify the implication on the system once we run the standard program.
    Secondly i also want to restrict the  roles on Personal Sub area level and OM roles on Org.ID level.
    appericiate your early response.
    Regards,
    Ramakrishna

    Hi Ramakrishna,
    According to the documentation it seems to be possible to check authorizations for the payroll area with the authorization field VDSK1 of the authorization Object P_ORGIN if the feature VDSK1 is mapped to the payroll area. (However, I'm not sure about this because I never have worked with this option myself.)
    Online help
    [VDSK1 (Organizational Key)|http://help.sap.com/saphelp_470/helpdata/en/17/4bba3b3bf00152e10000000a114084/frameset.htm]
    If you use this authorization field VDSK1 this way I suggest to turn it into an "Org. Level" field using report PFCG_ORGFIELD_CREATE, too. This enables you to work with derived roles instead of normal roles. See note [323817 |https://service.sap.com/sap/support/notes/323817] "Creating org.level fields for the Profile Generator" .
    Kind regards
    Frank Buchholz

  • REGARDING RESTRICT THE DELETION OF LINE ITEM FROM CONFIRMATION SCREEN

    Dear All,
    Plz let me know how can we restrict to delete the line item(components) from the goods movement screen of confirmation of order(Cor6n) screen.
    Thanks & Regards,
    Arvind S

    Hi Aravind
    i just want to restrict the deletion only for particular user id's.
    I know we can do through authorization by creating authorization object.. am i right??
    I am not sure bout any authorization object can help you. However you can have the transaction variant for COR6N with quantity field as output also note this can be user specific.
    So you have no need to have custom transaction or development.
    Regards,
    R.Brahmankar

  • Restricting the Visibility of FireFighter Roles to selcted users

    Dear Experts,
    Is there any way to restrict the visibiilty of FireFigher roles in GRC CUP to only few authorized users. we have a requirement where a group of authorized users should be able to check out fire fighter roles on their own and these roles should be provisioned automatically to these users and then de-provision those roels after some time.  These  rolese should not be visible to the rest of the users.
    Any throughts on this would be greatly appreciated.
    Thanks
    Kumar

    Kumar,
      There is no straightforward or right way to do this as this feature is not available in CUP.
    You can associate those users with a functional area and restrict the role selection by functional area. Also, associate the roles with the same functional area. Again, this is not going to force users unless you bring functional area from the data source like LDAP and keep the field non-editable.
    Regards,
    Alpesh

  • Restricting data entry to a particular language in the form

    Hi,
    I created a multilingual form in which all the fields of the form are in a particular language . Now am trying to restrict data entry in the form to that language at the client side only . Say if it is a form in french, can we restrict the data entry to french only .  The approach i was trying to implement was adding a script against the change event of all data fields and see if the characters lie in the range of  the language unicode character set . But have not been successful in it yet . Can anybody help me find some way or provide any sample for it ?
    Thanks

    Hello, I'm German
    Probably you can restrict the characters used for text entry, so for example ü is allowed in the German form but not in French.
    But you will NEVER be able to restrict the users staying only writing French in French forms 100%.
    1) You sometimes, not often, do encounter letters that are not typical for the language. (Though it can appear in any kind of word, it's quite regular for names.)
    2) Let's say I fill the French form. I encounter a problem when I type in the word "Müller". This word wouldn't be French at all. The text will be delted and probably given an error message. Well... I learn out of this error message. Next time I'll type Mueller. ^^
    (I knew several pages were people were restricted to talk English by forbidding letters that were not used in English very often... That didn't stop us violating that rule. The only error that really bugged us wasn't the restriction in not using letters that don't exist in English but the "please don't swear or insult so." error that kept appearing for ex. when we used the German word for "that" (= "dass"). They just didn't like the last 3 letters.)
    3) Many countries have the same or include other countries unicodes. For example English could be written in the German form or in the French form.
    4) You can't get out the syslanguage as far as I know. This would be a great hint which language the person is using.
    5) I don't think you can use the spellcheck in any way... great violation against spellchecking could also be a hint for another language.
    I know a quite big internetcommunity which did try to accomplish the same as you do. After about 2 years and a lot of experiments they stopped their efforts and were content by popping up the random error-messages warning that you don't have to insult, just like those other communities mentioned above. ^^ (Though they tried to restrict the insulting parts to the language used that didn't work out. Too many people knew how to insult in other languages ;D or which words were similar to insults.)
    People just never do what they are supposed to do and are quite nasty finding workarounds...
    My advice to you would be:
    Don't make the effort.
    Sorry for not being able to provide you with a solution, but the opposite.
    Lisa

  • How to Restrict printing the document using IRM for a Single Document?Allow printing for some documents and restrict the printing for particular documents in same document library?

    Can we able to Configure the IRM in Document Level in SharePoint Document libraries?
    The document library contains multiple document sets , Can we restrict the printing according to document sets? Allow printing for some documents and restrict the printing for particular documents in same document library
     Is this possible?Please suggest.

    Yes, that can be done. But note that all administrators will have the same right to print, so you need to make sure the users are not administrators. You can include a macro to disable printing, but if the users disable macro, they can print the documents.
    Hence, there is no foolproof way to prevent printing documents. If you still need a foolproof security, PDF format provides password based security (viewing doesn't require a password) that can be implemented to prevent the document from printing,
    which doesn't require any special scripts and is tough.
    You can have a look at the following links:
    http://msdn.microsoft.com/en-us/library/office/ms458245(v=office.14).aspx
    http://msgroups.net/microsoft.public.word.docmanagement/prevent-printing-of-docum/91353
    http://www.go4sharepoint.com/Forum/prevent-printing-saving-documents-10150.aspx
    The following link explains about the security features in PDF. This is for information purpose only and not for promotion of any products:
    http://www.pdflib.com/knowledge-base/pdf-security/
    Balaji Kundalam

  • How to restrict the st loc list applicable to particular plant mm01

    Hi,
    While creating material master user after selecting a particular plant user sees all the storage locations available in the system.How to restrict the storage location list applicable to particular plant while material creation
    Best Regards,
    BM

    Hi,
    As Mahesh said , you need to put validation there, please contact your development team for this.
    Though you are able to see all storgae location you are not able to create the material master, it throws as error if you select incorrect storage location which is not maintained for that particulare plant.
    It gives an error message
    Entry Plant SL  does not exist in T001L (check entry)
    So user will not be able to create material master for improper plant SL combination.
    Thanks,
    Ravi

  • How to restrict the particular value in BEx?

    HI,
    I have added particular dimension in query prompt. While refreshing i got more value in particular dimension. How to restrict the the value in bobj or bex?
    Here i attached the screen shot. Please find the attachment.

    Hi Mani,
    Please make sure of your requirement. If you are using only one single query for multiple reports then i strongly recommend the below criteria or else it better to restrict the value in the BEx itself if you have no other reports on the same BEx query.
    If you are trying to restrict a report to a default prompt value then use equal to in query filter prompt or you can also restrict them to list of values i.e multiple values.Please follow as per the screens below. I am mentioning two ways.
    Method:1
    Step 1: Click on Prompt Options(Blue Questionmark Symbol)
    Step: 2 : Click on the Values after you check the prompt properties options as shown below.
    Step 3: Search for values if they are keys by checking the "Search in keys" or else not required.
    Method 2: Here is another Easy way is Just give the input in the value box as shown below.
    Let me know if you need any further help.
    Regards,
    Naveen

  • To restrict a object to a particular Group in the Universe

    Hi,
    I have a object which should be restricted only to a particular group.So when i define the universe we have to have explicit security that will restrict access to this object information from reports and from ad-hoc queries.I should restrict the object only to the particular group by a role based security.
    Please help me out in this case.
    Thanks in advance,
    Madan

    Hi Madan,
               U can restrict the Object to Particular group or User
    In designer go to tools menu and click on manage security and
    manage security restictions here u can add new restriction and
    as well as add user or group.

Maybe you are looking for

  • Time Capsule as Network Attached Storage Hub

    Is it possible to connect an external drive directly to the time capsule so that I can share pretty much any file I would want to on my network? Of course then I would like the time capsule to also back that drive up via time machine.

  • Defining New G/L Accounts for Each Warehouse

    Dear All......... We have managed inventory by warehouse and set the G/L accounts by warehouse wise. Now if we create new warehouses  the system but by default the accounts are same for all the warehouse,                 So my main Question is ......

  • Flash 8 embedded font sizes are larger?

    Hi, Quick question, I have a fla that only stores embedded fonts that I use throughout the site to reduce overall filesize. I noticed that if I export for Flash 8 the swf is about 75% larger than if I export for 7. Anybody happen to know why? What wi

  • Why does TimeMachine say the disk is full when it isn't?

    Hello! A lot of my backups recently have been failing because TimeMachine says the disk is full, when that simply isn't true. As of right now, I have 1.18 TB available of 2 TB. Why do my backups fail even when sufficient space is there? Thank you so

  • Java Flavor???

    Hi All, I want to go on Java training as my next assignment requires application development using Web Dynpro and IView development using Java. I wanted to get your output as to which training course will be the best to go for. Should I go for regula