Introduction

The uniCenta oPOS Developer Guide is relevant to all versions and it’s aimed at developers and advanced users with Java development skills who want to “tweak” uniCenta oPOS.

You can download uniCenta oPOS Source Code here but you will need to Register first if you haven’t already.

First of all we need to thanks to:

atlassian_logo_combined_150

Atlassian’s support of our open source project providing their OnDemand Cloud hosted products we use to manage and develop uniCenta oPOS. Plugged in to our JIRA we have JIRA Agile to manage and pace our development along with Confluence as our wiki, Bitbucket for our code repository and JIRA Capture to grab screenshots which comes in real handy when you need it. Excellent stuff from Atlassian and something we absolutely could not be without in the tool-shed.

bitrock_logo_150

uniCenta oPOS has used Bitrock’s InstallBuilder tool since day one. It helps us create smaller, faster uniCenta oPOS installers which can support virtually every server and desktop operating system currently in production. We’re now able to build lightweight cross-platform installers instantly from the same code base without having to resort to specific platform requirements as InstallBuilder takes care of all of that for us without fuss.

av2hire_logo_150

AV2Hire is unique amongst companies, not just AV, as they deliver to their many customers in Central London by specially made freight bikes (built by the man behind Chris Boardman’s ride to gold medal in 1992 Barcelona Olympics). uniCenta has a long-standing relationship with AV2Hire. They provide us with our base here in the heart of London and work closely on projects using visual communications to enhance customer experience.

java_logo Java SDK – 1.7 minimum[/caption]
netbeans_logo

Netbeans – latest version

eclipse_logo

Eclipse IDE

bitrock_logo_sml

Bitrock Installbuilder

Using Netbeans

The Swing components in uniCenta oPOS are particular to Netbeans and use the .form extension which only Netbeans is able to read.
If you peek under the hood you will see they are in XML format.

Having downloaded the uniCenta oPOS Source Code and set up Netbeans you are now ready to create a new Netbeans project .
First of all you will need to unzip the uniCenta oPOS Source Code Download into a new folder.Netbeans has a New Project Wizard which will help you get up and running quickly.

netbeans_project_screen_1

Step 1: Start a new project

In Netbeans choose Java Project with Existing Sources Click Next
 
 
 
 

netbeans_project_screen_2

Step 2: Project Name and Folder

Project Name: This doesn’t have to be uniCenta oPOS (better if you don’t use spaces in the name.)
Project Folder: The Netbeans Wizard automatically completes this based on the Project Name.
Edit to suit where you want to store the project.
All done on this screen. Click Next
 
 
 
 

netbeans_project_screen_3

Step 3: Add Existing uniCenta oPOS Sources

Initially in this screen you will see that the Wizard has only imported src-beans, src-data and src-pos
Click the Add Folder button and add the reports and locales folders
Once you’ve added these. Click Next – you could click Finish at this point.
 
 
 
 

netbeans_project_screen_4

Step 4: Amend Include/Exclude files

(optional)
Make any final adjustments to the Include/Exclude files to be in the project. I recommend you leave as is and Click Finish
The Wizard has done its job and you’ll see it creating the necessary files and folders it needs for your project.
When it’s done the Projects tab will be populated with the uniCenta oPOS project’s files.
You’re nearly there. But wait you’ll notice there are Warnings!
You need to clear these first as the Netbeans Wizard doesn’t add the Libraries you need to the project for you automatically.
 
 
 

netbeans_project_screen_5

Step 5: Adding Libraries I

Right Click on the Project Name at the top of the tree and choose Properties from the menu that appears.
 
 
 

netbeans_project_screen_6

Step 6: Adding Libraries II – Set Java Platform & Add .jars

On this screen you need to do two things:
1. Make sure the Java Platform is set to JDK 1.7 (uniCenta oPOS v3 series uses features available in from JDK 1.7) and later
2. Add the Libraries. Make sure the Compile tab is selected and Click Add JAR/Folder
 
 
 

netbeans_project_screen_7

Step 7: Adding Libraries III

Select .jars In the Add JAR/Folder pop-up and select all of the .jar files – exclude the Linux, Mac_OS_X, Solaris and Windows folders and make sure the Relative Path: option is selected.
Click Open and the selected files will show in the Compile-time Libraries list.
Click OK
Netbeans will now save and update the project – be patient whilst it updates – and you will begin to see the Warnings! disappear.
The screen below shows that all references to the Libraries have been resolved and your new uniCenta oPOS project is good to go!
 
 
 

netbeans_project_screen_8

Step 8: Set Main Class

The last thing you need to do is check the projects Main Class is set to com.openbravo.pos.forms.StartPOS