IDEMPIERE-4723 - Removed dead code from org.adempiere.webui.window.* (#1397)

This commit is contained in:
Diego Ruiz 2022-07-14 23:53:51 +02:00 committed by GitHub
parent a9068d6a15
commit edc590967e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 6 additions and 103 deletions

View File

@ -1962,8 +1962,6 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
if(history.length() > 0) if(history.length() > 0)
{ {
historyCombo.setAttribute("history", history); historyCombo.setAttribute("history", history);
//historyCombo.setSelectedItem(new Comboitem(history));
//historyCombo.setSelectedItem(new Comboitem(history, history));
historyCombo.setSelectedIndex(getHistoryIndex(history)+1); historyCombo.setSelectedIndex(getHistoryIndex(history)+1);
} }
} }
@ -2537,14 +2535,6 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
m_query.addRestriction(ColumnSQL.toString(), oper, value, ColumnName, wed.getDisplay()); m_query.addRestriction(ColumnSQL.toString(), oper, value, ColumnName, wed.getDisplay());
appendCode(code, ColumnName, oper, value.toString(), "", "AND", "", "", m_AD_Tab_UU); appendCode(code, ColumnName, oper, value.toString(), "", "AND", "", "", m_AD_Tab_UU);
} }
/*
if (value.toString().indexOf('%') != -1)
m_query.addRestriction(ColumnName, MQuery.LIKE, value, ColumnName, ved.getDisplay());
else
m_query.addRestriction(ColumnName, MQuery.EQUAL, value, ColumnName, ved.getDisplay());
*/
// end globalqss patch
} }
} else if (valueTo != null && valueTo.toString().length() > 0) { } else if (valueTo != null && valueTo.toString().length() > 0) {
// filled upper limit without filling lower limit // filled upper limit without filling lower limit
@ -3031,9 +3021,7 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
} }
else else
if (log.isLoggable(Level.CONFIG)) log.config("#" + m_total); if (log.isLoggable(Level.CONFIG)) log.config("#" + m_total);
//
/*if (query != null)
statusBar.setStatusToolTip (query.getWhereClause());*/
return m_total; return m_total;
} // getNoOfRecords } // getNoOfRecords
@ -3461,10 +3449,6 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
attributeSQL.append(" AND value "); attributeSQL.append(" AND value ");
} }
// else if(attribute.getAttributeValueType().equals(MAttribute.ATTRIBUTEVALUETYPE_TableDirect)) {
//
// attributeSQL.append(" AND record_ID ");
// }
return attributeSQL.toString(); return attributeSQL.toString();
} // getAttributeSQL } // getAttributeSQL
@ -3544,16 +3528,7 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
//String //String
editor.setValue(value); editor.setValue(value);
} }
// else if(attributeValue.equals(MAttribute.ATTRIBUTEVALUETYPE_TableDirect)) {
//
// int AD_Column_ID = attribute.getAD_Column_ID();
// MLookup attributes = MLookupFactory.get(Env.getCtx(), m_targetWindowNo, AD_Column_ID, DisplayType.TableDir, Env.getLanguage(Env.getCtx()),
// attribute.getAD_Column().getColumnName(), 0, true, null);
// editor = new WTableDirEditor(attribute.getAD_Column().getName(), true, false, true, attributes);
//
// editor.setValue(Integer.valueOf(in));
// }
//
editor.addValueChangeListener(this); editor.addValueChangeListener(this);
editor.setReadWrite(enabled); editor.setReadWrite(enabled);
editor.setVisible(enabled); editor.setVisible(enabled);
@ -3728,21 +3703,11 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
editor = new WStringEditor("Test", true, false, true, 40, 40, null, null); editor = new WStringEditor("Test", true, false, true, 40, 40, null, null);
} }
// else if(attributeValue.equals(MAttribute.ATTRIBUTEVALUETYPE_TableDirect)) {
//
// int AD_Column_ID = attribute.getAD_Column_ID();
// MLookup orders = MLookupFactory.get(Env.getCtx(), m_targetWindowNo, AD_Column_ID, DisplayType.TableDir, Env.getLanguage(Env.getCtx()),
// attribute.getAD_Column().getColumnName(), 0, true, null);
// editor = new WTableDirEditor(attribute.getAD_Column().getName(), true, false, true, orders);
//
// }
//
editor.addValueChangeListener(this); editor.addValueChangeListener(this);
editor.setValue(null); editor.setValue(null);
editor.setReadWrite(enabled); editor.setReadWrite(enabled);
editor.setVisible(enabled); editor.setVisible(enabled);
//editor.dynamicDisplay();
return editor.getComponent(); return editor.getComponent();
@ -3767,7 +3732,6 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
// Return Integer // Return Integer
if (dt.equals(String.valueOf(MAttribute.ATTRIBUTEVALUETYPE_AD_Reference_ID)) if (dt.equals(String.valueOf(MAttribute.ATTRIBUTEVALUETYPE_AD_Reference_ID))
|| dt.equals(MAttribute.ATTRIBUTEVALUETYPE_List)) || dt.equals(MAttribute.ATTRIBUTEVALUETYPE_List))
// || dt.equals(MAttribute.ATTRIBUTEVALUETYPE_TableDirect))
{ {
if (value instanceof Integer) if (value instanceof Integer)
return value; return value;

View File

@ -660,21 +660,4 @@ public class InfoSchedule extends Window implements EventListener<Event>
mask.detach(); mask.detach();
} }
} }
/**
SELECT o.DocumentNo, ol.Line, ol.Description
FROM C_OrderLine ol, C_Order o
WHERE ol.S_ResourceAssignment_ID=1
AND ol.C_Order_ID=o.C_Order_ID
UNION
SELECT i.DocumentNo, il.Line, il.Description
FROM C_InvoiceLine il, C_Invoice i
WHERE il.S_ResourceAssignment_ID=1
AND il.C_Invoice_ID=i.C_Invoice_ID
UNION
SELECT e.DocumentNo, el.Line, el.Description
FROM S_TimeExpenseLine el, S_TimeExpense e
WHERE el.S_ResourceAssignment_ID=1
AND el.S_TimeExpense_ID=el.S_TimeExpense_ID
*/
} // InfoSchedule } // InfoSchedule

View File

@ -579,8 +579,7 @@ public final class WAccountDialog extends Window
m_row.setStyle("background-color: transparent"); m_row.setStyle("background-color: transparent");
m_rows.appendChild(m_row); m_rows.appendChild(m_row);
} }
// else
// m_gbc.gridx = 2;
if (ClientInfo.maxWidth(ClientInfo.SMALL_WIDTH-1)) if (ClientInfo.maxWidth(ClientInfo.SMALL_WIDTH-1))
{ {
Vlayout vlayout = new Vlayout(); Vlayout vlayout = new Vlayout();

View File

@ -222,10 +222,7 @@ public class WAutoCompleterCity extends AutoComplete implements EventListener<Ev
public void onEvent(Event event) throws Exception public void onEvent(Event event) throws Exception
{ {
//System.out.println("Event: " + event.getName());
//event.toString();
int index = this.getSelectedIndex(); int index = this.getSelectedIndex();
//System.out.println("Index = " +index );
if (index>=0) if (index>=0)
{ {
CityVO city = (CityVO) m_citiesShow.get(index); CityVO city = (CityVO) m_citiesShow.get(index);

View File

@ -68,7 +68,6 @@ public class WChat extends Window implements EventListener<Event>, DialogEvents
*/ */
private static final long serialVersionUID = -5265835393257520762L; private static final long serialVersionUID = -5265835393257520762L;
// private static final String REPLY_DIV_STYLE = "padding-left: 10px";
private static final String USER_LABEL_STYLE = "font-weight: bold"; private static final String USER_LABEL_STYLE = "font-weight: bold";
private static final String TIME_LABEL_STYLE = "font-size:xx-small;color:gray;margin-left:20px"; private static final String TIME_LABEL_STYLE = "font-size:xx-small;color:gray;margin-left:20px";
@ -271,7 +270,6 @@ public class WChat extends Window implements EventListener<Event>, DialogEvents
div.appendChild(button); div.appendChild(button);
Label timeLabel = createTimestampLabel(entry); Label timeLabel = createTimestampLabel(entry);
div.appendChild(timeLabel); div.appendChild(timeLabel);
// div.setStyle(REPLY_DIV_STYLE);
Treechildren treeChildren = treeitem.getTreechildren(); Treechildren treeChildren = treeitem.getTreechildren();
if (treeChildren == null) if (treeChildren == null)

View File

@ -485,10 +485,8 @@ public class WLocatorDialog extends Window implements EventListener<Event>
private void enableNew() private void enableNew()
{ {
boolean sel = chkCreateNew.isChecked(); boolean sel = chkCreateNew.isChecked();
//lblWarehouse.setVisible(sel);
lstWarehouse.setVisible(sel); lstWarehouse.setVisible(sel);
lstWarehouse.getParent().setVisible(sel); lstWarehouse.getParent().setVisible(sel);
//lWarehouseInfo.setVisible(!sel);
txtWarehouse.setVisible(!sel); txtWarehouse.setVisible(!sel);
txtWarehouse.getParent().setVisible(!sel); txtWarehouse.getParent().setVisible(!sel);
txtWarehouse.setReadonly(true); txtWarehouse.setReadonly(true);

View File

@ -179,15 +179,12 @@ public class WPAttributeDialog extends Window implements EventListener<Event>
private int m_row = 0; private int m_row = 0;
/** List of Editors */ /** List of Editors */
private ArrayList<WEditor> m_editors = new ArrayList<WEditor>(); private ArrayList<WEditor> m_editors = new ArrayList<WEditor>();
/** Length of Instance value (40) */
//private static final int INSTANCE_VALUE_LENGTH = 40;
private Checkbox cbNewEdit = new Checkbox(); private Checkbox cbNewEdit = new Checkbox();
private Button bNewRecord = new Button(Msg.getMsg(Env.getCtx(), "NewRecord")); private Button bNewRecord = new Button(Msg.getMsg(Env.getCtx(), "NewRecord"));
private Listbox existingCombo = new Listbox(); private Listbox existingCombo = new Listbox();
private Button bSelect = new Button(); private Button bSelect = new Button();
// Lot // Lot
// private VString fieldLotString = new VString ("Lot", false, false, true, 20, 20, null, null);
private Textbox fieldLotString = new Textbox(); private Textbox fieldLotString = new Textbox();
private Listbox fieldLot = new Listbox(); private Listbox fieldLot = new Listbox();
private Button bLot = new Button(Msg.getMsg (Env.getCtx(), "New")); private Button bLot = new Button(Msg.getMsg (Env.getCtx(), "New"));
@ -385,10 +382,7 @@ public class WPAttributeDialog extends Window implements EventListener<Event>
row.appendChild(fieldLotString); row.appendChild(fieldLotString);
ZKUpdateUtil.setHflex(fieldLotString, "1"); ZKUpdateUtil.setHflex(fieldLotString, "1");
fieldLotString.setText (m_masi.getLot()); fieldLotString.setText (m_masi.getLot());
// M_Lot_ID
// int AD_Column_ID = 9771; // M_AttributeSetInstance.M_Lot_ID
// fieldLot = new VLookup ("M_Lot_ID", false,false, true,
// MLookupFactory.get(Env.getCtx(), m_WindowNo, 0, AD_Column_ID, DisplayType.TableDir));
String sql = "SELECT M_Lot_ID, Name " String sql = "SELECT M_Lot_ID, Name "
+ "FROM M_Lot l " + "FROM M_Lot l "
+ "WHERE EXISTS (SELECT M_Product_ID FROM M_Product p " + "WHERE EXISTS (SELECT M_Product_ID FROM M_Product p "
@ -438,7 +432,6 @@ public class WPAttributeDialog extends Window implements EventListener<Event>
} }
} }
// Popup // Popup
// fieldLot.addMouseListener(new VPAttributeDialog_mouseAdapter(this)); // popup
mZoom = new Menuitem(Msg.getMsg(Env.getCtx(), "Zoom"), ThemeManager.getThemeResource("images/Zoom16.png")); mZoom = new Menuitem(Msg.getMsg(Env.getCtx(), "Zoom"), ThemeManager.getThemeResource("images/Zoom16.png"));
if(ThemeManager.isUseFontIconForImage()) { if(ThemeManager.isUseFontIconForImage()) {
mZoom.setIconSclass("z-icon-Zoom"); mZoom.setIconSclass("z-icon-Zoom");
@ -520,7 +513,6 @@ public class WPAttributeDialog extends Window implements EventListener<Event>
// Attrribute Set Instance Description // Attrribute Set Instance Description
Label label = new Label (Msg.translate(Env.getCtx(), "Description")); Label label = new Label (Msg.translate(Env.getCtx(), "Description"));
// label.setLabelFor(fieldDescription);
fieldDescription.setText(m_masi.getDescription()); fieldDescription.setText(m_masi.getDescription());
fieldDescription.setReadonly(true); fieldDescription.setReadonly(true);
Row row = new Row(); Row row = new Row();
@ -981,17 +973,6 @@ public class WPAttributeDialog extends Window implements EventListener<Event>
log.info(zoomQuery.toString()); log.info(zoomQuery.toString());
// //
//TODO: to port //TODO: to port
/*
int AD_Window_ID = 257; // Lot
AWindow frame = new AWindow();
if (frame.initWindow(AD_Window_ID, zoomQuery))
{
this.setVisible(false);
this.setModal (false); // otherwise blocked
this.setVisible(true);
AEnv.addToWindowManager(frame);
AEnv.showScreen(frame, SwingConstants.EAST);
}*/
} // cmd_zoom } // cmd_zoom
/** /**

View File

@ -360,23 +360,6 @@ public class WPAttributeInstance extends Window implements EventListener<Event>
+ "; M_Locator_ID=" + m_M_Locator_ID); + "; M_Locator_ID=" + m_M_Locator_ID);
} // enableButtons } // enableButtons
//TODO: double click support for WListbox
/**
* Mouse Clicked
* @param e event
*/
/*
public void mouseClicked(MouseEvent e)
{
// Double click with selected row => exit
if (e.getClickCount() > 1 && m_table.getSelectedRow() != -1)
{
enableButtons();
dispose();
}
}*/ // mouseClicked
/** /**
* Get Attribute Set Instance * Get Attribute Set Instance
* @return M_AttributeSetInstance_ID or -1 * @return M_AttributeSetInstance_ID or -1

View File

@ -752,7 +752,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
more.setIconSclass("z-icon-Expand"); more.setIconSclass("z-icon-Expand");
else else
more.setImage(ThemeManager.getThemeResource("images/expand-header.png")); more.setImage(ThemeManager.getThemeResource("images/expand-header.png"));
// more.setStyle("float: right;");
toolBar.appendChild(more); toolBar.appendChild(more);
LayoutUtils.addSclass("space-between-content", toolBar); LayoutUtils.addSclass("space-between-content", toolBar);
more.addEventListener(Events.ON_CLICK, evt -> { more.addEventListener(Events.ON_CLICK, evt -> {