svn commit: r619202 - in /ofbiz/trunk/specialpurpose/pos: screens/default/includes/journal.xml src/org/ofbiz/pos/component/Journal.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r619202 - in /ofbiz/trunk/specialpurpose/pos: screens/default/includes/journal.xml src/org/ofbiz/pos/component/Journal.java

jleroux@apache.org
Author: jleroux
Date: Wed Feb  6 14:49:42 2008
New Revision: 619202

URL: http://svn.apache.org/viewvc?rev=619202&view=rev
Log:
Some settings needed for XUI 3.2rc2b update (cosmetics)
The journal rows height is now 30 pixels, I hope it enough to catch a line with a touch screen

Modified:
    ofbiz/trunk/specialpurpose/pos/screens/default/includes/journal.xml
    ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Journal.java

Modified: ofbiz/trunk/specialpurpose/pos/screens/default/includes/journal.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/screens/default/includes/journal.xml?rev=619202&r1=619201&r2=619202&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/pos/screens/default/includes/journal.xml (original)
+++ ofbiz/trunk/specialpurpose/pos/screens/default/includes/journal.xml Wed Feb  6 14:49:42 2008
@@ -26,7 +26,7 @@
             <Edit name="oper_date" x="209" y="2" w="96" h="50" style="opinfo" border="0" alignment="Center"/>
             <Edit name="oper_total" x="307" y="2" w="105" h="50" style="optotal" border="0" alignment="Right"/>
         </Panel>
-        <ScrollPane name="journal_panel" x="0" y="55" w="412" h="637">
+        <ScrollPane name="journal_panel" x="0" y="55" w="412" h="630">
             <Table name="jtable" x="2" y="2" w="410" h="625" style="journal"/>
         </ScrollPane>
     </Components>    

Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Journal.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Journal.java?rev=619202&r1=619201&r2=619202&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Journal.java (original)
+++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Journal.java Wed Feb  6 14:49:42 2008
@@ -18,6 +18,8 @@
  *******************************************************************************/
 package org.ofbiz.pos.component;
 
+import java.awt.Color;
+import java.awt.Font;
 import java.io.StringWriter;
 import java.util.Locale;
 
@@ -29,6 +31,7 @@
 import net.xoetrope.xui.XProject;
 import net.xoetrope.xui.XProjectManager;
 import net.xoetrope.xui.data.XModel;
+import net.xoetrope.xui.style.XStyle;
 
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilProperties;
@@ -50,8 +53,8 @@
     protected String style = null;
 
     public Journal(PosScreen page) {    
-        this.jpanel = (XScrollPane) page.findComponent("journal_panel");
-        this.jpanel.setVisible(false);
+        jpanel = (XScrollPane) page.findComponent("journal_panel");
+        jpanel.setVisible(false);
         
         this.jtable = (XTable) page.findComponent("jtable");
 
@@ -64,10 +67,20 @@
         
 
         // set the styles
-        jtable.setBorderStyle("journalBorder");
+        jtable.setBorderStyle("journalBorder");        
         jtable.setHeaderStyle("journalHeader");
         jtable.setStyle("journalData");
         jtable.setSelectedStyle("journalSelected");
+        
+        // some settings needed for XUI 3.2rc2b update
+        jtable.setRowHeight(30); // Better to catch the line on a touch screen (minimal height I think)
+        XStyle style = currentProject.getStyleManager().getStyle("journalBorder");
+        Color borderColor = style.getStyleAsColor(XStyle.COLOR_FORE );        
+        jtable.setGridColor(borderColor); // jtable.setBorderStyle("journalBorder"); above is not working anymore        
+        style = currentProject.getStyleManager().getStyle("journalData");
+        Color backgoundColor = style.getStyleAsColor(XStyle.COLOR_BACK);        
+        jtable.setBackground(backgoundColor); // TODO This line is not working
+        jpanel.setBorder(jtable.getBorder()); // TODO there is a small shift between the vertical header grid lines and the other vertical grid lines. This line is not working
 
         // initialize the journal table header
         XModel jmodel = createModel();