public class DefaultSWTComposite extends AbstractSWTWidget
TICComponent
.
It uses the TICComponent.paint(TICPaintEvent)
to draw the widget.
Since TIC 3.0.0 optionally shifting the paint coordinate origin is possible to model direct scrolling
(without being nested within a scroll container). This is especially relevant for large components in
SWT since the component size is limited to 32767 (2^15 - 1) on some operating systems. For components
that directly implement scrolling behavior the properties getScrollOffsetX()
and
getScrollOffsetY()
can be used.
Constructor and Description |
---|
DefaultSWTComposite(TICComponent ticComponent,
org.eclipse.swt.widgets.Composite parent,
int style) |
Modifier and Type | Method and Description |
---|---|
org.eclipse.swt.graphics.Point |
computeSize(int wHint,
int hHint) |
org.eclipse.swt.graphics.Point |
computeSize(int wHint,
int hHint,
boolean changed) |
protected TICComponent |
getOutputComponent()
This method may be overwritten be inherited classes to paint a TIC component that is not
the associated independent component, e.g.
|
protected int |
getScrollOffsetX()
This method can be overwritten be inherited classes to provide direct scrolling.
|
protected int |
getScrollOffsetY()
This method can be overwritten be inherited classes to provide direct scrolling.
|
org.eclipse.swt.widgets.Control |
getSWTComponent() |
void |
paintControl(org.eclipse.swt.events.PaintEvent e)
Fire a TIC paint event internally to let the implementing class draw on a buffered image and than draws
that image into the SWT graphics context.
|
getIndependentComponent
drawBackground, getCaret, getIME, scroll, setCaret, setFont, setIME
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, 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, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
assignSize, getLocationInParent, getTargetToolkit, getToolkitSize, isFocusOwner, repaint, requestFocus
public DefaultSWTComposite(TICComponent ticComponent, org.eclipse.swt.widgets.Composite parent, int style)
public org.eclipse.swt.widgets.Control getSWTComponent()
protected int getScrollOffsetX()
protected int getScrollOffsetY()
protected TICComponent getOutputComponent()
TICComponent
.
This default implementation returns the same instance of AbstractSWTWidget.getIndependentComponent()
.public void paintControl(org.eclipse.swt.events.PaintEvent e)
Note that the TIC paint event will always cover a rectangle which is extended by one pixel to the left and top compared to the SWT paint event. That is done to solve problems with anti-aliased lines passing the bounds of that rectangle.
public org.eclipse.swt.graphics.Point computeSize(int wHint, int hHint)
computeSize
in class org.eclipse.swt.widgets.Control
public org.eclipse.swt.graphics.Point computeSize(int wHint, int hHint, boolean changed)
computeSize
in class org.eclipse.swt.widgets.Control