|
|||||||||
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
org.eclipse.swt.nebula.widgets.cdatetime.AbstractCombo
public abstract class AbstractCombo
The AbstractCombo is an abstract class which provides the basic functionality for a button with a DROP_DOWN, or "popup", shell component. When the user selects the button the shell is set visible and the SWT Components which have been placed on the "content" Composite will be shown.
Field Summary | |
---|---|
static boolean |
carbon
true if the platform is carbon, false otherwise |
static boolean |
gtk
true if the platform is gtk, false otherwise |
static boolean |
win32
true if the platform is win32, false otherwise |
Fields inherited from class org.eclipse.swt.widgets.Composite |
---|
embeddedHandle |
Fields inherited from class org.eclipse.swt.widgets.Widget |
---|
handle |
Constructor Summary | |
---|---|
AbstractCombo(org.eclipse.swt.widgets.Composite parent,
int style)
|
Method Summary | |
---|---|
void |
addModifyListener(org.eclipse.swt.events.ModifyListener listener)
Adds the listener to the collection of listeners who will be notified when the receiver's text is modified, by sending it one of the messages defined in the ModifyListener
interface. |
void |
addTraverseListener(org.eclipse.swt.events.TraverseListener listener)
|
org.eclipse.swt.widgets.Menu |
getMenu()
returns the menu for the Text widget of this DropCombo |
int |
getStyle()
|
java.lang.String |
getText()
|
boolean |
isOpen()
returns the state of the popup shell's visibility |
void |
removeModifyListener(org.eclipse.swt.events.ModifyListener listener)
Removes the listener from the collection of listeners who will be notified when the receiver's text is modified. |
void |
removeTraverseListener(org.eclipse.swt.events.TraverseListener listener)
|
void |
setButtonVisibility(int visibility)
Set the visibility style of the drop button. |
void |
setButtonVisible(boolean visible)
Set the visible state of the button |
void |
setEditable(boolean editable)
|
void |
setEnabled(boolean enabled)
|
boolean |
setFocus()
|
void |
setFont(org.eclipse.swt.graphics.Font font)
|
void |
setHoldOpen(boolean holdOpen)
if holdOpen is true, the popup shell will not close regardless of events and/or calls to popUp(false) until holdOpen is first set false |
void |
setMenu(org.eclipse.swt.widgets.Menu menu)
Sets the menu for the Text widget of this DropCombo |
void |
setOpen(boolean open)
If pop is true, then opens the popup shell (sets to visible) If pop is false, closes the popup shell (sets to not visible) If content == null this method simply returns.If popup == null then popup will be created. |
void |
setRedraw(boolean redraw)
|
void |
setStretch(boolean stretch)
If stretch is false, then the width of the popup will be set to its preferred width (via computeSize(SWT.DEFAULT, SWT.DEFAULT)) |
Methods inherited from class org.eclipse.swt.widgets.Composite |
---|
changed, computeSize, getBackgroundMode, getChildren, getClientArea, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setLayout, setLayoutDeferred, setTabList |
Methods inherited from class org.eclipse.swt.widgets.Scrollable |
---|
computeTrim, getBorderWidth, getHorizontalBar, getVerticalBar |
Methods inherited from class org.eclipse.swt.widgets.Control |
---|
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, computeSize, forceFocus, getAccessible, getBackground, getBackgroundImage, getBounds, getCursor, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setForeground, setLayoutData, setLocation, setLocation, setParent, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update |
Methods inherited from class org.eclipse.swt.widgets.Widget |
---|
addDisposeListener, addListener, dispose, getData, getData, getDisplay, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, setData, setData, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final boolean carbon
public static final boolean gtk
public static final boolean win32
Constructor Detail |
---|
public AbstractCombo(org.eclipse.swt.widgets.Composite parent, int style)
Method Detail |
---|
public void addModifyListener(org.eclipse.swt.events.ModifyListener listener)
ModifyListener
interface.Note: event.data will hold implementation specific data
ie: CDateTime places its current Date object here
listener
- the listener which should be notified
java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- ModifyListener
,
removeModifyListener(org.eclipse.swt.events.ModifyListener)
public void addTraverseListener(org.eclipse.swt.events.TraverseListener listener)
addTraverseListener
in class org.eclipse.swt.widgets.Control
public org.eclipse.swt.widgets.Menu getMenu()
getMenu
in class org.eclipse.swt.widgets.Control
public int getStyle()
getStyle
in class org.eclipse.swt.widgets.Widget
public java.lang.String getText()
public boolean isOpen()
public void setOpen(boolean open)
content == null
this method simply returns.popup == null
then popup
will be created.
open
- public void removeModifyListener(org.eclipse.swt.events.ModifyListener listener)
listener
- the listener which should no longer be notified
java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- ModifyListener
,
addModifyListener(org.eclipse.swt.events.ModifyListener)
public void removeTraverseListener(org.eclipse.swt.events.TraverseListener listener)
removeTraverseListener
in class org.eclipse.swt.widgets.Control
public void setButtonVisibility(int visibility)
The style will be forced to NEVER if the contents are null
visibility
- the visibility style constantsetButtonVisible(boolean)
public void setButtonVisible(boolean visible)
Note: This method is only useful when the button's visibility style is either AUTO or MANUAL.
visible
- setButtonVisibility(int)
public void setEditable(boolean editable)
public void setEnabled(boolean enabled)
setEnabled
in class org.eclipse.swt.widgets.Control
public boolean setFocus()
setFocus
in class org.eclipse.swt.widgets.Composite
public void setFont(org.eclipse.swt.graphics.Font font)
setFont
in class org.eclipse.swt.widgets.Control
public void setHoldOpen(boolean holdOpen)
merely sets the holdOpen flag, does not change popup visibility state
holdOpen
- public void setMenu(org.eclipse.swt.widgets.Menu menu)
Note that setting the menu to null causes the native menu to be used
If the intent is to disable the menu, then set it to a blank menu
setMenu
in class org.eclipse.swt.widgets.Control
public void setRedraw(boolean redraw)
setRedraw
in class org.eclipse.swt.widgets.Control
public void setStretch(boolean stretch)
However, if stretchControl is true, the width of the popup will be stretched to equal the width of this control (if, however, popup's preferred width is greater than this control's width popup will not be shrunk down)
stretch
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |