Class CustomChooserComposite

  • All Implemented Interfaces:
    org.eclipse.swt.graphics.Drawable
    Direct Known Subclasses:
    TextCombo

    public abstract class CustomChooserComposite
    extends org.eclipse.swt.widgets.Composite
    CustomChooserComposite
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected ICustomChoice cnvSelection  
      static int DROPDOWN_EVENT
      This event occures when the dropdown is about to show.
      protected int itemHeight  
      static int SELECTION_EVENT
      This event occurs when the selection is set.
      • Fields inherited from class org.eclipse.swt.widgets.Control

        handle
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
        CustomChooserComposite​(org.eclipse.swt.widgets.Composite parent, int style)  
      protected CustomChooserComposite​(org.eclipse.swt.widgets.Composite parent, int style, java.lang.Object choiceValue)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void addListener​(int eventType, org.eclipse.swt.widgets.Listener listener)  
      protected abstract ICustomChoice createChoice​(org.eclipse.swt.widgets.Composite parent, java.lang.Object choiceValue)  
      int getChoiceIndex()  
      java.lang.Object getChoiceValue()
      Returns the current selected choice
      java.lang.Object getItem​(int index)  
      int getItemCount()  
      java.lang.Object[] getItems()  
      protected void initAccessible()  
      boolean isEnabled()  
      void removeListener​(int eventType, org.eclipse.swt.widgets.Listener listener)  
      void select​(int index)  
      void setChoiceValue​(java.lang.Object iValue)
      Sets the value as selected choice, and redraws UI.
      void setEnabled​(boolean bState)  
      void setItems​(java.lang.Object[] items)  
      • Methods inherited from class org.eclipse.swt.widgets.Composite

        changed, 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.Scrollable

        computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
      • Methods inherited from class org.eclipse.swt.widgets.Control

        addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, 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, 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, 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.Widget

        addDisposeListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, reskin, setData, setData
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.eclipse.swt.graphics.Drawable

        isAutoScalable
    • Field Detail

      • SELECTION_EVENT

        public static final int SELECTION_EVENT
        This event occurs when the selection is set.
        See Also:
        Constant Field Values
      • DROPDOWN_EVENT

        public static final int DROPDOWN_EVENT
        This event occures when the dropdown is about to show.
        See Also:
        Constant Field Values
      • itemHeight

        protected int itemHeight
    • Constructor Detail

      • CustomChooserComposite

        public CustomChooserComposite​(org.eclipse.swt.widgets.Composite parent,
                                      int style)
      • CustomChooserComposite

        protected CustomChooserComposite​(org.eclipse.swt.widgets.Composite parent,
                                         int style,
                                         java.lang.Object choiceValue)
    • Method Detail

      • createChoice

        protected abstract ICustomChoice createChoice​(org.eclipse.swt.widgets.Composite parent,
                                                      java.lang.Object choiceValue)
      • setItems

        public void setItems​(java.lang.Object[] items)
      • getItems

        public java.lang.Object[] getItems()
      • getItemCount

        public int getItemCount()
      • getItem

        public java.lang.Object getItem​(int index)
      • setEnabled

        public void setEnabled​(boolean bState)
        Overrides:
        setEnabled in class org.eclipse.swt.widgets.Control
      • isEnabled

        public boolean isEnabled()
        Overrides:
        isEnabled in class org.eclipse.swt.widgets.Control
      • select

        public void select​(int index)
      • getChoiceIndex

        public int getChoiceIndex()
      • getChoiceValue

        public java.lang.Object getChoiceValue()
        Returns the current selected choice
      • setChoiceValue

        public void setChoiceValue​(java.lang.Object iValue)
        Sets the value as selected choice, and redraws UI.
        Parameters:
        iValue - value as selected choice
      • addListener

        public void addListener​(int eventType,
                                org.eclipse.swt.widgets.Listener listener)
        Overrides:
        addListener in class org.eclipse.swt.widgets.Widget
      • removeListener

        public void removeListener​(int eventType,
                                   org.eclipse.swt.widgets.Listener listener)
        Overrides:
        removeListener in class org.eclipse.swt.widgets.Widget
      • initAccessible

        protected void initAccessible()