Class JDPSearchResults

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----JDPSearchResults

public class JDPSearchResults
extends Panel
Class JDPSearchResults represents a tree structure or a list that contains key elements of a database table(s) that allow subsequent selection for loading other databound classes such as grids, columns or charts.


Constructor Index

 o JDPSearchResults(JDPUser)
Creates a Search Results panel.
 o JDPSearchResults(JDPUser, boolean, JDPJagg, boolean, String, int[], String, String[], String[], String[], String, boolean, String)
Creates a Search Results panel.
 o JDPSearchResults(JDPUser, boolean, JDPJagg, boolean, String, String[], String, String[], String[], String[], String, boolean, String)
Creates a Search Results panel.
 o JDPSearchResults(JDPUser, Container, boolean, JDPJagg, boolean, String, String[], String, String[], String[], String[], String, boolean, String)
Creates a Search Results panel.
 o JDPSearchResults(JDPUser, JDPJagg, boolean, String, String, String[], String[], String[], String, boolean, String)
Creates a Search Results panel.
 o JDPSearchResults(JDPUser, Panel, boolean, JDPJagg, boolean, String, String[], String, String[], String[], String[], String, boolean, String)
Creates a Search Results panel.

Method Index

 o clearList()
Clear all the entries from the list or the tree
 o clearList(String)
Clear all the entries from the tree and set the root name
 o getAllowMultSel()
Set the multiple selection flag if this is a list and not a tree
 o getBackground()
 o getFont()
 o getForeground()
 o getListHandle()
Get the handle to the list component that is being used by this Result List.
 o getMinHeight()
Get mimimum height of this panel
 o getMinWidth()
Get mimimum width of this panel
 o getSelectedBranch()
Get the branch names of the currently selected branch.
 o getSelectedIndex()
Get the currently selected index for the list or the tree.
 o getSelectedKey()
Get the currently selected database key values for the list or the tree.
 o getTotalEntries()
Get the total entries currently displayed.
 o getTreeHandle()
Get the handle to the tree component that is being used by this Result List.
 o handleEvent(Event)
 o loadList()
Load the list or tree using the current settings.
 o resetSelections()
Reset the selections.
 o setAllowMultSel(boolean)
Set the multiple selection flag if this is a list and not a tree
 o setBackground(Color)
 o setDisplayChoice(String[])
Set the new display choice column names
 o setFont(Font)
 o setForeground(Color)
 o setFromWhereClause(String)
Set the new from/where clause
 o setIcon(int)
Set the icon for this list
 o setIcons(int[])
Set the icons for this tree
 o setListEvents(boolean)
Set the the flag to cause tree branch selections to trigger a list selected event.
 o setMinHeight(int)
Set mimimum height of this panel
 o setMinWidth(int)
Set mimimum width of this panel
 o setSelectedKey(String[])
Select the branch in the Result List based on the key.
 o setSortChoice(String[])
Set the new sort choice column names
 o setTableKey(String)
Set the new table key clause

Constructors

 o JDPSearchResults
 public JDPSearchResults(JDPUser user,
                         Container targetPanel,
                         boolean useTreeClass,
                         JDPJagg jaggSQL,
                         boolean pallowMultSel,
                         String pselectFields,
                         String psdisplayFields[],
                         String pfromWhereClause,
                         String psortChoiceText[],
                         String psortChoice[],
                         String pdisplayChoice[],
                         String pinitChoice,
                         boolean pdisplayCount,
                         String countText)
Creates a Search Results panel.

Parameters:
JDPUser - the global user parameter used to pass handles in JDP.
targetPanel - the parent panel that this one will be added to.
useTreeClass - specifies whether this is a tree structure or a list.
JDPJagg - a handle to an instance of JDPJagg. DSN and CSTR must already be intialized.
pallowMultSel - for lists specifies whether multiple selection is allowed
pselectFields - the database column names to retrieve to load the tree or list
psdisplayFields - the database column name to sort the entries by
fromWhereClause - the from/where clause to use when selecting rows from the table
psortChoiceText - the values for the sort choice pulldown
psortChoice - the actual column names for the sort choice pulldown
pdisplayChoice - the display choice values
pinitChoice - the initial choice for the sort choice pulldown
pdisplayCount - the display a result count flag
countText - the text for the row count
 o JDPSearchResults
 public JDPSearchResults(JDPUser user,
                         Panel targetPanel,
                         boolean useTreeClass,
                         JDPJagg jaggSQL,
                         boolean pallowMultSel,
                         String pselectFields,
                         String psdisplayFields[],
                         String pfromWhereClause,
                         String psortChoiceText[],
                         String psortChoice[],
                         String pdisplayChoice[],
                         String pinitChoice,
                         boolean pdisplayCount,
                         String countText)
Creates a Search Results panel.

Parameters:
JDPUser - the global user parameter used to pass handles in JDP.
targetPanel - the parent panel that this one will be added to.
useTreeClass - specifies whether this is a tree structure or a list.
JDPJagg - a handle to an instance of JDPJagg. DSN and CSTR must already be intialized.
pallowMultSel - for lists specifies whether multiple selection is allowed
pselectFields - the database column names to retrieve to load the tree or list
psdisplayFields - the database column name to sort the entries by
fromWhereClause - the from/where clause to use when selecting rows from the table
psortChoiceText - the values for the sort choice pulldown
psortChoice - the actual column names for the sort choice pulldown
pdisplayChoice - the display choice values
pinitChoice - the initial choice for the sort choice pulldown
pdisplayCount - the display a result count flag
countText - the text for the row count
 o JDPSearchResults
 public JDPSearchResults(JDPUser user,
                         boolean useTreeClass,
                         JDPJagg jaggSQL,
                         boolean pallowMultSel,
                         String pselectFields,
                         String psdisplayFields[],
                         String pfromWhereClause,
                         String psortChoiceText[],
                         String psortChoice[],
                         String pdisplayChoice[],
                         String pinitChoice,
                         boolean pdisplayCount,
                         String countText)
Creates a Search Results panel.

Parameters:
JDPUser - the global user parameter used to pass handles in JDP.
useTreeClass - specifies whether this is a tree structure or a list.
JDPJagg - a handle to an instance of JDPJagg. DSN and CSTR must already be intialized.
pallowMultSel - for lists specifies whether multiple selection is allowed
pselectFields - the database column names to retrieve to load the tree or list
psdisplayFields - the database column name to sort the entries by
fromWhereClause - the from/where clause to use when selecting rows from the table
psortChoiceText - the values for the sort choice pulldown
psortChoice - the actual column names for the sort choice pulldown
pdisplayChoice - the display choice values
pinitChoice - the initial choice for the sort choice pulldown
pdisplayCount - the display a result count flag
countText - the text for the row count
 o JDPSearchResults
 public JDPSearchResults(JDPUser user,
                         boolean useTreeClass,
                         JDPJagg jaggSQL,
                         boolean pallowMultSel,
                         String pselectFields,
                         int pdisplayFields[],
                         String pfromWhereClause,
                         String psortChoiceText[],
                         String psortChoice[],
                         String pdisplayChoice[],
                         String pinitChoice,
                         boolean pdisplayCount,
                         String countText)
Creates a Search Results panel.

Parameters:
JDPUser - the global user parameter used to pass handles in JDP.
useTreeClass - specifies whether this is a tree structure or a list.
JDPJagg - a handle to an instance of JDPJagg. DSN and CSTR must already be intialized.
pallowMultSel - for lists specifies whether multiple selection is allowed
pselectFields - the database column names to retrieve to load the tree or list
pdisplayFields - the field indexes in pselectFields to order by
fromWhereClause - the from/where clause to use when selecting rows from the table
psortChoiceText - the values for the sort choice pulldown
psortChoice - the actual column names for the sort choice pulldown
pdisplayChoice - the display choice values
pinitChoice - the initial choice for the sort choice pulldown
pdisplayCount - the display a result count flag
countText - the text for the row count
 o JDPSearchResults
 public JDPSearchResults(JDPUser user,
                         JDPJagg jaggSQL,
                         boolean pallowMultSel,
                         String pselectFields,
                         String pfromWhereClause,
                         String psortChoiceText[],
                         String psortChoice[],
                         String pdisplayChoice[],
                         String pinitChoice,
                         boolean pdisplayCount,
                         String countText)
Creates a Search Results panel.

Parameters:
JDPUser - the global user parameter used to pass handles in JDP.
JDPJagg - a handle to an instance of JDPJagg. DSN and CSTR must already be intialized.
pallowMultSel - for lists specifies whether multiple selection is allowed
pselectFields - the database column names to retrieve to load the tree or list
fromWhereClause - the from/where clause to use when selecting rows from the table
psortChoiceText - the values for the sort choice pulldown
psortChoice - the actual column names for the sort choice pulldown
pdisplayChoice - the display choice values
pinitChoice - the initial choice for the sort choice pulldown
pdisplayCount - the display a result count flag
countText - the text for the row count
 o JDPSearchResults
 public JDPSearchResults(JDPUser user)
Creates a Search Results panel.

Parameters:
JDPUser - the global user parameter used to pass handles in JDP.

Methods

 o getTotalEntries
 public int getTotalEntries()
Get the total entries currently displayed.

Returns:
the total entries currently displayed.
 o setBackground
 public void setBackground(Color plistBgColor)
Overrides:
setBackground in class Component
 o getBackground
 public Color getBackground()
Overrides:
getBackground in class Component
 o setForeground
 public void setForeground(Color plistFgColor)
Overrides:
setForeground in class Component
 o getForeground
 public Color getForeground()
Overrides:
getForeground in class Component
 o setFont
 public void setFont(Font thisFont)
Overrides:
setFont in class Component
 o getFont
 public Font getFont()
Overrides:
getFont in class Component
 o setMinWidth
 public void setMinWidth(int width)
Set mimimum width of this panel

Parameters:
width - the new minimum width of this panel
 o getMinWidth
 public int getMinWidth()
Get mimimum width of this panel

Returns:
width the new minimum width of this panel
 o setMinHeight
 public void setMinHeight(int height)
Set mimimum height of this panel

Parameters:
height - the new minimum height of this panel
 o getMinHeight
 public int getMinHeight()
Get mimimum height of this panel

Returns:
width the new minimum height of this panel
 o clearList
 public void clearList()
Clear all the entries from the list or the tree

 o clearList
 public void clearList(String name)
Clear all the entries from the tree and set the root name

Parameters:
name - new root name for the tree
 o resetSelections
 public void resetSelections()
Reset the selections.

 o setFromWhereClause
 public void setFromWhereClause(String clause)
Set the new from/where clause

Parameters:
fromWhereClause - the new from/where clause for the loadList method.
 o setTableKey
 public void setTableKey(String clause)
Set the new table key clause

Parameters:
pselectFields - the new table key clause for the loadList method.
 o setSortChoice
 public void setSortChoice(String sort[])
Set the new sort choice column names

Parameters:
psortChoice - the new sort choice column names for the loadList method.
 o setDisplayChoice
 public void setDisplayChoice(String display[])
Set the new display choice column names

Parameters:
pdisplayChoice - the new display choice column names for the loadList method.
 o setAllowMultSel
 public void setAllowMultSel(boolean pallowMultSel)
Set the multiple selection flag if this is a list and not a tree

Parameters:
pallowMultSel - the new value of the multiple selection flag.
 o getAllowMultSel
 public boolean getAllowMultSel()
Set the multiple selection flag if this is a list and not a tree

Parameters:
pallowMultSel - the new value of the multiple selection flag.
 o setListEvents
 public void setListEvents(boolean listEvents)
Set the the flag to cause tree branch selections to trigger a list selected event. By default this class will only kick an event if the lowest level of a tree branch is selected. Changing this flag allows upper branches to also kick an event.

Parameters:
listEvents - the new value of the list events flag.
 o loadList
 public void loadList()
Load the list or tree using the current settings.

 o setIcons
 public void setIcons(int icons[])
Set the icons for this tree

Parameters:
icons - the icons for the various branch levels of the tree.
 o setIcon
 public void setIcon(int icon)
Set the icon for this list

Parameters:
icon - the icon for the entries in the list.
 o getTreeHandle
 public JDPTreePicker getTreeHandle()
Get the handle to the tree component that is being used by this Result List.

Returns:
the handle to the tree component that is being used by this Result List.
 o getListHandle
 public JDPList getListHandle()
Get the handle to the list component that is being used by this Result List.

Returns:
the handle to the list component that is being used by this Result List.
 o getSelectedIndex
 public int getSelectedIndex()
Get the currently selected index for the list or the tree.

Returns:
the currently selected index for the list or the tree.
 o getSelectedBranch
 public String[] getSelectedBranch()
Get the branch names of the currently selected branch.

Returns:
the branch names of the currently selected branch.
 o setSelectedKey
 public boolean setSelectedKey(String key[])
Select the branch in the Result List based on the key.

Parameters:
the - key of the branch to select.
Returns:
the whether the key was found in the result list.
 o getSelectedKey
 public String[] getSelectedKey()
Get the currently selected database key values for the list or the tree.

Returns:
the currently selected key values for the list or the tree.
 o handleEvent
 public boolean handleEvent(Event e)
Overrides:
handleEvent in class Component