Info panels should handle double click for zoom

Help is preferred to those who publish their work as Open Source and not as private branches rejecting collaboration. Such projects are not maintainable and shall be deleted.
Forum rules
This forum is personally pruned to avoid redundant posts. Related topics are grouped together. IF YOU HAVE REGISTERED, you need to send email to red1(a)red1.org with your username in the subject title to get me to activate you.

Info panels should handle double click for zoom

Postby nmicoud » Sat Jun 09, 2012 1:08 am

I will take the example of InfoBPartner but it should apply to all.

When opened with a right click on a C_BPartner_ID field, the double click close the panel and set selected business partner in the field.

If you open it from main menu or any window and make a double click, the panel just close.
And users are disturbed because this action don't open Business Partner window (what they expected).
They have to click on Zoom button which is not ergonomic.


I've made some test in order to implement this behaviour.

I've added a new constructor in InfoBPartner :

Code: Select all
public InfoBPartner(Frame frame, boolean modal, int WindowNo,
         String value, boolean isSOTrx,
         boolean multiSelection, String whereClause, boolean doubleClick)
   {
      this(frame, modal, WindowNo, value, isSOTrx, multiSelection, whereClause);
      p_doubleClickZoom = doubleClic;      
   }



and a new method :

Code: Select all
public void mouseClicked(MouseEvent e)
   {
      if (e.getClickCount() > 1 && p_table.getSelectedRow() != -1)
      {
         if (p_doubleClickZoom)
            zoom();
         else
            dispose(true);
      }
      // no right click / Calc
   }


I call this constructor from View / Business Partner Info

It works great but, if i open a second panel from a right click on a C_BPartner_ID field, the 'double click' action just close panel.
It seems that every panels share variables.

Have you any idea on how to implement this properly ?
I think this should be done in Info so every panel which extends it could inherit it.

I think this deserves a ticket ; WDYT ?

Regards,

Nicolas
nmicoud
Regular
 
Posts: 137
Joined: Fri Oct 07, 2011 6:19 pm

Return to HELP ME!!!

Who is online

Users browsing this forum: No registered users and 5 guests

cron