|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Window
|
+--java.awt.Dialog
|
+--javax.swing.JDialog
|
+--com.ca.commons.cbutil.CBDialog
|
+--com.ca.directory.jxplorer.search.SearchGUI
This class creates a dialog that has currently three tabs on it. The first one is for creating or building filters, the second on is for joining already created filters and the third one allows the user to enter or paste in a text filter. This class acts as a a controller between the view (build, join & text tabs) and the model (SearchModel) as well as being a part of the view itself.
This class, in brief, sets up a search dialog that can be used to build, load, view, edit, join or save filters aswell as search an LDAP directory with the filter that the user has created.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JDialog |
javax.swing.JDialog.AccessibleJDialog |
| Nested classes inherited from class java.awt.Dialog |
java.awt.Dialog.AccessibleAWTDialog |
| Nested classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
protected javax.swing.JTabbedPane |
tabbedPane
|
| Fields inherited from class com.ca.commons.cbutil.CBDialog |
buttonPanel, Cancel, display, Help, OK, owner |
| Fields inherited from class javax.swing.JDialog |
accessibleContext, rootPane, rootPaneCheckingEnabled |
| 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 | |
SearchGUI(DN baseDN,
JXplorer jxplorer)
Contructor that sets up the display and initiates the main search objects: SearchModel, BuildFilterPanel, JoinFilterPanel and TextFilterPanel. |
|
| Method Summary | |
void |
doOK()
Sets the search Alias Behaviour in the property file, gets the filter and executes the search & display before closing the window. |
protected void |
edit(int row)
Displays the filter(s) corresponding to the edit button that the user has selected. |
CBPanel |
getButtonPanel()
Returns a panel with four buttons on it: More, Less, Save & View. |
protected javax.swing.JButton |
getEditButton()
Returns an edit button, i.e. a button labelled "Edit", has a dimension of 55x21, has a tooltip "Edit this filter |
protected java.lang.String |
getLDAPFilter()
Returns the LDAP filter of the currently displayed tabbed pane. |
CBPanel |
getMainPanel(DN baseDN)
Sets up a panel with the components which display the name of the filter, the base DN, aliase prefs, search level prefs and the button panel. |
protected boolean |
isFilterValid()
Does a check to see if the filter is valid i.e. it check if there is a value in each of the combo boxes. |
protected void |
load(java.lang.String name)
Gets the values of the base dn, search level, return attributes and alias state from the property file that pertain to the filter being loaded and sets these values in the GUI. |
protected void |
loadBuild()
Displays a JOptionPane message which has a combo box containing all the possible filters that can be loaded into the build display. |
protected void |
loadJoin()
Displays a JOptionPane message which has a combo box containing all the possible filters that can be loaded into the join display. |
protected void |
loadText()
Displays a JOptionPane message which has a combo box containing all the possible filters that can be loaded into the text display. |
protected boolean |
recursiveFilterCheck(java.lang.String filterName,
java.lang.String filter)
Checks if the user is trying to save a copy of the filter into itself, for example if a filter named t3 contains the filter t3 as part of a join. |
protected boolean |
recursiveFilterCheck(java.lang.String filterName,
java.lang.String filter,
java.lang.String type)
Checks if the user is trying to save a copy of the filter into itself, for example if a filter named t3 contains the filter t3 as part of a join. |
protected void |
save()
Save the filter to the property file 'search_filter.txt". |
protected void |
save(java.lang.String name)
Saves the base DN, return attribute list name, the search level and the alias state to the property file so they can be loaded similar to the filter. |
void |
setAliasOptions()
Determines which search alias behaviour the user has selected in the search GUI. |
protected void |
setButtons(boolean state)
Enables or disables the More, Less and View buttons. |
protected void |
setNumberOfRows(int rows)
Currently used by the loadJoin() and edit() methods to prompt the JoinFilterPanel class to either add or remove rows. |
protected void |
showDialog(java.lang.String title,
java.lang.String filter)
Displays a JOptionPane message with a text area containing the current filter. |
protected void |
showMessage(java.lang.String message,
java.lang.String title)
Displays a information message dialog with the text that is supplied and titles the dialog with the title supplied. |
| Methods inherited from class com.ca.commons.cbutil.CBDialog |
add, addln, doCancel, escKeyCheck, getDisplayPanel, makeHeavy, makeLight, makeWide, quit, setHelpLink, wasCancelled |
| Methods inherited from class javax.swing.JDialog |
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
| Methods inherited from class java.awt.Dialog |
addNotify, dispose, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show |
| Methods inherited from class java.awt.Window |
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, toBack, toFront |
| Methods inherited from class java.awt.Container |
add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected javax.swing.JTabbedPane tabbedPane
| Constructor Detail |
public SearchGUI(DN baseDN,
JXplorer jxplorer)
baseDN - the DN of the currently selected entry (i.e. unless changed is where the search will be conducted from).jxplorer - JXplorer.| Method Detail |
public CBPanel getMainPanel(DN baseDN)
baseDN - the Distinguished Name where the searching is done from. This is added to a text field on this panel.
public CBPanel getButtonPanel()
protected void setButtons(boolean state)
protected void showDialog(java.lang.String title,
java.lang.String filter)
title - the heading of the dialog that appears in the title bar.filter - the current LDAP filter (or any string to be displayed).protected javax.swing.JButton getEditButton()
protected void edit(int row)
row - the row number that the filter name is to be taken from.protected void setNumberOfRows(int rows)
rows - the number of rows that need to be added.protected void save()
protected void save(java.lang.String name)
name - the name of the filter, will be used in the key (e.g. name.baseDN=whatever).protected void loadBuild()
protected void loadJoin()
protected void loadText()
protected void load(java.lang.String name)
name - the name of the filter that is being loaded.protected boolean isFilterValid()
protected java.lang.String getLDAPFilter()
protected void showMessage(java.lang.String message,
java.lang.String title)
message - the text to be displayed.title - the title of this information message dialog.public void doOK()
doOK in class CBDialogpublic void setAliasOptions()
always - both alias check boxes are checked.
never - neither alias check boxes are checked.
finding - only the 'Resolve aliases when finding base object' check box is checked.
searching - only the 'Resolve aliases while searching' check box is checked.
protected boolean recursiveFilterCheck(java.lang.String filterName,
java.lang.String filter,
java.lang.String type)
filterName - the user specified name for the filter that is currently being saved.filter - the value of the filter for example 'JXFilter.t1JXFilter.t1'.type - the source of the filter being constructed for example: view, save or search (used in the info dialog).
protected boolean recursiveFilterCheck(java.lang.String filterName,
java.lang.String filter)
filterName - the user specified name for the filter that is currently being saved.filter - the value of the filter for example 'JXFilter.t1JXFilter.t1'.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||