IDEMPIERE-455 Discover and fix FindBugs problems / Eclipse warning -> deprecated

This commit is contained in:
Richard Morales 2012-12-20 17:56:26 -05:00
parent 610202bc0d
commit 944542b2d5
3 changed files with 34 additions and 14 deletions

View File

@ -62,6 +62,7 @@ import org.zkoss.util.media.AMedia;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Cell;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Hbox; import org.zkoss.zul.Hbox;
import org.zkoss.zul.Iframe; import org.zkoss.zul.Iframe;
@ -408,9 +409,14 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
Hbox boxViewSeparator = new Hbox(); Hbox boxViewSeparator = new Hbox();
boxViewSeparator.setWidth("100%"); boxViewSeparator.setWidth("100%");
boxViewSeparator.setHeight("100%"); boxViewSeparator.setHeight("100%");
boxViewSeparator.setWidths("70%, 30%"); Cell cell = new Cell();
boxViewSeparator.appendChild(iframe); cell.setWidth("70%");
boxViewSeparator.appendChild(gridView); cell.appendChild(iframe);
boxViewSeparator.appendChild(cell);
cell = new Cell();
cell.setWidth("30%");
cell.appendChild(gridView);
boxViewSeparator.appendChild(cell);
tabViewPanel.appendChild(boxViewSeparator); tabViewPanel.appendChild(boxViewSeparator);
tabs.appendChild(tabView); tabs.appendChild(tabView);

View File

@ -59,6 +59,7 @@ import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Caption; import org.zkoss.zul.Caption;
import org.zkoss.zul.Cell;
import org.zkoss.zul.Decimalbox; import org.zkoss.zul.Decimalbox;
import org.zkoss.zul.Groupbox; import org.zkoss.zul.Groupbox;
import org.zkoss.zul.Hbox; import org.zkoss.zul.Hbox;
@ -470,7 +471,8 @@ public class WBOMDrop extends ADForm implements EventListener<Event>
Hbox boxQty = new Hbox(); Hbox boxQty = new Hbox();
boxQty.setWidth("100%"); boxQty.setWidth("100%");
boxQty.setWidths("10%, 40%, 50%"); Cell cell = new Cell();
cell.setWidth("10%");
if (MProductBOM.BOMTYPE_StandardPart.equals(bomType)) if (MProductBOM.BOMTYPE_StandardPart.equals(bomType))
{ {
@ -481,7 +483,7 @@ public class WBOMDrop extends ADForm implements EventListener<Event>
cb.setEnabled(false); cb.setEnabled(false);
m_selectionList.add(cb); m_selectionList.add(cb);
boxQty.appendChild(cb); cell.appendChild(cb);
} }
else if (MProductBOM.BOMTYPE_OptionalPart.equals(bomType)) else if (MProductBOM.BOMTYPE_OptionalPart.equals(bomType))
{ {
@ -493,7 +495,7 @@ public class WBOMDrop extends ADForm implements EventListener<Event>
cb.addEventListener(Events.ON_CHECK, this); cb.addEventListener(Events.ON_CHECK, this);
m_selectionList.add(cb); m_selectionList.add(cb);
boxQty.appendChild(cb); cell.appendChild(cb);
} }
else // Alternative else // Alternative
{ {
@ -519,8 +521,9 @@ public class WBOMDrop extends ADForm implements EventListener<Event>
} }
b.addEventListener(Events.ON_CLICK, this); b.addEventListener(Events.ON_CLICK, this);
m_selectionList.add(b); m_selectionList.add(b);
boxQty.appendChild(b); cell.appendChild(b);
} }
boxQty.appendChild(cell);
// Add to List & display // Add to List & display
m_productList.add (new Integer(M_Product_ID)); m_productList.add (new Integer(M_Product_ID));
@ -532,8 +535,14 @@ public class WBOMDrop extends ADForm implements EventListener<Event>
Label label = new Label(name); Label label = new Label(name);
HtmlBasedComponent c = (HtmlBasedComponent) label.rightAlign(); HtmlBasedComponent c = (HtmlBasedComponent) label.rightAlign();
c.setStyle(c.getStyle() + ";margin-right: 5px"); c.setStyle(c.getStyle() + ";margin-right: 5px");
boxQty.appendChild(c); cell = new Cell();
boxQty.appendChild(qty); cell.setWidth("40%");
cell.appendChild(c);
boxQty.appendChild(cell);
cell = new Cell();
cell.setWidth("50%");
cell.appendChild(qty);
boxQty.appendChild(cell);
grpSelectProd.appendChild(boxQty); grpSelectProd.appendChild(boxQty);
} // addDisplay } // addDisplay

View File

@ -56,6 +56,7 @@ import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.event.UploadEvent; import org.zkoss.zk.ui.event.UploadEvent;
import org.zkoss.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zul.Cell;
import org.zkoss.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Hbox; import org.zkoss.zul.Hbox;
@ -468,10 +469,13 @@ public class WFileImport extends ADForm implements EventListener<Event>
Hbox hbox = new Hbox(); Hbox hbox = new Hbox();
hbox.setWidth("100%"); hbox.setWidth("100%");
hbox.setWidths("30%, 70%");
hbox.setStyle("padding-bottom: 3px"); hbox.setStyle("padding-bottom: 3px");
Cell cell = new Cell();
hbox.appendChild(m_labels[i].rightAlign()); cell.setWidth("30%");
cell.appendChild(m_labels[i].rightAlign());
hbox.appendChild(cell);
cell = new Cell();
cell.setWidth("70%");
int length = row.getEndNo() - row.getStartNo(); int length = row.getEndNo() - row.getStartNo();
@ -483,7 +487,8 @@ public class WFileImport extends ADForm implements EventListener<Event>
m_fields[i] = new Textbox(); m_fields[i] = new Textbox();
m_fields[i].setStyle("margin-left: 2px"); m_fields[i].setStyle("margin-left: 2px");
hbox.appendChild(m_fields[i]); cell.appendChild(m_fields[i]);
hbox.appendChild(cell);
previewPanel.appendChild(hbox); previewPanel.appendChild(hbox);
} }