Package com._1c.g5.lwt.controls
Class LightScrolledContentComposite<C extends ILightControl>
- java.lang.Object
-
- com._1c.g5.lwt.AbstractLightControl
-
- com._1c.g5.lwt.LightComposite
-
- com._1c.g5.lwt.AbstractLightContentComposite<C>
-
- com._1c.g5.lwt.controls.LightScrolledContentComposite<C>
-
- All Implemented Interfaces:
ILightComposite
,ILightContentComposite<C>
,ILightControl
public class LightScrolledContentComposite<C extends ILightControl> extends AbstractLightContentComposite<C>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LightScrolledContentComposite.NavigationPlacement
static class
LightScrolledContentComposite.NavigationVisibility
-
Constructor Summary
Constructors Constructor Description LightScrolledContentComposite()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addScrollPositionListener(IChangedListener<? extends LightScrolledContentComposite<? extends C>,org.eclipse.swt.graphics.Point> listener)
protected org.eclipse.swt.graphics.Point
computeContentSize(org.eclipse.swt.graphics.GC gc)
org.eclipse.swt.graphics.Point
computeSize(org.eclipse.swt.graphics.GC gc, int width, int height, boolean flushCache)
Computes the size of this control.protected void
contentSet(ILightControl content)
protected void
contentUnset(ILightControl content)
ILightControl
getHorizontalNavigation()
LightScrolledContentComposite.NavigationVisibility
getHorizontalNavigationVisibility()
org.eclipse.swt.graphics.Point
getScrollPosition()
org.eclipse.swt.graphics.Point
getScrollRange()
ILightControl
getVerticalNavigation()
LightScrolledContentComposite.NavigationVisibility
getVerticalNavigationVisibility()
protected org.eclipse.swt.graphics.Rectangle
getViewportBounds()
void
handleEvent(org.eclipse.swt.widgets.Event event)
Handles the SWT event, SWT events are pumped to this method if this control is active.boolean
isHorizontalStretch()
static boolean
isNavigationControl(ILightControl control)
boolean
isVerticalStretch()
void
layout(org.eclipse.swt.graphics.GC gc)
Layouts this composite using its layout, if any.void
removeScrollPositionListener(IChangedListener<? extends LightScrolledContentComposite<? extends C>,org.eclipse.swt.graphics.Point> listener)
org.eclipse.swt.graphics.Point
scrollBy(int horizontalDelta, int verticalDelta)
int
scrollHorizontallyBy(int delta)
void
scrollHorizontallyTo(int position)
void
scrollTo(int horizontalPosition, int verticalPosition)
int
scrollVerticallyBy(int delta)
void
scrollVerticallyTo(int position)
void
setHorizontalNavigation(ILightControl horizontalNavigation)
void
setHorizontalNavigationVisibility(LightScrolledContentComposite.NavigationVisibility horizontalNavigationControlVisibility)
void
setHorizontalStretch(boolean horizontalStretch)
void
setVerticalNavigation(ILightControl verticalNavigation)
void
setVerticalNavigationVisibility(LightScrolledContentComposite.NavigationVisibility verticalNavigationControlVisibility)
void
setVerticalStretch(boolean verticalStretch)
-
Methods inherited from class com._1c.g5.lwt.AbstractLightContentComposite
getContent, setContent
-
Methods inherited from class com._1c.g5.lwt.LightComposite
addChild, addChild, addChildAfter, addLayerAbove, addLayerBehind, controlFromPoint, dispose, getActiveControl, getChildCount, getChildren, getLayers, getLayout, layout, paint, removeChild, removeChild, revealRectangle, setActiveControl, setBounds, setFocus, setLayout, translatePointFromControl, translatePointToControl, translateRectangleFromControl, translateRectangleToControl, traverse, traverse
-
Methods inherited from class com._1c.g5.lwt.AbstractLightControl
addControlListener, getBounds, getCursor, getData, getLayoutData, getOverlay, getParent, getTooltip, getVisibleBounds, invalidate, invalidate, isDisposed, isEnabled, isFocused, isVisible, removeControlListener, setCursor, setData, setEnabled, setFocusable, setLayoutData, setOverlay, setParent, setTooltip, setVisible
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com._1c.g5.lwt.ILightComposite
getMainLayer
-
Methods inherited from interface com._1c.g5.lwt.ILightControl
addControlListener, getBounds, getCursor, getData, getLayoutData, getParent, getTooltip, getVisibleBounds, initialize, invalidate, invalidate, isDisposed, isEnabled, isFocused, isVisible, removeControlListener, setCursor, setData, setEnabled, setLayoutData, setParent, setTooltip, setVisible
-
-
-
-
Method Detail
-
isNavigationControl
public static boolean isNavigationControl(ILightControl control)
-
getHorizontalNavigation
public ILightControl getHorizontalNavigation()
-
setHorizontalNavigation
public void setHorizontalNavigation(ILightControl horizontalNavigation)
-
getVerticalNavigation
public ILightControl getVerticalNavigation()
-
setVerticalNavigation
public void setVerticalNavigation(ILightControl verticalNavigation)
-
getHorizontalNavigationVisibility
public LightScrolledContentComposite.NavigationVisibility getHorizontalNavigationVisibility()
-
setHorizontalNavigationVisibility
public void setHorizontalNavigationVisibility(LightScrolledContentComposite.NavigationVisibility horizontalNavigationControlVisibility)
-
getVerticalNavigationVisibility
public LightScrolledContentComposite.NavigationVisibility getVerticalNavigationVisibility()
-
setVerticalNavigationVisibility
public void setVerticalNavigationVisibility(LightScrolledContentComposite.NavigationVisibility verticalNavigationControlVisibility)
-
isHorizontalStretch
public boolean isHorizontalStretch()
-
setHorizontalStretch
public void setHorizontalStretch(boolean horizontalStretch)
-
isVerticalStretch
public boolean isVerticalStretch()
-
setVerticalStretch
public void setVerticalStretch(boolean verticalStretch)
-
getScrollRange
public org.eclipse.swt.graphics.Point getScrollRange()
-
getScrollPosition
public org.eclipse.swt.graphics.Point getScrollPosition()
-
addScrollPositionListener
public void addScrollPositionListener(IChangedListener<? extends LightScrolledContentComposite<? extends C>,org.eclipse.swt.graphics.Point> listener)
-
removeScrollPositionListener
public void removeScrollPositionListener(IChangedListener<? extends LightScrolledContentComposite<? extends C>,org.eclipse.swt.graphics.Point> listener)
-
scrollBy
public org.eclipse.swt.graphics.Point scrollBy(int horizontalDelta, int verticalDelta)
-
scrollHorizontallyBy
public int scrollHorizontallyBy(int delta)
-
scrollVerticallyBy
public int scrollVerticallyBy(int delta)
-
scrollTo
public void scrollTo(int horizontalPosition, int verticalPosition)
-
scrollHorizontallyTo
public void scrollHorizontallyTo(int position)
-
scrollVerticallyTo
public void scrollVerticallyTo(int position)
-
handleEvent
public void handleEvent(org.eclipse.swt.widgets.Event event)
Description copied from interface:ILightControl
Handles the SWT event, SWT events are pumped to this method if this control is active.- Specified by:
handleEvent
in interfaceILightControl
- Overrides:
handleEvent
in classAbstractLightControl
- Parameters:
event
- the event to handle.- See Also:
ILightComposite.setActiveControl(ILightControl)
-
computeSize
public org.eclipse.swt.graphics.Point computeSize(org.eclipse.swt.graphics.GC gc, int width, int height, boolean flushCache)
Description copied from interface:ILightControl
Computes the size of this control.- Specified by:
computeSize
in interfaceILightControl
- Overrides:
computeSize
in classLightComposite
- Parameters:
gc
- the GC to do measurements with.width
- the width hint,SWT.DEFAULT
to compute the preferred width.height
- the height hint,SWT.DEFAULT
to compute the preferred height.flushCache
- the flush cache flag, instructs the associated layout to reset all its caches, if any.- Returns:
- the computed size.
-
layout
public void layout(org.eclipse.swt.graphics.GC gc)
Description copied from interface:ILightComposite
Layouts this composite using its layout, if any.- Specified by:
layout
in interfaceILightComposite
- Overrides:
layout
in classLightComposite
- Parameters:
gc
- theGC
to do the measurements with.
-
contentSet
protected void contentSet(ILightControl content)
- Specified by:
contentSet
in classAbstractLightContentComposite<C extends ILightControl>
-
contentUnset
protected void contentUnset(ILightControl content)
- Specified by:
contentUnset
in classAbstractLightContentComposite<C extends ILightControl>
-
getViewportBounds
protected org.eclipse.swt.graphics.Rectangle getViewportBounds()
-
computeContentSize
protected org.eclipse.swt.graphics.Point computeContentSize(org.eclipse.swt.graphics.GC gc)
-
-