Class ValueComboChooser
- java.lang.Object
- 
- org.eclipse.swt.widgets.Widget
- 
- org.eclipse.swt.widgets.Control
- 
- org.eclipse.swt.widgets.Scrollable
- 
- org.eclipse.swt.widgets.Composite
- 
- com._1c.g5.v8.dt.common.ui.controls.ValueChooser
- 
- com._1c.g5.v8.dt.common.ui.controls.ValueComboChooser
 
 
 
 
 
 
- 
- All Implemented Interfaces:
- org.eclipse.swt.graphics.Drawable
 
 public class ValueComboChooser extends ValueChooser Extension ofValueChoosercomponent which includes combo-box behavior (drop-down list) along with standard ActionBar action button decorated with combo dropdown arrow.
 The component allows to add other custom actions to the control expanding its capabilities.
 The implementation is based on theCCombocode base, with the list is being replaced with the native SWT table. TODO documentation with samples TODO full support of parent scrollable components - now there is some minor glitch in this.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static interfaceValueComboChooser.CommitListener
 - 
Field SummaryFields Modifier and Type Field Description static StringCOMBO_BUTTON_IDCombo button identifier used to distinguish actions activated via action bar of the component.
 - 
Constructor SummaryConstructors Constructor Description ValueComboChooser(org.eclipse.swt.widgets.Composite parent, org.eclipse.ui.forms.widgets.FormToolkit toolkit, int maxDecorationWidth, int style)Creates a new instance of the combo chooser.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(org.eclipse.swt.graphics.Image image, String value)Adds a new element to the combo.voidaddCommitListener(ValueComboChooser.CommitListener commitListener)voidclearSelection()Clears selection from the text in the content area and popup.voiddeselectAll()Removes selected element from the content area.voiddropDown(boolean drop)Drops the popup down.IActionBarItemgetArrowButton()intgetItemCount()Gets the number of items in the combo.intgetSelectionIndex()Gets the index of the current selection in the control.voidremove(int index)Removes element from the combo.voidremoveAll()Clears all elements from the combo.voidremoveCommitListener(ValueComboChooser.CommitListener commitListener)voidreplace(int index, org.eclipse.swt.graphics.Image image, String value)Replace element from the combo.voidselect(int index)Selects element of the combo.- 
Methods inherited from class com._1c.g5.v8.dt.common.ui.controls.ValueChooseraddActionBarListener, addButton, addDisposeListener, addFocusListener, addListener, addModifyListener, addSpinner, addTraverseListener, addVerifyListener, dispose, getActionBarItems, getImage, getSelection, getSelectionCount, getStyledText, getText, isEditable, removeActionBarListener, removeModifyListener, removeVerifyListener, selectAll, setEditable, setImage, setMultiLine, setSelection, setSelection, setText, setVisibleLineCount
 - 
Methods inherited from class org.eclipse.swt.widgets.Compositechanged, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList, toString
 - 
Methods inherited from class org.eclipse.swt.widgets.ScrollablecomputeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
 - 
Methods inherited from class org.eclipse.swt.widgets.ControladdControlListener, addDragDetectListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
 - 
Methods inherited from class org.eclipse.swt.widgets.WidgetcheckWidget, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData
 
- 
 
- 
- 
- 
Field Detail- 
COMBO_BUTTON_IDpublic static final String COMBO_BUTTON_ID Combo button identifier used to distinguish actions activated via action bar of the component.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
ValueComboChooserpublic ValueComboChooser(org.eclipse.swt.widgets.Composite parent, org.eclipse.ui.forms.widgets.FormToolkit toolkit, int maxDecorationWidth, int style)Creates a new instance of the combo chooser.- Parameters:
- parent- Parent widget for the chooser.
- toolkit- Form toolkit reference.
- maxDecorationWidth- Max width of the decoration in content area.
- style- The styling of the widget.
 
 
- 
 - 
Method Detail- 
addCommitListenerpublic void addCommitListener(ValueComboChooser.CommitListener commitListener) 
 - 
removeCommitListenerpublic void removeCommitListener(ValueComboChooser.CommitListener commitListener) 
 - 
addpublic void add(org.eclipse.swt.graphics.Image image, String value)Adds a new element to the combo.- Parameters:
- image- The decorating image to add as a part of the element (optional).
- value- The text value of the item (mandatory)
 
 - 
replacepublic void replace(int index, org.eclipse.swt.graphics.Image image, String value)Replace element from the combo.- Parameters:
- index- Index of the element to replace
- image- The decorating image a part of the element (optional).
- value- The text value of the item (mandatory)
 
 - 
clearSelectionpublic void clearSelection() Clears selection from the text in the content area and popup.- Overrides:
- clearSelectionin class- ValueChooser
 
 - 
deselectAllpublic void deselectAll() Removes selected element from the content area.
 - 
getArrowButtonpublic IActionBarItem getArrowButton() - Returns:
- arrow button associated with this value combo chooser.
 
 - 
getItemCountpublic int getItemCount() Gets the number of items in the combo.- Returns:
- The number of items.
 
 - 
getSelectionIndexpublic int getSelectionIndex() Gets the index of the current selection in the control.- Returns:
- The index of the selection.
 
 - 
removepublic void remove(int index) Removes element from the combo.- Parameters:
- index- Index of the element to remove.
 
 - 
removeAllpublic void removeAll() Clears all elements from the combo.
 - 
selectpublic void select(int index) Selects element of the combo.- Parameters:
- index- Index of the selection.
 
 - 
dropDownpublic void dropDown(boolean drop) Drops the popup down.- Parameters:
- drop- True if the popup should be dropped down; false if it should be collapsed.
 
 
- 
 
-