|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
org.compiere.swing.CDialog
org.compiere.apps.search.Info
public abstract class Info
Search Information and return selection - Base Class.
Structure:
parameterPanel (JPanel) - for subclasses to add parameter fields
scrollPame (JScrollPane)
m_table (MiniTable)
southPanel (JPanel)
confirmPanel
statusPanel
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JDialog |
|---|
JDialog.AccessibleJDialog |
| Nested classes/interfaces inherited from class java.awt.Dialog |
|---|
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
Window.AccessibleAWTWindow |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected CPanel |
addonPanel
|
protected static int |
INFO_WIDTH
Window Width |
protected CLogger |
log
Logger |
protected String |
p_keyColumn
Key Column Name |
protected Info_Column[] |
p_layout
Layout of Grid |
protected boolean |
p_loadedOK
Loading success indicator |
protected boolean |
p_multiSelection
Enable more than one selection |
protected MiniTable |
p_table
Table |
protected String |
p_tableName
Table Name |
protected String |
p_whereClause
Initial WHERE Clause |
protected int |
p_WindowNo
Master (owning) Window |
protected CPanel |
parameterPanel
|
protected StatusBar |
statusBar
|
| Fields inherited from class org.compiere.swing.CDialog |
|---|
ACTION_DISPOSE, s_dialogAction, s_disposeKeyStroke |
| Fields inherited from class javax.swing.JDialog |
|---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Dialog |
|---|
DEFAULT_MODALITY_TYPE |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
protected |
Info(Frame frame,
boolean modal,
int WindowNo,
String tableName,
String keyColumn,
boolean multiSelection,
String whereClause)
Detail Constructor |
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
(Button) Action Listener & Popup Menu |
static Info |
create(Frame frame,
boolean modal,
int WindowNo,
String tableName,
String keyColumn,
String value,
boolean multiSelection,
String whereClause)
Factory Constructor |
protected void |
customize()
Customize dialog To be overwritten by concrete classes |
void |
dispose()
Dispose (not OK) |
void |
dispose(boolean ok)
Dispose and save Selection |
protected void |
doReset()
Reset Parameters To be overwritten by concrete classes |
protected void |
enableButtons()
Enable OK, History, Zoom if row/s selected --- Changes: Changed the logic for accomodating multiple selection |
protected void |
executeQuery()
Execute Query |
protected int |
getAD_Window_ID(String tableName,
boolean isSOTrx)
Get Zoom Window |
protected String |
getKeyColumn()
Get Key Column Name |
Object |
getSelectedKey()
Get (first) selected Key |
Object[] |
getSelectedKeys()
Get selected Keys |
protected Integer |
getSelectedRowKey()
Get the key of currently selected row |
protected ArrayList<Integer> |
getSelectedRowKeys()
Get the keys of selected row/s based on layout defined in prepareTable |
String |
getSelectedSQL()
Get where clause for (first) selected key |
protected abstract String |
getSQLWhere()
Get dynamic WHERE part of SQL To be overwritten by concrete classes |
protected String |
getTableName()
Get Table name Synonym |
protected boolean |
hasCustomize()
Has Customize (false) To be overwritten by concrete classes |
protected boolean |
hasHistory()
Has History (false) To be overwritten by concrete classes |
protected boolean |
hasReset()
Has Reset (false) To be overwritten by concrete classes |
protected boolean |
hasZoom()
Has Zoom (false) To be overwritten by concrete classes |
boolean |
isCancelled()
Is cancelled? |
protected void |
jbInit()
Static Init |
boolean |
loadedOK()
Loaded correctly |
void |
mouseClicked(MouseEvent e)
Mouse Clicked |
protected void |
prepareTable(Info_Column[] layout,
String from,
String staticWhere,
String orderBy)
Prepare Table, Construct SQL (m_m_sqlMain, m_sqlAdd) and size Window |
protected void |
saveSelection()
Save Selection - Called by dispose |
protected void |
saveSelectionDetail()
Save Selection Details To be overwritten by concrete classes |
protected abstract void |
setParameters(PreparedStatement pstmt,
boolean forCount)
Set Parameters for Query To be overwritten by concrete classes |
void |
setStatusDB(String text)
Set Status DB |
void |
setStatusLine(String text,
boolean error)
Set Status Line |
static void |
showAsset(Frame frame,
int WindowNo)
Show Asset Info (non modal) |
static void |
showAssignment(Frame frame,
int WindowNo,
String value)
Show Assignment Info (non modal) |
static void |
showBPartner(Frame frame,
int WindowNo)
Show BPartner Info (non modal) |
static void |
showCashLine(Frame frame,
int WindowNo,
String value)
Show Cash Line Info (non modal) |
protected void |
showHistory()
History dialog To be overwritten by concrete classes |
static void |
showInOut(Frame frame,
int WindowNo,
String value)
Show Shipment Info (non modal) |
static void |
showInvoice(Frame frame,
int WindowNo,
String value)
Show Invoice Info (non modal) |
static void |
showOrder(Frame frame,
int WindowNo,
String value)
Show Order Info (non modal) |
static void |
showPayment(Frame frame,
int WindowNo,
String value)
Show Payment Info (non modal) |
static void |
showProduct(Frame frame,
int WindowNo)
Show Product Info (non modal) |
void |
valueChanged(ListSelectionEvent e)
Table Selection Changed |
protected void |
zoom()
Zoom action To be overwritten by concrete classes |
protected void |
zoom(int AD_Window_ID,
MQuery zoomQuery)
Zoom to target |
| Methods inherited from class org.compiere.swing.CDialog |
|---|
dialogInit, mouseEntered, mouseExited, mousePressed, mouseReleased, setTitle |
| Methods inherited from class java.awt.Dialog |
|---|
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setUndecorated, setVisible, show, toBack |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final int INFO_WIDTH
protected int p_WindowNo
protected String p_tableName
protected String p_keyColumn
protected boolean p_multiSelection
protected String p_whereClause
protected MiniTable p_table
protected Info_Column[] p_layout
protected boolean p_loadedOK
protected CLogger log
protected CPanel addonPanel
protected StatusBar statusBar
protected CPanel parameterPanel
| Constructor Detail |
|---|
protected Info(Frame frame,
boolean modal,
int WindowNo,
String tableName,
String keyColumn,
boolean multiSelection,
String whereClause)
frame - parent framemodal - modalWindowNo - window notableName - table namekeyColumn - key column namemultiSelection - muiliple selectionwhereClause - where clause| Method Detail |
|---|
public static Info create(Frame frame,
boolean modal,
int WindowNo,
String tableName,
String keyColumn,
String value,
boolean multiSelection,
String whereClause)
frame - parent framemodal - new window is modalWindowNo - window notableName - table name of the searchkeyColumn - key column of the searchvalue - query valuemultiSelection - allow to select more than one rowwhereClause - fully qualified where clause for the search
public static void showBPartner(Frame frame,
int WindowNo)
frame - Parent FrameWindowNo - window no
public static void showAsset(Frame frame,
int WindowNo)
frame - Parent FrameWindowNo - window no
public static void showProduct(Frame frame,
int WindowNo)
frame - Parent FrameWindowNo - window no
public static void showOrder(Frame frame,
int WindowNo,
String value)
frame - Parent FrameWindowNo - window novalue - query value
public static void showInvoice(Frame frame,
int WindowNo,
String value)
frame - Parent FrameWindowNo - window novalue - query value
public static void showInOut(Frame frame,
int WindowNo,
String value)
frame - Parent FrameWindowNo - window novalue - query value
public static void showPayment(Frame frame,
int WindowNo,
String value)
frame - Parent FrameWindowNo - window novalue - query value
public static void showCashLine(Frame frame,
int WindowNo,
String value)
frame - Parent FrameWindowNo - window novalue - query value
public static void showAssignment(Frame frame,
int WindowNo,
String value)
frame - Parent FrameWindowNo - window novalue - query value
protected void jbInit()
throws Exception
Exceptionpublic boolean loadedOK()
public void setStatusLine(String text,
boolean error)
text - texterror - errorpublic void setStatusDB(String text)
text - text
protected void prepareTable(Info_Column[] layout,
String from,
String staticWhere,
String orderBy)
layout - layout arrayfrom - from clausestaticWhere - where clauseorderBy - order by clauseprotected void executeQuery()
protected void saveSelection()
protected Integer getSelectedRowKey()
protected ArrayList<Integer> getSelectedRowKeys()
public Object[] getSelectedKeys()
public Object getSelectedKey()
public boolean isCancelled()
public String getSelectedSQL()
public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListeneractionPerformed in class CDialoge - eventActionListener.actionPerformed(java.awt.event.ActionEvent)
protected void zoom(int AD_Window_ID,
MQuery zoomQuery)
AD_Window_ID - window idzoomQuery - zoom querypublic void dispose()
dispose in class Windowpublic void dispose(boolean ok)
ok - OK pressedprotected String getTableName()
protected String getKeyColumn()
public void valueChanged(ListSelectionEvent e)
valueChanged in interface ListSelectionListenere - eventprotected void enableButtons()
protected abstract String getSQLWhere()
protected abstract void setParameters(PreparedStatement pstmt,
boolean forCount)
throws SQLException
pstmt - statementforCount - for counting records
SQLExceptionprotected void doReset()
protected boolean hasReset()
protected void showHistory()
protected boolean hasHistory()
protected void customize()
protected boolean hasCustomize()
protected void zoom()
protected boolean hasZoom()
protected void saveSelectionDetail()
protected int getAD_Window_ID(String tableName,
boolean isSOTrx)
tableName - table nameisSOTrx - sales trx
public void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenermouseClicked in class CDialoge - eventMouseListener.mouseClicked(java.awt.event.MouseEvent)
|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||