org.eclipse.net4j.util.ui.widgets
Class TextAndDisable

java.lang.Object
  extended by org.eclipse.swt.widgets.Widget
      extended by org.eclipse.swt.widgets.Control
          extended by org.eclipse.swt.widgets.Scrollable
              extended by org.eclipse.swt.widgets.Composite
                  extended by org.eclipse.net4j.util.ui.widgets.TextAndDisable
All Implemented Interfaces:
EventListener, ModifyListener, SelectionListener, Drawable, org.eclipse.swt.internal.SWTEventListener

public class TextAndDisable
extends Composite
implements SelectionListener, ModifyListener


Field Summary
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Constructor Summary
TextAndDisable(Composite parent, int textStyle, String disabledValue)
           
 
Method Summary
protected  Button createButton()
           
protected  Text createText(int textStyle)
           
protected  GridData createTextLayoutData()
           
 Button getButton()
           
 Text getText()
           
 String getValue()
           
 boolean isDisabled()
           
 void modifyText(ModifyEvent e)
          Sent when the text is modified.
 void setDisabled(boolean disabled)
           
 void setValue(String value)
           
 void widgetDefaultSelected(SelectionEvent e)
          Sent when default selection occurs in the control.
 void widgetSelected(SelectionEvent e)
          Sent when selection occurs in the control.
 
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getBorderWidth, getClientArea, getHorizontalBar, 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, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, 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, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextAndDisable

public TextAndDisable(Composite parent,
                      int textStyle,
                      String disabledValue)
Method Detail

getText

public Text getText()

getButton

public Button getButton()

isDisabled

public boolean isDisabled()

setDisabled

public void setDisabled(boolean disabled)

getValue

public String getValue()

setValue

public void setValue(String value)

widgetDefaultSelected

public void widgetDefaultSelected(SelectionEvent e)
Description copied from interface: org.eclipse.swt.events.SelectionListener
Sent when default selection occurs in the control.

For example, on some platforms default selection occurs in a List when the user double-clicks an item or types return in a Text. On some platforms, the event occurs when a mouse button or key is pressed. On others, it happens when the mouse or key is released. The exact key or mouse gesture that causes this event is platform specific.

Specified by:
widgetDefaultSelected in interface SelectionListener
Parameters:
e - an event containing information about the default selection

widgetSelected

public void widgetSelected(SelectionEvent e)
Description copied from interface: org.eclipse.swt.events.SelectionListener
Sent when selection occurs in the control.

For example, selection occurs in a List when the user selects an item or items with the keyboard or mouse. On some platforms, the event occurs when a mouse button or key is pressed. On others, it happens when the mouse or key is released. The exact key or mouse gesture that causes this event is platform specific.

Specified by:
widgetSelected in interface SelectionListener
Parameters:
e - an event containing information about the selection

modifyText

public void modifyText(ModifyEvent e)
Description copied from interface: org.eclipse.swt.events.ModifyListener
Sent when the text is modified.

Specified by:
modifyText in interface ModifyListener
Parameters:
e - an event containing information about the modify

createText

protected Text createText(int textStyle)

createTextLayoutData

protected GridData createTextLayoutData()

createButton

protected Button createButton()


Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.