Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc für Elexis version 2.1.7.dev vom 01.09.2013

ch.unibe.iam.scg.archie.ui.widgets
Class AbstractWidget

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 ch.unibe.iam.scg.archie.ui.widgets.AbstractWidget
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable
Direct Known Subclasses:
CheckboxWidget, ComboWidget, PatientSelector, TextWidget

public abstract class AbstractWidget
extends org.eclipse.swt.widgets.Composite

An AbstractWidget has a label, a layout and any kind of control.

$Id$


Field Summary
protected  org.eclipse.swt.widgets.Control control
           
protected  org.eclipse.swt.widgets.Label label
           
protected  org.eclipse.swt.layout.GridLayout layout
           
protected  RegexValidation regexValidation
          regex is final
static int STD_COLUMN_HORIZONTAL_SPACING
          Horizontal space between components in this composite.
 
Fields inherited from class org.eclipse.swt.widgets.Control
view
 
Constructor Summary
AbstractWidget(org.eclipse.swt.widgets.Composite parent, int style, java.lang.String labelText, RegexValidation regex)
          Constructs a FieldComposite.
 
Method Summary
protected  void createLayout()
          Standard implementation: GridLayout with two columns.
 org.eclipse.swt.widgets.Label getLabel()
          Returns the label for this field composite.
abstract  java.lang.Object getValue()
          Returns a widget's value.
protected  boolean hasRegexValidation()
          Checks whether we have a regexValidation or not.
abstract  boolean isValid()
          Returns true if the value in a widget's control field is valid.
abstract  void setDescription(java.lang.String description)
          Describes this FieldComposites (e.g. for a ToolTip)
 void setEnabled(boolean enabled)
          Enables or disables the control of this FieldComposite
abstract  void setValue(java.lang.Object value)
          Set's a widget's value.
 
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, 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, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, 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, 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
 

Field Detail

STD_COLUMN_HORIZONTAL_SPACING

public static final int STD_COLUMN_HORIZONTAL_SPACING
Horizontal space between components in this composite.

See Also:
Constant Field Values

layout

protected org.eclipse.swt.layout.GridLayout layout

label

protected org.eclipse.swt.widgets.Label label

control

protected org.eclipse.swt.widgets.Control control

regexValidation

protected final RegexValidation regexValidation
regex is final

Constructor Detail

AbstractWidget

public AbstractWidget(org.eclipse.swt.widgets.Composite parent,
                      int style,
                      java.lang.String labelText,
                      RegexValidation regex)
Constructs a FieldComposite. Checks Arguments and creates a layout (specified by implementor classes).

Parameters:
parent - Composite
style - Integer
labelText - String
Method Detail

getValue

public abstract java.lang.Object getValue()
Returns a widget's value. This is usually the contents of the control field in a widget. Depending on the widget type, different types of values are returned (e.g. checkbox true, combo string etc.).

Returns:
text String

setValue

public abstract void setValue(java.lang.Object value)
Set's a widget's value.

Parameters:
value -

setDescription

public abstract void setDescription(java.lang.String description)
Describes this FieldComposites (e.g. for a ToolTip)

Parameters:
description -

isValid

public abstract boolean isValid()
Returns true if the value in a widget's control field is valid.

Returns:
true if this field is valid.

setEnabled

public void setEnabled(boolean enabled)
Enables or disables the control of this FieldComposite

Overrides:
setEnabled in class org.eclipse.swt.widgets.Control
Parameters:
enabled -

getLabel

public org.eclipse.swt.widgets.Label getLabel()
Returns the label for this field composite.

Returns:
label

createLayout

protected void createLayout()
Standard implementation: GridLayout with two columns.


hasRegexValidation

protected boolean hasRegexValidation()
Checks whether we have a regexValidation or not.


Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc für Elexis version 2.1.7.dev vom 01.09.2013