net.sf.ecl.datepicker
Class CFocusableComposite

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 net.sf.ecl.datepicker.StackComposite
                      extended by net.sf.ecl.datepicker.CFocusableComposite
All Implemented Interfaces:
Drawable

public class CFocusableComposite
extends StackComposite

is a composite which can embed controls and shows focus border by request.

Version:
$Revision: 1.4 $
Author:
Alexey Afanasyev, Alexey Kharlamov

Field Summary
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Constructor Summary
CFocusableComposite(Composite parent, int style)
          creates an instance of the composite.
 
Method Summary
 Rectangle computeTrim(int x, int y, int width, int height)
           
 Rectangle getClientArea()
           
 boolean isShowFocus()
          checks whether the container shows focus border.
protected  void paintWidget(PaintEvent e)
          paint the widget.
 void setShowFocus(boolean value)
          controls focus border.
 
Methods inherited from class net.sf.ecl.datepicker.StackComposite
computeSize, getTopControl, layout, setEnabled, setTopControl
 
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
getHorizontalBar, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, 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, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, 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

CFocusableComposite

public CFocusableComposite(Composite parent,
                           int style)
creates an instance of the composite.

Parameters:
parent - the parent control.
style - the style.
Method Detail

computeTrim

public Rectangle computeTrim(int x,
                             int y,
                             int width,
                             int height)
Overrides:
computeTrim in class Scrollable

isShowFocus

public boolean isShowFocus()
checks whether the container shows focus border.

Returns:
true if the container shows focus border.

setShowFocus

public void setShowFocus(boolean value)
controls focus border.

Parameters:
value -

paintWidget

protected void paintWidget(PaintEvent e)
paint the widget.


getClientArea

public Rectangle getClientArea()
Overrides:
getClientArea in class Scrollable