public class TComboBox extends javax.swing.JComboBox implements TView
javax.swing.JComboBox.AccessibleJComboBox, javax.swing.JComboBox.KeySelectionManager
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected boolean |
locked |
actionCommand, dataModel, editor, isEditable, keySelectionManager, lightWeightPopupEnabled, maximumRowCount, renderer, selectedItemReminder
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
TComboBox()
Creates a
TComBox instance with a default
data box created inside the initialization. |
TComboBox(TDataBox box)
Creates a
TComBox instance with a given data box. |
Modifier and Type | Method and Description |
---|---|
void |
addVisibleFilter(VisibleFilter visibleFilter)
Add the given visible filter onto this combobox.
|
void |
cleanDirtyState()
Calls this method to force this combobox to publish data.
|
void |
doLayout() |
TComboBoxRenderer |
getCellRenderer()
Gets the cellRenderer of the combobox.
|
TDataBox |
getDataBox()
Gets the connected data box.
|
Element |
getElementByRowIndex(int rowIndex)
Gets the element at the specified row index.
|
Generator |
getElementIconGenerator()
Gets the elementIconGenerator of the combobox.
|
Generator |
getElementLabelGenerator()
Gets the elementLabelGenerator of the combobox .
|
Generator |
getElementToolTipTextGenerator()
Gets the elementToolTipTextGenerator of the combobox.
|
int |
getRowIndexByElement(Element element)
Gets the row of the specified element.
|
java.awt.Dimension |
getSize() |
java.util.Comparator |
getSortComparator()
Gets the sortComparator of the combobox.
|
java.util.List |
getVisibleFilters()
Gets the visibleFilters of the combobox.
|
boolean |
isCenterAlignment()
Checks whether the cell renderer is center alignment.
|
boolean |
isIconVisible()
Gets whether the icon is visible.
|
boolean |
isLazyPublishMode()
Determines whether this combobox uses lazy publish mode.
|
boolean |
isLocked()
Gets whether the combobox is locked.
|
boolean |
isPopupPreferredSizeWidth()
Gets whether the width of the pop-up panel size is the width of the preferredSize.
|
boolean |
isVisible(Element element)
Gets whether the element is visible.
|
void |
lock()
Locks this combobox from publishing data.
|
void |
paint(java.awt.Graphics g) |
void |
publishData()
publish elements in connected data box.
|
void |
removeVisibleFilter(VisibleFilter visibleFilter)
Remove the given visible filter from this combobox.
|
void |
setCellRenderer(javax.swing.ListCellRenderer cellRenderer)
Sets the new cellRenderer for the combobox.
|
void |
setCenterAlignment(boolean isCenterAlignment)
Sets whether the cell renderer should be center alignment.
|
void |
setDataBox(TDataBox dataBox)
Sets a new connected data box for the combobox.
|
void |
setElementIconGenerator(Generator elementIconGenerator)
Sets a new elementIconGenerator for the combobox.
|
void |
setElementLabelGenerator(Generator elementLabelGenerator)
Sets a new elementLabelGenerator for the combobox.
|
void |
setElementToolTipTextGenerator(Generator elementToolTipTextGenerator)
Sets the elementToolTipTextGenerator for the combobox.
|
void |
setIconVisible(boolean iconVisible)
Sets whether the icon should be visible.
|
void |
setLazyPublishMode(boolean lazyPublishMode)
Sets whether this combobox uses lazy publish mode.
|
void |
setPopupPreferredSizeWidth(boolean popupPreferredSizeWith)
Sets whether the width of the pop-up panel size should be the width of the preferredSize.
|
void |
setSortComparator(java.util.Comparator sortComparator)
Sets the sortComparator for the combobox.
|
void |
unlock()
Unlocks the combobox for republish data.
|
void |
updateTViewUI()
Uses the method to update TView's UI.
|
void |
updateUI() |
actionPerformed, actionPropertyChanged, addActionListener, addItem, addItemListener, addPopupMenuListener, configureEditor, configurePropertiesFromAction, contentsChanged, createActionPropertyChangeListener, createDefaultKeySelectionManager, fireActionEvent, fireItemStateChanged, firePopupMenuCanceled, firePopupMenuWillBecomeInvisible, firePopupMenuWillBecomeVisible, getAccessibleContext, getAction, getActionCommand, getActionListeners, getEditor, getItemAt, getItemCount, getItemListeners, getKeySelectionManager, getMaximumRowCount, getModel, getPopupMenuListeners, getPrototypeDisplayValue, getRenderer, getSelectedIndex, getSelectedItem, getSelectedObjects, getUI, getUIClassID, hidePopup, insertItemAt, installAncestorListener, intervalAdded, intervalRemoved, isEditable, isLightWeightPopupEnabled, isPopupVisible, paramString, processKeyEvent, removeActionListener, removeAllItems, removeItem, removeItemAt, removeItemListener, removePopupMenuListener, selectedItemChanged, selectWithKeyChar, setAction, setActionCommand, setEditable, setEditor, setEnabled, setKeySelectionManager, setLightWeightPopupEnabled, setMaximumRowCount, setModel, setPopupVisible, setPrototypeDisplayValue, setRenderer, setSelectedIndex, setSelectedItem, setUI, showPopup
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public TComboBox()
TComBox
instance with a default
data box created inside the initialization.public TComboBox(TDataBox box)
TComBox
instance with a given data box.box
- the connected data box.public Element getElementByRowIndex(int rowIndex)
rowIndex
- the specified row index.public int getRowIndexByElement(Element element)
element
- the specified element.public void lock()
unlock()
public boolean isLocked()
public void unlock()
lock()
public void cleanDirtyState()
setLazyPublishMode(boolean)
public TDataBox getDataBox()
getDataBox
in interface TView
TView.setDataBox(twaver.TDataBox)
public void setDataBox(TDataBox dataBox)
setDataBox
in interface TView
dataBox
- TDataBox the databox of this viewTView.getDataBox()
public void updateTViewUI()
TView
updateTViewUI
in interface TView
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
public void publishData()
public boolean isVisible(Element element)
element
- public void updateUI()
updateUI
in class javax.swing.JComboBox
public boolean isIconVisible()
setIconVisible(boolean)
public void setIconVisible(boolean iconVisible)
iconVisible
- if true the icon should be visible, false otherwise.isIconVisible()
public Generator getElementLabelGenerator()
setElementLabelGenerator(Generator)
public void setElementLabelGenerator(Generator elementLabelGenerator)
elementLabelGenerator
- a new elementLabelGenerator for the combobox.getElementLabelGenerator()
public Generator getElementToolTipTextGenerator()
setElementToolTipTextGenerator(Generator)
public void setElementToolTipTextGenerator(Generator elementToolTipTextGenerator)
elementToolTipTextGenerator
- the elementToolTipTextGenerator for the combobox.getElementToolTipTextGenerator()
public Generator getElementIconGenerator()
setElementIconGenerator(Generator)
public void setElementIconGenerator(Generator elementIconGenerator)
elementIconGenerator
- a new elementIconGenerator for the combobox.getElementIconGenerator()
public TComboBoxRenderer getCellRenderer()
setCellRenderer(ListCellRenderer)
public void setCellRenderer(javax.swing.ListCellRenderer cellRenderer)
cellRenderer
- the new cellRenderer for the combobox.getCellRenderer()
public boolean isLazyPublishMode()
setLazyPublishMode(boolean)
public void setLazyPublishMode(boolean lazyPublishMode)
lazyPublishMode
- if true the combobox uses lazy publish mode, false otherwise.isLazyPublishMode()
public java.util.Comparator getSortComparator()
setSortComparator(Comparator)
public void setSortComparator(java.util.Comparator sortComparator)
sortComparator
- the sortComparator for the combobox.getSortComparator()
public java.util.List getVisibleFilters()
public void removeVisibleFilter(VisibleFilter visibleFilter)
visibleFilter
- the visible filter to be removed.addVisibleFilter(VisibleFilter)
public void addVisibleFilter(VisibleFilter visibleFilter)
visibleFilter
- the visible filter to be added.removeVisibleFilter(VisibleFilter)
public boolean isCenterAlignment()
setCenterAlignment(boolean)
public void setCenterAlignment(boolean isCenterAlignment)
isCenterAlignment
- if true the cell renderer should be center alignment, false otherwise.isCenterAlignment()
public void doLayout()
doLayout
in class java.awt.Container
public java.awt.Dimension getSize()
getSize
in class java.awt.Component
public boolean isPopupPreferredSizeWidth()
setPopupPreferredSizeWidth(boolean)
public void setPopupPreferredSizeWidth(boolean popupPreferredSizeWith)
popupPreferredSizeWith
- if true the width of the pop-up panel size should be the width of the preferredSize, false otherwiseisPopupPreferredSizeWidth()
Copyright © 2002 - 2010 Serva Software. All Rights Reserved.