From bc69dfed7e09e720b0fafd7b0b89edb1f34b4a6a Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Fri, 15 Feb 2008 02:16:27 +0000 Subject: [PATCH] [ 1894181 ] Custom Info class must be of the same package --- client/src/org/compiere/apps/search/Info.java | 34 +++++++++---------- .../org/compiere/apps/search/InfoAsset.java | 16 ++++----- .../compiere/apps/search/InfoAssignment.java | 18 +++++----- .../compiere/apps/search/InfoBPartner.java | 16 ++++----- .../compiere/apps/search/InfoCashLine.java | 4 +-- .../org/compiere/apps/search/InfoGeneral.java | 4 +-- .../org/compiere/apps/search/InfoInOut.java | 8 ++--- .../org/compiere/apps/search/InfoInvoice.java | 10 +++--- .../org/compiere/apps/search/InfoOrder.java | 8 ++--- .../org/compiere/apps/search/InfoPayment.java | 8 ++--- .../org/compiere/apps/search/InfoProduct.java | 27 ++++++--------- 11 files changed, 73 insertions(+), 80 deletions(-) diff --git a/client/src/org/compiere/apps/search/Info.java b/client/src/org/compiere/apps/search/Info.java index d356d13634..bb61d07f64 100644 --- a/client/src/org/compiere/apps/search/Info.java +++ b/client/src/org/compiere/apps/search/Info.java @@ -221,7 +221,7 @@ public abstract class Info extends CDialog } // showAssignment /** Window Width */ - static final int INFO_WIDTH = 800; + protected static final int INFO_WIDTH = 800; /************************************************************************** @@ -451,7 +451,7 @@ public abstract class Info extends CDialog /************************************************************************** * Execute Query */ - void executeQuery() + protected void executeQuery() { // ignore when running if (m_worker != null && m_worker.isAlive()) @@ -690,7 +690,7 @@ public abstract class Info extends CDialog * @param AD_Window_ID window id * @param zoomQuery zoom query */ - void zoom (int AD_Window_ID, MQuery zoomQuery) + protected void zoom (int AD_Window_ID, MQuery zoomQuery) { setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); final AWindow frame = new AWindow(); @@ -759,7 +759,7 @@ public abstract class Info extends CDialog * Get Table name Synonym * @return table name */ - String getTableName() + protected String getTableName() { return p_tableName; } // getTableName @@ -768,7 +768,7 @@ public abstract class Info extends CDialog * Get Key Column Name * @return column name */ - String getKeyColumn() + protected String getKeyColumn() { return p_keyColumn; } // getKeyColumn @@ -788,7 +788,7 @@ public abstract class Info extends CDialog /** * Enable OK, History, Zoom if row selected */ - void enableButtons () + protected void enableButtons () { boolean enable = p_table.getSelectedRow() != -1; confirmPanel.getOKButton().setEnabled(enable); @@ -805,7 +805,7 @@ public abstract class Info extends CDialog * To be overwritten by concrete classes * @return WHERE clause */ - abstract String getSQLWhere(); + protected abstract String getSQLWhere(); /** * Set Parameters for Query @@ -814,58 +814,58 @@ public abstract class Info extends CDialog * @param forCount for counting records * @throws SQLException */ - abstract void setParameters (PreparedStatement pstmt, boolean forCount) + protected abstract void setParameters (PreparedStatement pstmt, boolean forCount) throws SQLException; /** * Reset Parameters * To be overwritten by concrete classes */ - void doReset() {} + protected void doReset() {} /** * Has Reset (false) * To be overwritten by concrete classes * @return true if it has reset (default false) */ - boolean hasReset() {return false;} + protected boolean hasReset() {return false;} /** * History dialog * To be overwritten by concrete classes */ - void showHistory() {} + protected void showHistory() {} /** * Has History (false) * To be overwritten by concrete classes * @return true if it has history (default false) */ - boolean hasHistory() {return false;} + protected boolean hasHistory() {return false;} /** * Customize dialog * To be overwritten by concrete classes */ - void customize() {} + protected void customize() {} /** * Has Customize (false) * To be overwritten by concrete classes * @return true if it has customize (default false) */ - boolean hasCustomize() {return false;} + protected boolean hasCustomize() {return false;} /** * Zoom action * To be overwritten by concrete classes */ - void zoom() {} + protected void zoom() {} /** * Has Zoom (false) * To be overwritten by concrete classes * @return true if it has zoom (default false) */ - boolean hasZoom() {return false;} + protected boolean hasZoom() {return false;} /** * Save Selection Details * To be overwritten by concrete classes */ - void saveSelectionDetail() {} + protected void saveSelectionDetail() {} /** * Get Zoom Window diff --git a/client/src/org/compiere/apps/search/InfoAsset.java b/client/src/org/compiere/apps/search/InfoAsset.java index 523372d139..88a749981e 100644 --- a/client/src/org/compiere/apps/search/InfoAsset.java +++ b/client/src/org/compiere/apps/search/InfoAsset.java @@ -166,7 +166,7 @@ public class InfoAsset extends Info * Includes first AND * @return WHERE clause */ - String getSQLWhere() + protected String getSQLWhere() { StringBuffer sql = new StringBuffer(); // => Value @@ -197,7 +197,7 @@ public class InfoAsset extends Info * @param forCount for counting records * @throws SQLException */ - void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException + protected void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException { int index = 1; // => Value @@ -241,7 +241,7 @@ public class InfoAsset extends Info /** * Show History */ - void showHistory() + protected void showHistory() { log.info( "InfoAsset.showHistory"); } // showHistory @@ -250,7 +250,7 @@ public class InfoAsset extends Info * Has History * @return true */ - boolean hasHistory() + protected boolean hasHistory() { return false; } // hasHistory @@ -258,7 +258,7 @@ public class InfoAsset extends Info /** * Zoom */ - void zoom() + protected void zoom() { log.info( "InfoAsset.zoom"); Integer A_Asset_ID = getSelectedRowKey(); @@ -275,7 +275,7 @@ public class InfoAsset extends Info * Has Zoom * @return true */ - boolean hasZoom() + protected boolean hasZoom() { return true; } // hasZoom @@ -283,7 +283,7 @@ public class InfoAsset extends Info /** * Customize */ - void customize() + protected void customize() { log.info( "InfoAsset.customize"); } // customize @@ -292,7 +292,7 @@ public class InfoAsset extends Info * Has Customize * @return false */ - boolean hasCustomize() + protected boolean hasCustomize() { return false; // for now } // hasCustomize diff --git a/client/src/org/compiere/apps/search/InfoAssignment.java b/client/src/org/compiere/apps/search/InfoAssignment.java index e9f9dd1c90..82a2a891d6 100644 --- a/client/src/org/compiere/apps/search/InfoAssignment.java +++ b/client/src/org/compiere/apps/search/InfoAssignment.java @@ -199,7 +199,7 @@ AND rt.C_UOM_ID=uom.C_UOM_ID * To be overwritten by concrete classes * @return WHERE clause */ - String getSQLWhere() + protected String getSQLWhere() { StringBuffer sql = new StringBuffer(); // @@ -228,7 +228,7 @@ AND rt.C_UOM_ID=uom.C_UOM_ID * @param forCount for counting records * @throws SQLException */ - void setParameters (PreparedStatement pstmt, boolean forCount) throws SQLException + protected void setParameters (PreparedStatement pstmt, boolean forCount) throws SQLException { } @@ -236,7 +236,7 @@ AND rt.C_UOM_ID=uom.C_UOM_ID * History dialog * To be overwritten by concrete classes */ - void showHistory() + protected void showHistory() { } @@ -245,7 +245,7 @@ AND rt.C_UOM_ID=uom.C_UOM_ID * To be overwritten by concrete classes * @return true if it has history (default false) */ - boolean hasHistory() + protected boolean hasHistory() { return false; } @@ -254,7 +254,7 @@ AND rt.C_UOM_ID=uom.C_UOM_ID * Customize dialog * To be overwritten by concrete classes */ - void customize() + protected void customize() { } @@ -263,7 +263,7 @@ AND rt.C_UOM_ID=uom.C_UOM_ID * To be overwritten by concrete classes * @return true if it has customize (default false) */ - boolean hasCustomize() + protected boolean hasCustomize() { return false; } @@ -272,7 +272,7 @@ AND rt.C_UOM_ID=uom.C_UOM_ID * Zoom action * To be overwritten by concrete classes */ - void zoom() + protected void zoom() { } @@ -281,7 +281,7 @@ AND rt.C_UOM_ID=uom.C_UOM_ID * To be overwritten by concrete classes * @return true if it has zoom (default false) */ - boolean hasZoom() + protected boolean hasZoom() { return false; } @@ -290,7 +290,7 @@ AND rt.C_UOM_ID=uom.C_UOM_ID * Save Selection Details * To be overwritten by concrete classes */ - void saveSelectionDetail() + protected void saveSelectionDetail() { } diff --git a/client/src/org/compiere/apps/search/InfoBPartner.java b/client/src/org/compiere/apps/search/InfoBPartner.java index e1ba7dbbb2..949b8e99b6 100644 --- a/client/src/org/compiere/apps/search/InfoBPartner.java +++ b/client/src/org/compiere/apps/search/InfoBPartner.java @@ -243,7 +243,7 @@ public class InfoBPartner extends Info * Includes first AND * @return WHERE clause */ - String getSQLWhere() + protected String getSQLWhere() { ArrayList list = new ArrayList(); // => Value @@ -311,7 +311,7 @@ public class InfoBPartner extends Info * @param forCount for counting records * @throws SQLException */ - void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException + protected void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException { int index = 1; // => Value @@ -408,7 +408,7 @@ public class InfoBPartner extends Info /************************************************************************** * Show History */ - void showHistory() + protected void showHistory() { log.info(""); Integer C_BPartner_ID = getSelectedRowKey(); @@ -424,7 +424,7 @@ public class InfoBPartner extends Info * Has History * @return true */ - boolean hasHistory() + protected boolean hasHistory() { return true; } // hasHistory @@ -432,7 +432,7 @@ public class InfoBPartner extends Info /** * Zoom */ - void zoom() + protected void zoom() { log.info( "InfoBPartner.zoom"); Integer C_BPartner_ID = getSelectedRowKey(); @@ -451,7 +451,7 @@ public class InfoBPartner extends Info * Has Zoom * @return true */ - boolean hasZoom() + protected boolean hasZoom() { return true; } // hasZoom @@ -459,7 +459,7 @@ public class InfoBPartner extends Info /** * Customize */ - void customize() + protected void customize() { log.info( "InfoBPartner.customize"); } // customize @@ -468,7 +468,7 @@ public class InfoBPartner extends Info * Has Customize * @return false */ - boolean hasCustomize() + protected boolean hasCustomize() { return false; // for now } // hasCustomize diff --git a/client/src/org/compiere/apps/search/InfoCashLine.java b/client/src/org/compiere/apps/search/InfoCashLine.java index bbd8af53c3..11312ab44b 100644 --- a/client/src/org/compiere/apps/search/InfoCashLine.java +++ b/client/src/org/compiere/apps/search/InfoCashLine.java @@ -237,7 +237,7 @@ public class InfoCashLine extends Info * Includes first AND * @return sql where clause */ - String getSQLWhere() + protected String getSQLWhere() { StringBuffer sql = new StringBuffer(); if (fName.getText().length() > 0) @@ -294,7 +294,7 @@ public class InfoCashLine extends Info * @param forCount for counting records * @throws SQLException */ - void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException + protected void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException { int index = 1; if (fName.getText().length() > 0) diff --git a/client/src/org/compiere/apps/search/InfoGeneral.java b/client/src/org/compiere/apps/search/InfoGeneral.java index 85de76a25a..8c5609f5b8 100644 --- a/client/src/org/compiere/apps/search/InfoGeneral.java +++ b/client/src/org/compiere/apps/search/InfoGeneral.java @@ -359,7 +359,7 @@ public class InfoGeneral extends Info * Includes first AND * @return where clause */ - String getSQLWhere() + protected String getSQLWhere() { StringBuffer sql = new StringBuffer(); addSQLWhere (sql, 0, textField1.getText().toUpperCase()); @@ -395,7 +395,7 @@ public class InfoGeneral extends Info * @param forCount for counting records * @throws SQLException */ - void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException + protected void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException { int index = 1; } // setParameters diff --git a/client/src/org/compiere/apps/search/InfoInOut.java b/client/src/org/compiere/apps/search/InfoInOut.java index 44208bf286..08fd8fbd72 100644 --- a/client/src/org/compiere/apps/search/InfoInOut.java +++ b/client/src/org/compiere/apps/search/InfoInOut.java @@ -203,7 +203,7 @@ public class InfoInOut extends Info * Includes first AND * @return where clause */ - String getSQLWhere() + protected String getSQLWhere() { StringBuffer sql = new StringBuffer(); if (fDocumentNo.getText().length() > 0) @@ -240,7 +240,7 @@ public class InfoInOut extends Info * @param forCount for counting records * @throws SQLException */ - void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException + protected void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException { int index = 1; if (fDocumentNo.getText().length() > 0) @@ -292,7 +292,7 @@ public class InfoInOut extends Info /** * Zoom */ - void zoom() + protected void zoom() { log.info( "InfoInOut.zoom"); Integer M_InOut_ID = getSelectedRowKey(); @@ -309,7 +309,7 @@ public class InfoInOut extends Info * Has Zoom * @return true */ - boolean hasZoom() + protected boolean hasZoom() { return true; } // hasZoom diff --git a/client/src/org/compiere/apps/search/InfoInvoice.java b/client/src/org/compiere/apps/search/InfoInvoice.java index ffe0cc9c43..4a2005c9c5 100644 --- a/client/src/org/compiere/apps/search/InfoInvoice.java +++ b/client/src/org/compiere/apps/search/InfoInvoice.java @@ -236,7 +236,7 @@ public class InfoInvoice extends Info * Includes first AND * @return sql */ - String getSQLWhere() + protected String getSQLWhere() { StringBuffer sql = new StringBuffer(); if (fDocumentNo.getText().length() > 0) @@ -289,7 +289,7 @@ public class InfoInvoice extends Info * @param forCount for counting records * @throws SQLException */ - void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException + protected void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException { int index = 1; if (fDocumentNo.getText().length() > 0) @@ -365,7 +365,7 @@ public class InfoInvoice extends Info /** * Zoom */ - void zoom() + protected void zoom() { log.info( "InfoInvoice.zoom"); Integer C_Invoice_ID = getSelectedRowKey(); @@ -382,7 +382,7 @@ public class InfoInvoice extends Info * Has Zoom * @return true */ - boolean hasZoom() + protected boolean hasZoom() { return true; } // hasZoom @@ -390,7 +390,7 @@ public class InfoInvoice extends Info /** * Save Selection Settings */ - void saveSelectionDetail() + protected void saveSelectionDetail() { // publish for Callout to read Integer ID = getSelectedRowKey(); diff --git a/client/src/org/compiere/apps/search/InfoOrder.java b/client/src/org/compiere/apps/search/InfoOrder.java index 6284021e1a..bd56124e1f 100644 --- a/client/src/org/compiere/apps/search/InfoOrder.java +++ b/client/src/org/compiere/apps/search/InfoOrder.java @@ -219,7 +219,7 @@ public class InfoOrder extends Info * Includes first AND * @return sql */ - String getSQLWhere() + protected String getSQLWhere() { StringBuffer sql = new StringBuffer(); if (fDocumentNo.getText().length() > 0) @@ -268,7 +268,7 @@ public class InfoOrder extends Info * @param forCount for counting records * @throws SQLException */ - void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException + protected void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException { int index = 1; if (fDocumentNo.getText().length() > 0) @@ -337,7 +337,7 @@ public class InfoOrder extends Info /** * Zoom */ - void zoom() + protected void zoom() { log.info(""); Integer C_Order_ID = getSelectedRowKey(); @@ -354,7 +354,7 @@ public class InfoOrder extends Info * Has Zoom * @return true */ - boolean hasZoom() + protected boolean hasZoom() { return true; } // hasZoom diff --git a/client/src/org/compiere/apps/search/InfoPayment.java b/client/src/org/compiere/apps/search/InfoPayment.java index cdc02d6a66..19ef30b1ca 100644 --- a/client/src/org/compiere/apps/search/InfoPayment.java +++ b/client/src/org/compiere/apps/search/InfoPayment.java @@ -219,7 +219,7 @@ public class InfoPayment extends Info * Includes first AND * @return sql where clause */ - String getSQLWhere() + protected String getSQLWhere() { StringBuffer sql = new StringBuffer(); if (fDocumentNo.getText().length() > 0) @@ -264,7 +264,7 @@ public class InfoPayment extends Info * @param forCount for counting records * @throws SQLException */ - void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException + protected void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException { int index = 1; if (fDocumentNo.getText().length() > 0) @@ -328,7 +328,7 @@ public class InfoPayment extends Info /** * Zoom */ - void zoom() + protected void zoom() { log.info( "InfoPayment.zoom"); Integer C_Payment_ID = getSelectedRowKey(); @@ -345,7 +345,7 @@ public class InfoPayment extends Info * Has Zoom * @return true */ - boolean hasZoom() + protected boolean hasZoom() { return true; } // hasZoom diff --git a/client/src/org/compiere/apps/search/InfoProduct.java b/client/src/org/compiere/apps/search/InfoProduct.java index 7c691ae4c1..8eb45f6c51 100644 --- a/client/src/org/compiere/apps/search/InfoProduct.java +++ b/client/src/org/compiere/apps/search/InfoProduct.java @@ -24,11 +24,7 @@ import java.util.*; import java.util.logging.*; import javax.swing.JScrollPane; -import javax.swing.JTabbedPane; -import javax.swing.JTextArea; import javax.swing.plaf.ColorUIResource; -import javax.swing.table.AbstractTableModel; -import javax.swing.table.DefaultTableModel; // import org.adempiere.plaf.AdempierePLAF; import org.adempiere.plaf.AdempiereTaskPaneUI; @@ -38,10 +34,7 @@ import org.compiere.minigrid.*; import org.compiere.model.*; import org.compiere.swing.*; import org.compiere.util.*; -import org.jdesktop.swingx.JXTable; import org.jdesktop.swingx.JXTaskPane; -import org.jdesktop.swingx.JXTaskPaneContainer; -import org.jdesktop.swingx.action.AbstractActionExt; /** @@ -612,7 +605,7 @@ public final class InfoProduct extends Info implements ActionListener * Includes first AND * @return SQL WHERE clause */ - String getSQLWhere() + protected String getSQLWhere() { StringBuffer where = new StringBuffer(); @@ -666,7 +659,7 @@ public final class InfoProduct extends Info implements ActionListener * @param forCount for counting records * @throws SQLException */ - void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException + protected void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException { int index = 1; @@ -796,7 +789,7 @@ public final class InfoProduct extends Info implements ActionListener /** * Enable PAttribute if row selected/changed */ - void enableButtons () + protected void enableButtons () { m_M_AttributeSetInstance_ID = -1; if (m_PAttributeButton != null) @@ -833,7 +826,7 @@ public final class InfoProduct extends Info implements ActionListener /** * Show History */ - void showHistory() + protected void showHistory() { log.info(""); Integer M_Product_ID = getSelectedRowKey(); @@ -856,7 +849,7 @@ public final class InfoProduct extends Info implements ActionListener * * @return true (has history) */ - boolean hasHistory() + protected boolean hasHistory() { return true; } // hasHistory @@ -864,7 +857,7 @@ public final class InfoProduct extends Info implements ActionListener /** * Zoom */ - void zoom() + protected void zoom() { log.info(""); Integer M_Product_ID = getSelectedRowKey(); @@ -883,7 +876,7 @@ public final class InfoProduct extends Info implements ActionListener * Has Zoom * @return (has zoom) */ - boolean hasZoom() + protected boolean hasZoom() { return true; } // hasZoom @@ -891,7 +884,7 @@ public final class InfoProduct extends Info implements ActionListener /** * Customize */ - void customize() + protected void customize() { log.info(""); } // customize @@ -900,7 +893,7 @@ public final class InfoProduct extends Info implements ActionListener * Has Customize * @return false (no customize) */ - boolean hasCustomize() + protected boolean hasCustomize() { return false; // for now } // hasCustomize @@ -908,7 +901,7 @@ public final class InfoProduct extends Info implements ActionListener /** * Save Selection Settings for PriceList */ - void saveSelectionDetail() + protected void saveSelectionDetail() { // publish for Callout to read Integer ID = getSelectedRowKey();