Enterprise Information Portal APIs

com.ibm.mm.beans.gui
Class CMBSearchTemplateList

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--com.ibm.mm.beans.gui.CMBSearchTemplateList
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class CMBSearchTemplateList
extends javax.swing.JComponent

The CMBSearchTemplateList displays the list of available search templates. One search template can be selected from the list (single select).

View Styles

The style property allows the developer to select among different looks for the CMBSearchTemplateList:

Selecting a template

When template name is selected from the list, the CMBSearchTemplateListener will fire a CMBSearchTemplateSelectedEvent to its listeners.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
static int DROP_DOWN
          Displayed as a drop-down combo box (non-editable)
static int IMAGE
          Displayed with a "tabbed" appearance; the "tab" background is an image, and the template name is drawn on top of the image.
static int SIMPLE
          Displayed as a simple JList
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CMBSearchTemplateList()
          Constructor for the CMBSearchTemplateList.
 
Method Summary
 void addHelpListener(CMBHelpListener listener)
          Add the specified listener, which will receive CMBHelpEvents from the CMBSearchTemplateList
 void addTemplateActionListener(CMBTemplateActionListener listener)
          Add the specified listener, which will receive CMBTemplateActionEvents from the CMBSearchTemplateList
 void addTemplatePopupListener(CMBTemplatePopupListener listener)
          Add the specified listener, which will receive CMBTemplatePopupEvents from the CMBSearchTemplateList
 void addTemplateSelectedListener(CMBTemplateSelectedListener listener)
          Add the specified listener, which will receive CMBTemplateSelectedEvents from the CMBSearchTemplateList
 int getCollationStrength()
          Get the exactness of comparisons when sorting template names in the list
 CMBConnection getConnection()
          Get the connection object for the CMBSearchTemplateList
 java.awt.Component getNextFocusableComponent()
           
 java.awt.Dimension getPreferredSize()
          Overrides the getPreferredSize function
 java.net.URL getSelectedImage()
          Get the image background for selected tabs in CMBSearchTemplateList.
 CMBSearchTemplate getSelectedTemplate()
          Get the currently selected template
 int getSelectedTemplateIndex()
          Get the index of the selected template
 int getStyle()
          Get the currently selected display style for the CMBSearchTemplateList
 int getTemplateIndex(java.lang.String templateName)
          Get the index of the template with the given name
 java.net.URL getUnselectedImage()
          Get the image background for unselected tabs in CMBSearchTemplateList.
 int getXBaseline()
          Get the x-position at which to begin drawing text over a tab image.
 int getYBaseline()
          Get the y-position at which to begin drawing text over a tab image.
 boolean isFocusTraversable()
           
 void refresh()
          Retrieve the list of templates and display them
 void removeHelpListener(CMBHelpListener listener)
          Remove the specified listener so it will no longer receive CMBHelpEvents from the CMBSearchTemplateList
 void removeTemplateActionListener(CMBTemplateActionListener listener)
          Remove the specified listener so it will no longer receive CMBTemplateActionEvents from the CMBSearchTemplateList
 void removeTemplatePopupListener(CMBTemplatePopupListener listener)
          Remove the specified listener so it will no longer receive CMBTemplatePopupEvents from the CMBSearchTemplateList
 void removeTemplateSelectedListener(CMBTemplateSelectedListener listener)
          Remove the specified listener so it will no longer receive CMBTemplateSelectedEvents from the CMBSearchTemplateList
 void setBackground(java.awt.Color newColor)
          Set the background color of the text in the CMBSearchTemplateList.
 void setCollationStrength(int newStrength)
          Set the exactness of comparisons when sorting template names in the list
 void setConnection(CMBConnection newConn)
          Set the connection object for the CMBSearchTemplateList
 void setCursor(java.awt.Cursor newCursor)
          Overridden to set cursor of contained controls
 void setEnabled(boolean newEnable)
          Overridden to enable/disable contained controls
 void setFont(java.awt.Font newFont)
          Set the font of the text in the CMBSearchTemplateList.
 void setForeground(java.awt.Color newColor)
          Set the foreground color of the text in the CMBSearchTemplateList.
 void setLayout(java.awt.LayoutManager mgr)
          Overridden to disable changing of the layout manager.
 void setOpaque(boolean newOpaque)
          Overridden to set opaque on contained controls
 void setSelectedImage(java.net.URL newImage)
          Set the image background for selected tabs in CMBSearchTemplateList.
 void setSelectedTemplate(CMBSearchTemplate newTemplate)
          Set the currently selected template
 void setSelectedTemplateIndex(int newIndex)
          Set the selected template by index
 void setStyle(int newStyle)
          Set the currently selected display style for the CMBSearchTemplateList.
 void setToolTipText(java.lang.String newTooltip)
          Overridden to set tooltip text on contained controls
 void setUnselectedImage(java.net.URL newImage)
          Set the image background for unselected tabs in CMBSearchTemplateList.
 void setXBaseline(int newBaseline)
          Set the x-position at which to begin drawing text over a tab image.
 void setYBaseline(int newBaseline)
          Set the y-position at which to begin drawing text over a tab image.
 void updateUI()
           
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SIMPLE

public static int SIMPLE
Displayed as a simple JList

DROP_DOWN

public static int DROP_DOWN
Displayed as a drop-down combo box (non-editable)

IMAGE

public static int IMAGE
Displayed with a "tabbed" appearance; the "tab" background is an image, and the template name is drawn on top of the image.
Constructor Detail

CMBSearchTemplateList

public CMBSearchTemplateList()
Constructor for the CMBSearchTemplateList.
Method Detail

getConnection

public CMBConnection getConnection()
Get the connection object for the CMBSearchTemplateList

setConnection

public void setConnection(CMBConnection newConn)
Set the connection object for the CMBSearchTemplateList

getSelectedTemplate

public CMBSearchTemplate getSelectedTemplate()
Get the currently selected template

setSelectedTemplate

public void setSelectedTemplate(CMBSearchTemplate newTemplate)
Set the currently selected template

getStyle

public int getStyle()
Get the currently selected display style for the CMBSearchTemplateList

setStyle

public void setStyle(int newStyle)
Set the currently selected display style for the CMBSearchTemplateList. Must be one of the following values:

getSelectedImage

public java.net.URL getSelectedImage()
Get the image background for selected tabs in CMBSearchTemplateList. This is only used when the list style is IMAGE.

setSelectedImage

public void setSelectedImage(java.net.URL newImage)
Set the image background for selected tabs in CMBSearchTemplateList. This is only used when the list style is IMAGE.

getUnselectedImage

public java.net.URL getUnselectedImage()
Get the image background for unselected tabs in CMBSearchTemplateList. This is only used when the list style is IMAGE.

setUnselectedImage

public void setUnselectedImage(java.net.URL newImage)
Set the image background for unselected tabs in CMBSearchTemplateList. This is only used when the list style is IMAGE.

getXBaseline

public int getXBaseline()
Get the x-position at which to begin drawing text over a tab image. This is only used when the list style is IMAGE.

setXBaseline

public void setXBaseline(int newBaseline)
Set the x-position at which to begin drawing text over a tab image. This is only used when the list style is IMAGE.

getYBaseline

public int getYBaseline()
Get the y-position at which to begin drawing text over a tab image. This is only used when the list style is IMAGE.

setYBaseline

public void setYBaseline(int newBaseline)
Set the y-position at which to begin drawing text over a tab image. This is only used when the list style is IMAGE.

getSelectedTemplateIndex

public int getSelectedTemplateIndex()
Get the index of the selected template

setSelectedTemplateIndex

public void setSelectedTemplateIndex(int newIndex)
Set the selected template by index

getCollationStrength

public int getCollationStrength()
Get the exactness of comparisons when sorting template names in the list

setCollationStrength

public void setCollationStrength(int newStrength)
Set the exactness of comparisons when sorting template names in the list

setBackground

public void setBackground(java.awt.Color newColor)
Set the background color of the text in the CMBSearchTemplateList.
Overrides:
setBackground in class javax.swing.JComponent

setForeground

public void setForeground(java.awt.Color newColor)
Set the foreground color of the text in the CMBSearchTemplateList.
Overrides:
setForeground in class javax.swing.JComponent

setFont

public void setFont(java.awt.Font newFont)
Set the font of the text in the CMBSearchTemplateList.
Overrides:
setFont in class javax.swing.JComponent

setCursor

public void setCursor(java.awt.Cursor newCursor)
Overridden to set cursor of contained controls
Overrides:
setCursor in class java.awt.Component

setOpaque

public void setOpaque(boolean newOpaque)
Overridden to set opaque on contained controls
Overrides:
setOpaque in class javax.swing.JComponent

setToolTipText

public void setToolTipText(java.lang.String newTooltip)
Overridden to set tooltip text on contained controls
Overrides:
setToolTipText in class javax.swing.JComponent

setEnabled

public void setEnabled(boolean newEnable)
Overridden to enable/disable contained controls
Overrides:
setEnabled in class javax.swing.JComponent

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides the getPreferredSize function
Overrides:
getPreferredSize in class javax.swing.JComponent

isFocusTraversable

public boolean isFocusTraversable()
Overrides:
isFocusTraversable in class javax.swing.JComponent

updateUI

public void updateUI()
Overrides:
updateUI in class javax.swing.JComponent

getNextFocusableComponent

public java.awt.Component getNextFocusableComponent()
Overrides:
getNextFocusableComponent in class javax.swing.JComponent

setLayout

public void setLayout(java.awt.LayoutManager mgr)
Overridden to disable changing of the layout manager.
Overrides:
setLayout in class java.awt.Container

refresh

public void refresh()
Retrieve the list of templates and display them

getTemplateIndex

public int getTemplateIndex(java.lang.String templateName)
Get the index of the template with the given name

addTemplateSelectedListener

public void addTemplateSelectedListener(CMBTemplateSelectedListener listener)
Add the specified listener, which will receive CMBTemplateSelectedEvents from the CMBSearchTemplateList

removeTemplateSelectedListener

public void removeTemplateSelectedListener(CMBTemplateSelectedListener listener)
Remove the specified listener so it will no longer receive CMBTemplateSelectedEvents from the CMBSearchTemplateList

addTemplatePopupListener

public void addTemplatePopupListener(CMBTemplatePopupListener listener)
Add the specified listener, which will receive CMBTemplatePopupEvents from the CMBSearchTemplateList

removeTemplatePopupListener

public void removeTemplatePopupListener(CMBTemplatePopupListener listener)
Remove the specified listener so it will no longer receive CMBTemplatePopupEvents from the CMBSearchTemplateList

addTemplateActionListener

public void addTemplateActionListener(CMBTemplateActionListener listener)
Add the specified listener, which will receive CMBTemplateActionEvents from the CMBSearchTemplateList

removeTemplateActionListener

public void removeTemplateActionListener(CMBTemplateActionListener listener)
Remove the specified listener so it will no longer receive CMBTemplateActionEvents from the CMBSearchTemplateList

addHelpListener

public void addHelpListener(CMBHelpListener listener)
Add the specified listener, which will receive CMBHelpEvents from the CMBSearchTemplateList

removeHelpListener

public void removeHelpListener(CMBHelpListener listener)
Remove the specified listener so it will no longer receive CMBHelpEvents from the CMBSearchTemplateList

EIP JavaBeans

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.