Skip to main content

Posts

Showing posts from 2012

ADempiere and JasperReport integration upgraded to JasperReports-4.5.1

Recently in ADempiere forums we had a question how to upgrade JasperReport engine used in ADempiere to the newest version 4.5.1. From developers point of view it is quite easy. Developer just need to update JasperReport jar file. In order to be more precise and helpful to the non technical users i have documented all steps: 1) Download newest version of JasperReports and iReport 2) Get ADempiere sources 3) In ADempiere source tree( just one file: JasperReports/build.xml ) replace old version of jasperreports-3.7.3.jar with the newest jasperreports-4.5.1.jar 4) Start ADempiere build process(utils_dev/RUN_build.sh)  5) Do not forget to apply latest ADempiere patches! As we can see this are just 5 simple steps, but in case you do not have time to setup ADempiere source and build it, i have published ADempiere-3.6.0 with JasperReport-4.5.1 for you. https://sourceforge.net/projects/adempiere-mysql/files/ Enjoy!

How to change SVN user in eclipse on Ubuntu 10.04

This is a post based on a post from Semika Loku Kaluge . In case developer works on Linux (i'm on Ubuntu 10.04), files which need to be deleted are located in: /home/[USER]/.subversion/auth/svn.simple In "svn.simple" directory you will find one text file for each remote SVN server. Delete appropriate file and Eclipse will ask you for new user and password when connecting to the SVN server. Enjoy!

How to catch right mouse click in JTable

This is a quick post to show how developer can intercept Right mouse click in JTable. Name  of our JTable object is "jTable". We need to add MouseListener and catch "MousePressed" events. As the code shows correct mouse button is determined using "SwingUtilities" class, quite easy job. Tricky part is finding Row number and Column number and displaying Pop-up window at correct position. Enjoy! jTable.addMouseListener( new MouseAdapter() { public void mousePressed( MouseEvent event ) { if ( SwingUtilities.isLeftMouseButton( event ) ) { // Do something } else if ( SwingUtilities.isRightMouseButton( event ) ) { Point p = event.getPoint(); // Get row and column index that contains our coordinate int rowIndex = jTable.rowAtPoint( p ); int colIndex = jTable.columnAtPoint( p ); // Get ListSelectionModel of the JTable ListSelectionModel model = jTable.getSelectionModel(); // Set how many rows are selected using "rowInd