|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
net.sf.ecl.datepicker.AbstractCombo
public abstract class AbstractCombo
is an abstract implementation of a custom SWT combo. The class groups together an editor and drop-down control and manages their common lifecycle. The control was maid as native as possible. Unfortunately, it is not possible to make it look like native OS X drop-down combos yet.
SelectionListener
| Field Summary |
|---|
| Fields inherited from class org.eclipse.swt.widgets.Control |
|---|
handle |
| Constructor Summary | |
|---|---|
protected |
AbstractCombo(Composite parent,
int style)
creates an instance of the combo with the given parent widget and style. |
| Method Summary | |
|---|---|
void |
addSelectionListener(SelectionListener listener)
adds a selection listener to the control. |
Point |
computeSize(int wHint,
int hHint,
boolean changed)
|
protected abstract Control |
createInput(Composite parent,
int style)
creates an input widget. |
protected abstract Control |
createPopup(Composite parent,
int style)
creates a control placed into combo's drop-down. |
void |
dispose()
|
protected abstract void |
handlePopupHiding()
notification of popup hiding. |
protected abstract void |
handlePopupShowing()
notification of popup appearance. |
protected void |
hidePopup()
hides the combo's popup. |
void |
layout(boolean changed)
|
void |
removeSelectionListener(SelectionListener listener)
removes selection listener to the control. |
void |
setBackground(Color color)
|
void |
setEnabled(boolean enabled)
|
void |
setFont(Font font)
|
void |
setForeground(Color color)
|
void |
setToolTipText(String toolTip)
|
protected void |
showPopup()
shows the combo's drop-down popup. |
| Methods inherited from class org.eclipse.swt.widgets.Composite |
|---|
changed, checkSubclass, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList |
| Methods inherited from class org.eclipse.swt.widgets.Scrollable |
|---|
computeTrim, getClientArea, getHorizontalBar, getVerticalBar |
| Methods inherited from class org.eclipse.swt.widgets.Widget |
|---|
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractCombo(Composite parent,
int style)
parent - the parent widget.style - the style.| Method Detail |
|---|
public final void addSelectionListener(SelectionListener listener)
listener - the listener.
public final Point computeSize(int wHint,
int hHint,
boolean changed)
computeSize in class Compositepublic final void dispose()
dispose in class Widgetpublic final void layout(boolean changed)
layout in class Compositepublic final void removeSelectionListener(SelectionListener listener)
listener - the listener.public final void setBackground(Color color)
setBackground in class Controlpublic void setEnabled(boolean enabled)
setEnabled in class Controlpublic final void setFont(Font font)
setFont in class Controlpublic final void setForeground(Color color)
setForeground in class Controlpublic final void setToolTipText(String toolTip)
setToolTipText in class Control
protected abstract Control createInput(Composite parent,
int style)
parent - the input widget's parent.style - the style for input widget. The style is derived from the
composite's style.
protected abstract Control createPopup(Composite parent,
int style)
parent - the parent control.style - the style derived from the style of the combo.
protected abstract void handlePopupHiding()
protected abstract void handlePopupShowing()
protected final void hidePopup()
protected final void showPopup()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||