|
TPTP 4.5.0 Platform Project Internal API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.tptp.platform.report.ui.swt.widgets.internal.ScrollView
org.eclipse.tptp.platform.report.drivers.ui.internal.SWTViewer
org.eclipse.tptp.platform.report.birt).
public class SWTViewer
This class is a widget that extends a Canvas to display a JScrib IDItem.
This widget can render the entire or a part of a JScrib document.
The SWTViewer do not render directly IDItem but a hierarchy of TAbstractCell. This
hierarchy is a rectangle hierarchy which are arranged by a @link ILayout mechanism.
This class calls the SWTPainter's services to render the TAbstractCell
The following example shows a DDocument in a SWTViewer.
IDItem doc = new Document();
doc.addChild(new Text("Hello World"));
SWTViewer ws = new SWTViewer(c, parent);
ws.setContent(doc);
ws.show();
TAbstractCellContainer,
IDItem,
ILayout,
SWTPainter| Nested Class Summary | |
|---|---|
static class |
SWTViewer.KeyEventHandler
Deprecated. This class provides a default Keyboard event handler for used by the SWTViewer. |
static class |
SWTViewer.MouseEventHandler
Deprecated. This class provides a default Mouse event handler for used by the SWTViewer. |
class |
SWTViewer.Selection
Deprecated. This class provides the status of a range selection in the SWTViewer. |
static class |
SWTViewer.ViewerEvent
Deprecated. |
static class |
SWTViewer.ViewerKeyEvent
Deprecated. This class provides the datas to manage a keyboard event on a ITCell in the SWTViewer. |
static class |
SWTViewer.ViewerMouseEvent
Deprecated. This class provides the datas to manage a mouse event on a ITCell in the SWTViewer. |
static class |
SWTViewer.ViewerProgressMonitor
Deprecated. This class provides the datas to manage a mouse event on a ITCell in the SWTViewer. |
| Field Summary | |
|---|---|
Signal |
linkActivated
Deprecated. Signal : linkActivated(java.lang.String, org.eclipse.tptp.platform.report.core.internal.IDLink) Emit when the IDlink object is activated by rigth click and it is not resolved itself by the SWTViewer because it is an external link. |
Signal |
linkHighlighted
Deprecated. Signal : linkHighlighted(java.lang.String, org.eclipse.tptp.platform.report.core.internal.IDLink) Emit when the mouse cursor pass through a DLink object. |
Signal |
linkUnhighlighted
Deprecated. Signal : linkUnlighlighted(java.lang.String, org.eclipse.tptp.platform.report.core.internal.IDLink) Emit when the mouse cursor exits a DLink object. |
Signal |
linkUnresolved
Deprecated. Signal : linkError(java.lang.String, org.eclipse.tptp.platform.report.core.internal.IDLink) Emit when the SWTViewer cannot resolve the link and found the target The slots receive two arguments. |
Signal |
selectionChanged
Deprecated. Signal : selectionChanged(org.eclipse.tptp.platform.report.ui.internal.SWTViewer) Emit when the selection changes in the viewer. |
| Fields inherited from class org.eclipse.tptp.platform.report.ui.swt.widgets.internal.ScrollView |
|---|
ALWAYS_OFF, ALWAYS_ON, AUTO, corner_control_, HBAR, VBAR |
| Fields inherited from class org.eclipse.swt.widgets.Composite |
|---|
embeddedHandle |
| Fields inherited from class org.eclipse.swt.widgets.Widget |
|---|
handle |
| Constructor Summary | |
|---|---|
SWTViewer(org.eclipse.swt.widgets.Composite parent,
int style)
Deprecated. This class provides a new widget which is a SWT render for a JScrib Document. |
|
| Method Summary | |
|---|---|
void |
activateLink(IDLink link,
org.eclipse.swt.graphics.Point p)
Deprecated. The link acquires the focus. |
protected void |
closeChildViewer()
Deprecated. Closes the child viewer if there is one opened |
protected void |
contentsMouseDoubleClickEvent(org.eclipse.swt.events.MouseEvent e)
Deprecated. Makes a ViewerMouseEvent object and calls the default mouse handler event for the viewer The ViewerMouseEvent is made with a SWT.MouseDoubleClick event type. |
protected void |
contentsMouseDownEvent(org.eclipse.swt.events.MouseEvent e)
Deprecated. Makes a ViewerMouseEvent object and calls the default mouse handler event for the viewer The ViewerMouseEvent is made with a SWT.MouseDown event type. |
protected void |
contentsMouseExit(org.eclipse.swt.events.MouseEvent e)
Deprecated. Called when the mouse exits the window area |
protected void |
contentsMouseMoveEvent(org.eclipse.swt.events.MouseEvent e)
Deprecated. This method detects when the cursor leaves an ITCell and enters in another. |
protected void |
contentsMouseUpEvent(org.eclipse.swt.events.MouseEvent e)
Deprecated. Makes a ViewerMouseEvent object and calls the default mouse handler event for the viewer The ViewerMouseEvent is made with a SWT.MouseUp event type. |
void |
copy()
Deprecated. Copies the current selected text in the clipboard Will be implemented in the next version |
void |
dispose()
Deprecated. dispose all objet used by the viewer |
protected void |
drawContents(org.eclipse.swt.graphics.GC gc,
int clipx,
int clipy,
int clipw,
int cliph)
Deprecated. Calls the default painter to draw the contents of the view This method uses double buffering to eliminate flakering |
void |
dump()
Deprecated. dumps the internal data of the SWTViewer. |
IDLink |
extractRenderableLink(IRenderLocation loc)
Deprecated. Convert specified graphic location to a IDLink: located item might implements IDLink, if not, one of its parent can. |
protected SWTViewer |
getChildViewer()
Deprecated. Returns the child viewer if it is opened otherwise return null |
IDItem |
getContentItem()
Deprecated. returns the contentItem that actually shown in the viewer |
java.lang.String |
getContentText()
Deprecated. Returns the text content in the SWTViewer |
SWTViewer.KeyEventHandler |
getDefaultKeyEventHandler()
Deprecated. Returns the internal default keyboard event handler of the SWTViewer. |
SWTViewer.MouseEventHandler |
getDefaultMouseEventHandler()
Deprecated. Returns the internal default mouse event handler of the SWTViewer |
SWTPainter |
getDefaultPainterEventHandler()
Deprecated. Returns the internal default paint event handler of the SWTViewer. |
SWTViewer.Selection |
getDefaultSelection()
Deprecated. Returns the instance of the internal default selection |
IDIImageProvider |
getImageProvider()
Deprecated. return the internal IImage provider used by viewer |
ILineLayout.ILine |
getLineAtPosition(int lineNumber)
Deprecated. Returns an interface on the line at the position lineNumber to access of the line's cells and line size. |
protected IDLink |
getLinkFromCell(SWTViewer.ViewerMouseEvent evt)
Deprecated. Searches and returns a valid IDLink object for an ITCell when the mouse cursor is flying on the ITCell. |
IDProgressMonitor |
getProgressMonitor()
Deprecated. |
java.lang.String |
getSelectedText()
Deprecated. Returns the selected text in the viewer in a string |
long |
getToolipTimerDelay()
Deprecated. Returns the delay used before to open a Tooltip popup. |
java.lang.String |
getViewerName()
Deprecated. Returns the text content in the SWTViewer |
ViewerRegistry |
getViewerRegistry()
Deprecated. Returns the ViewerRegistry in which the viewer is registered |
int |
getViewMode()
Deprecated. Will be implemented in the next version |
float |
getZoom()
Deprecated. Returns the current zoom factor in the viewer |
void |
hideTooltip()
Deprecated. Hides the opened tooltip |
void |
highlightLink(IDLink link,
org.eclipse.swt.graphics.Point p)
Deprecated. Emits the signal linkHighlighted_Signal and show the tooltip if the link has a DLinkUtil.TOOLTIP method |
boolean |
isMaintainRatio()
Deprecated. |
boolean |
isReversed()
Deprecated. Returns true if the viewer's content is reversed (BiDi support). |
boolean |
isShowExternalLinkTooltip()
Deprecated. Returns true if the viewer shows the external link target in a tooltip text information. |
protected void |
keyPressedEvent(org.eclipse.swt.events.KeyEvent _e)
Deprecated. Makes a valid ViewerKeyEvent and calls the default key handler event for the viewer The ViewerKeyEvent is made with a SWT.KeyDown event type. |
protected void |
keyReleasedEvent(org.eclipse.swt.events.KeyEvent _e)
Deprecated. Makes a ViewerKeyEvent object and calls the default key handler event for the viewer The ViewerKeyEvent is made with a SWT.KeyUp event type. |
IDItem |
mapPointToIDItem(int x,
int y)
Deprecated. This method returns the IDItem which contains the point x, y. |
protected void |
move3DView(SWTViewer.ViewerMouseEvent e,
DGraphic gph)
Deprecated. Changes the properties DGraphic.P_XYZ_PHI and P_XYZ_THETA of the graphic with the cursor position and redraw the graphic. |
void |
nextFocusable()
Deprecated. Pass the focus to the next item the focusable item can be null if no next focusable item exist in the contentItem. |
protected void |
openNewViewer(IDItem content,
org.eclipse.swt.graphics.Point pos,
java.lang.String method)
Deprecated. Opens new viewer in a new Shell window if the method is DLinkUtil.DETACH else it opens a popup window. |
void |
previousFocusable()
Deprecated. Pass the focus to the next item the focusable item can be null if no previous focusable item exist in the contentItem |
protected void |
rebuildDoc(boolean contentChanged)
Deprecated. Clears and rebuilds the internal data cell structure for the contentItem already setted in the SWTViewer. |
void |
redraw(TAbstractCell e)
Deprecated. Redraw just on cell of the SWTViewer. |
void |
redraw(TCell e)
Deprecated. use redraw(TAbstractCell) |
void |
refresh()
Deprecated. Refreshes the entire contentItem. |
void |
resetDefaultSelection()
Deprecated. Disables the current selection |
void |
scrollTo(ILineLayout.ILine line)
Deprecated. Scrolls the view to the line line. |
void |
scrollTo(java.lang.String tag)
Deprecated. Scrolls the contentItem to the item which as the tag \tag |
void |
scrollTo(TAbstractCell cell)
Deprecated. Scrolls the view to ensure visible the ITCell passed in parameter |
void |
scrollTo(TCell cell)
Deprecated. use scrollTo(TAbstractCell cell) |
void |
search(java.lang.String regexp)
Deprecated. Will be implemented in the next version |
void |
select(ILineLayout.ILine line)
Deprecated. Selects the line line. |
void |
selectAll()
Deprecated. Selects all the text in the contentItem |
void |
setContent(IDItem rootItem)
Deprecated. Sets the contentItem which has to shown in the viewer |
protected void |
setContent(TAbstractCellContainer c)
Deprecated. Sets the contentCell which has to shown in the viewer |
protected void |
setContent(TCellContainer c)
Deprecated. use setContent(TAbstractCellContainer c) |
void |
setDefaultKeyEventHandler(SWTViewer.KeyEventHandler keyEventHandler)
Deprecated. Sets the default keyboard event handler of the SWTViewer. |
void |
setDefaultMouseEventHandler(SWTViewer.MouseEventHandler mouseEventHandler)
Deprecated. Sets the default mouse event handler of the SWTViewer. |
void |
setDefaultPainterEventHandler(SWTPainter painterEventHandler)
Deprecated. Sets the default paint event handler of the SWTViewer. |
void |
setDefaultSelectionRange(int start,
int end)
Deprecated. Sets the selection in character position |
void |
setDocument(IDDocument document)
Deprecated. it's replaced by setContent(IDItem) method. Sets a document in the viewer |
boolean |
setFocus()
Deprecated. Called when the control acquires the focus |
protected void |
setFocus(TCellFocusMark cell)
Deprecated. Pass the focus to the focus cell mark passed in parameter |
void |
setImageProvider(IDIImageProvider img_p)
Deprecated. sets the internal IImage provider used by viewer |
void |
setMaintainRatio(boolean maintainRatio)
Deprecated. |
void |
setMargins(int _top,
int _bottom,
int _left,
int _right)
Deprecated. Sets the margins in pixel for the contentItem |
void |
setProgressMonitor(IDProgressMonitor monitor)
Deprecated. |
void |
setReversed(boolean reversed)
Deprecated. Un/Reverses the viewer's content for BiDi support. |
void |
setShowExternalLinkTooltip(boolean b)
Deprecated. Shows a tooltip text information with the link target for the External link only |
void |
setToolipTimerDelay(long toolipTimerDelay)
Deprecated. Sets the delay used before to open a Tooltip popup. |
void |
setViewerName(java.lang.String n)
Deprecated. Set a name to the Viewer and register it in the ViewerRegistry. |
void |
setViewerRegistry(ViewerRegistry registry)
Deprecated. Sets the viewer registry |
void |
setViewMode(int aMode)
Deprecated. Will be implemented in the next version |
void |
setZoom(float f,
boolean mr)
Deprecated. Sets the zoom factor |
void |
showTooltip(IDItem content,
org.eclipse.swt.graphics.Point pos)
Deprecated. Shows a tooltip |
void |
startAccessibility()
Deprecated. Starts the accessibility |
void |
unhighlightLink(IDLink link)
Deprecated. Hide the tooltip if the link has a DLinkUtil.TOOLTIP method and Emits the signal linkUnhighlighted_Signal and |
protected void |
viewResized()
Deprecated. Rebuild the contentItem only if the new viewer's width is different that the older. |
| Methods inherited from class org.eclipse.swt.widgets.Composite |
|---|
changed, checkSubclass, computeSize, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setLayout, setLayoutDeferred, setTabList |
| Methods inherited from class org.eclipse.swt.widgets.Scrollable |
|---|
getBorderWidth |
| Methods inherited from class org.eclipse.swt.widgets.Control |
|---|
addControlListener, addDragDetectListener, addFocusListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getRegion, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTraverseListener, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setRegion, setSize, setSize, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update |
| Methods inherited from class org.eclipse.swt.widgets.Widget |
|---|
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, 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 |
| Field Detail |
|---|
public Signal selectionChanged
public Signal linkHighlighted
public Signal linkUnhighlighted
public Signal linkActivated
DLinkUtil.isInternalLink(org.eclipse.tptp.platform.report.core.internal.IDLink)public Signal linkUnresolved
DLinkUtil.isInternalLink(org.eclipse.tptp.platform.report.core.internal.IDLink)| Constructor Detail |
|---|
public SWTViewer(org.eclipse.swt.widgets.Composite parent,
int style)
This class used the following default handler to manage paint, cursor and key events: SWTPainter, MouseEventHandler and KeyEventHandler.
To sets the contentItem which you can display you have to just call the method setDocument of the SWTViewer.
Example:
SWTViewer v = new SWTViewer(parent, style); v.setDocument(my_jcrib_document);
ScrollView,
SWTPainter,
SWTViewer.MouseEventHandler,
SWTViewer.KeyEventHandler| Method Detail |
|---|
public IDIImageProvider getImageProvider()
public void setImageProvider(IDIImageProvider img_p)
public void dump()
public void dispose()
dispose in class ScrollViewpublic long getToolipTimerDelay()
public void setToolipTimerDelay(long toolipTimerDelay)
public void highlightLink(IDLink link,
org.eclipse.swt.graphics.Point p)
public void unhighlightLink(IDLink link)
public void activateLink(IDLink link,
org.eclipse.swt.graphics.Point p)
public void showTooltip(IDItem content,
org.eclipse.swt.graphics.Point pos)
content - is the contents of the tooltippos - is the position of the tooltip. If pos is null the tooltip is shown a the position of the mouse cursorpublic void hideTooltip()
protected void closeChildViewer()
protected SWTViewer getChildViewer()
protected void openNewViewer(IDItem content,
org.eclipse.swt.graphics.Point pos,
java.lang.String method)
content - is the contents of the new windowPos - is the coordinates. Can be null, in this case the cursor location has been taken for the coordinatespublic int getViewMode()
public void setViewMode(int aMode)
public IDItem getContentItem()
public void setContent(IDItem rootItem)
public void setDocument(IDDocument document)
protected void setContent(TAbstractCellContainer c)
protected void setContent(TCellContainer c)
setContent(TAbstractCellContainer)public java.lang.String getSelectedText()
protected void rebuildDoc(boolean contentChanged)
org.eclipse.tptp.platform.report.SWTViewer#refresh()public void refresh()
org.eclipse.swt.Composite#redrawprotected void viewResized()
viewResized in class ScrollViewScrollView.viewResized()protected IDLink getLinkFromCell(SWTViewer.ViewerMouseEvent evt)
protected void keyPressedEvent(org.eclipse.swt.events.KeyEvent _e)
keyPressedEvent in class ScrollViewprotected void keyReleasedEvent(org.eclipse.swt.events.KeyEvent _e)
keyReleasedEvent in class ScrollViewprotected void contentsMouseDoubleClickEvent(org.eclipse.swt.events.MouseEvent e)
contentsMouseDoubleClickEvent in class ScrollViewprotected void contentsMouseDownEvent(org.eclipse.swt.events.MouseEvent e)
contentsMouseDownEvent in class ScrollViewprotected void contentsMouseMoveEvent(org.eclipse.swt.events.MouseEvent e)
When the cursor stills in the same cell it calls the mouse event handler with a SWT.MouseMove event type.
contentsMouseMoveEvent in class ScrollViewprotected void contentsMouseUpEvent(org.eclipse.swt.events.MouseEvent e)
contentsMouseUpEvent in class ScrollViewprotected void contentsMouseExit(org.eclipse.swt.events.MouseEvent e)
contentsMouseExit in class ScrollViewe -
protected void move3DView(SWTViewer.ViewerMouseEvent e,
DGraphic gph)
DGraphic,
SWTViewer#redraw(ITCell)public void redraw(TAbstractCell e)
org.eclipse.swt.Composite#redraw,
refresh()public void redraw(TCell e)
redraw(TAbstractCell)public void scrollTo(java.lang.String tag)
public ILineLayout.ILine getLineAtPosition(int lineNumber)
public void scrollTo(ILineLayout.ILine line)
getLineAtPosition(int lineNumber)public void select(ILineLayout.ILine line)
scrollTo(TLineLayout.ILine line)public void scrollTo(TAbstractCell cell)
public void scrollTo(TCell cell)
scrollTo(TAbstractCell)public void search(java.lang.String regexp)
public void copy()
public IDLink extractRenderableLink(IRenderLocation loc)
public void selectAll()
protected void drawContents(org.eclipse.swt.graphics.GC gc,
int clipx,
int clipy,
int clipw,
int cliph)
drawContents in class ScrollViewScrollView#drawContents()
public void setMargins(int _top,
int _bottom,
int _left,
int _right)
t - is the top marginb - is the botton marginl - is the left marginr - is the right margin
public void setDefaultSelectionRange(int start,
int end)
public void resetDefaultSelection()
public SWTViewer.Selection getDefaultSelection()
public boolean isShowExternalLinkTooltip()
For example
public void setShowExternalLinkTooltip(boolean b)
public float getZoom()
public void setZoom(float f,
boolean mr)
public void nextFocusable()
public void previousFocusable()
public SWTPainter getDefaultPainterEventHandler()
public void setDefaultPainterEventHandler(SWTPainter painterEventHandler)
public SWTViewer.MouseEventHandler getDefaultMouseEventHandler()
public void setDefaultMouseEventHandler(SWTViewer.MouseEventHandler mouseEventHandler)
public SWTViewer.KeyEventHandler getDefaultKeyEventHandler()
public void setDefaultKeyEventHandler(SWTViewer.KeyEventHandler keyEventHandler)
public boolean isMaintainRatio()
public void setMaintainRatio(boolean maintainRatio)
maintainRatio - The maintainRatio to set.public boolean isReversed()
public void setReversed(boolean reversed)
public void startAccessibility()
public boolean setFocus()
setFocus in class ScrollViewprotected void setFocus(TCellFocusMark cell)
public java.lang.String getContentText()
public java.lang.String getViewerName()
public void setViewerName(java.lang.String n)
n - viewer namepublic ViewerRegistry getViewerRegistry()
public void setViewerRegistry(ViewerRegistry registry)
registry - public IDProgressMonitor getProgressMonitor()
public void setProgressMonitor(IDProgressMonitor monitor)
public IDItem mapPointToIDItem(int x,
int y)
|
TPTP 4.5.0 Platform Project Internal API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||