|
|||||||||
| Home >> All >> com >> port80 >> eclipse >> jdt >> graph >> [ views overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.port80.eclipse.jdt.graph.views
Class GraphViewer

java.lang.Objectorg.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.EditorPart
com.port80.eclipse.jdt.graph.views.GraphViewer
- All Implemented Interfaces:
- java.util.EventListener, org.eclipse.core.runtime.IAdaptable, org.eclipse.ui.IEditorPart, org.eclipse.core.runtime.IExecutableExtension, com.port80.swt.widgets.IGraphViewer, org.eclipse.ui.ISaveablePart, org.eclipse.jface.viewers.ISelectionProvider, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.swt.events.KeyListener, org.eclipse.swt.internal.SWTEventListener
- public class GraphViewer
- extends org.eclipse.ui.part.EditorPart
- implements com.port80.swt.widgets.IGraphViewer, org.eclipse.jface.viewers.ISelectionProvider, org.eclipse.swt.events.KeyListener
- extends org.eclipse.ui.part.EditorPart
A graph viewer in eclipse to view graph rendered in a BufferedImage.
| Nested Class Summary | |
(package private) static class |
GraphViewer.GraphContentProvider
|
(package private) class |
GraphViewer.GraphLabelComparator
|
(package private) static class |
GraphViewer.GraphLabelProvider
|
(package private) class |
GraphViewer.StatusLine
|
| Field Summary | |
private static int |
ALPHA_HIGHLIGHT
|
private static int |
COLOR_HIGHLIGHT
|
private static boolean |
DEBUG
|
private boolean |
fBeginFindSession
|
private com.port80.swt.widgets.ScrolledCanvas |
fCanvas
|
private GraphViewer.GraphContentProvider |
fContentProvider
|
private boolean |
fDirty
|
private java.lang.String |
fFilepath
|
private boolean |
fForwardFind
|
private com.port80.graph.IGraph |
fGraph
|
private org.eclipse.swt.graphics.Image |
fImage
|
private GraphViewer.GraphLabelComparator |
fLabelComparator
|
private GraphViewer.GraphLabelProvider |
fLabelProvider
|
private org.eclipse.swt.widgets.Menu |
fPopup
|
private java.util.List |
fSelectedRegions
The list of ImageRegionInfo of the selected regions in the back buffer. |
private java.util.List |
fSelection
|
private java.util.List |
fSelectionListeners
|
private com.port80.swt.widgets.IStatusLine |
fStatusLine
|
private static java.lang.String |
NAME
|
private static int |
PASSES
|
private static int |
SEED
|
| Fields inherited from class org.eclipse.ui.part.EditorPart |
|
| Fields inherited from class org.eclipse.ui.part.WorkbenchPart |
|
| Fields inherited from interface org.eclipse.ui.IEditorPart |
PROP_DIRTY, PROP_INPUT |
| Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
PROP_TITLE |
| Constructor Summary | |
GraphViewer()
|
|
| Method Summary | |
void |
addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
Adds a listener for selection changes in this selection provider. |
(package private) void |
beginIncrementalFind(boolean forward)
|
void |
createPartControl(org.eclipse.swt.widgets.Composite parent)
Creates the SWT controls for this workbench part. |
private org.eclipse.swt.widgets.Menu |
createPopup()
|
private void |
deHighlightSelection()
|
void |
doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
Saves the contents of this part. |
void |
doSaveAs()
Saves the contents of this part to another object. |
(package private) com.port80.swt.widgets.ScrolledCanvas |
getCanvas()
|
org.eclipse.jface.viewers.IStructuredContentProvider |
getContentProvider()
|
org.eclipse.swt.widgets.Control |
getControl()
|
(package private) org.eclipse.swt.graphics.Image |
getImage()
|
java.util.Comparator |
getLabelComparator()
|
org.eclipse.jface.viewers.ILabelProvider |
getLabelProvider()
|
org.eclipse.jface.viewers.ISelection |
getSelection()
Returns the current selection for this provider. |
void |
gotoMarker(org.eclipse.core.resources.IMarker marker)
|
private void |
highlightSelection()
|
void |
init(org.eclipse.ui.IEditorSite site,
org.eclipse.ui.IEditorInput input)
Initializes this editor with the given editor site and input. |
boolean |
isDirty()
Returns whether the contents of this part have changed since the last save operation. |
boolean |
isSaveAsAllowed()
Returns whether the "Save As" operation is supported by this part. |
boolean |
isSaveOnCloseNeeded()
Returns whether the contents of this part should be saved when the part is closed. |
void |
keyPressed(org.eclipse.swt.events.KeyEvent e)
Sent when a key is pressed on the system keyboard. |
void |
keyReleased(org.eclipse.swt.events.KeyEvent e)
Sent when a key is released on the system keyboard. |
private com.port80.graph.IGraph |
loadGraph(org.eclipse.ui.IEditorInput input)
|
void |
refresh()
|
void |
removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
Removes the given selection change listener from this selection provider. |
void |
setFocus()
Asks this part to take focus within the workbench. |
void |
setInput(org.eclipse.ui.IEditorInput input)
Sets the input to this editor. |
void |
setSelection(org.eclipse.jface.viewers.ISelection selection)
Sets the current selection for this selection provider. |
void |
setSelection(org.eclipse.jface.viewers.IStructuredSelection selection,
boolean reveal)
|
(package private) void |
showPopup(org.eclipse.swt.events.MenuEvent e)
|
| Methods inherited from class org.eclipse.ui.part.EditorPart |
getEditorInput, getEditorSite, getTitleToolTip, setContentDescription, setInitializationData, setPartName |
| Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
addPropertyListener, dispose, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getPartName, getSite, getTitle, getTitleImage, removePropertyListener, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.ui.IWorkbenchPart |
addPropertyListener, dispose, getSite, getTitle, getTitleImage, removePropertyListener |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
getAdapter |
| Field Detail |
NAME
private static final java.lang.String NAME
- See Also:
- Constant Field Values
DEBUG
private static final boolean DEBUG
- See Also:
- Constant Field Values
SEED
private static final int SEED
- See Also:
- Constant Field Values
PASSES
private static final int PASSES
- See Also:
- Constant Field Values
ALPHA_HIGHLIGHT
private static final int ALPHA_HIGHLIGHT
- See Also:
- Constant Field Values
COLOR_HIGHLIGHT
private static final int COLOR_HIGHLIGHT
- See Also:
- Constant Field Values
fGraph
private com.port80.graph.IGraph fGraph
fFilepath
private java.lang.String fFilepath
fImage
private org.eclipse.swt.graphics.Image fImage
fPopup
private org.eclipse.swt.widgets.Menu fPopup
fStatusLine
private com.port80.swt.widgets.IStatusLine fStatusLine
fCanvas
private com.port80.swt.widgets.ScrolledCanvas fCanvas
fContentProvider
private GraphViewer.GraphContentProvider fContentProvider
fLabelProvider
private GraphViewer.GraphLabelProvider fLabelProvider
fLabelComparator
private GraphViewer.GraphLabelComparator fLabelComparator
fSelection
private java.util.List fSelection
fSelectionListeners
private java.util.List fSelectionListeners
fDirty
private boolean fDirty
fBeginFindSession
private boolean fBeginFindSession
fForwardFind
private boolean fForwardFind
fSelectedRegions
private java.util.List fSelectedRegions
- The list of ImageRegionInfo of the selected regions in the back buffer.
When region is deselected, image is restore into the back buffer.
| Constructor Detail |
GraphViewer
public GraphViewer()
| Method Detail |
doSave
public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
- Description copied from interface:
org.eclipse.ui.ISaveablePart - Saves the contents of this part.
If the save is successful, the part should fire a property changed event reflecting the new dirty state (
PROP_DIRTYproperty).If the save is cancelled through user action, or for any other reason, the part should invoke
setCancelledon theIProgressMonitorto inform the caller.This method is long-running; progress and cancellation are provided by the given progress monitor.
- Specified by:
doSavein interfaceorg.eclipse.ui.ISaveablePart
doSaveAs
public void doSaveAs()
- Description copied from interface:
org.eclipse.ui.ISaveablePart - Saves the contents of this part to another object.
Implementors are expected to open a "Save As" dialog where the user will be able to select a new name for the contents. After the selection is made, the contents should be saved to that new name. During this operation a
IProgressMonitorshould be used to indicate progress.If the save is successful, the part fires a property changed event reflecting the new dirty state (
PROP_DIRTYproperty).- Specified by:
doSaveAsin interfaceorg.eclipse.ui.ISaveablePart
gotoMarker
public void gotoMarker(org.eclipse.core.resources.IMarker marker)
init
public void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput input) throws org.eclipse.ui.PartInitException
- Description copied from interface:
org.eclipse.ui.IEditorPart - Initializes this editor with the given editor site and input.
This method is automatically called shortly after the part is instantiated. It marks the start of the part's lifecycle. The IWorkbenchPart.dispose 55 method will be called automically at the end of the lifecycle. Clients must not call this method.
Implementors of this method must examine the editor input object type to determine if it is understood. If not, the implementor must throw a
PartInitException- Specified by:
initin interfaceorg.eclipse.ui.IEditorPart
setInput
public void setInput(org.eclipse.ui.IEditorInput input)
- Description copied from class:
org.eclipse.ui.part.EditorPart - Sets the input to this editor.
isDirty
public boolean isDirty()
- Description copied from interface:
org.eclipse.ui.ISaveablePart - Returns whether the contents of this part have changed since the last save
operation. If this value changes the part must fire a property listener
event with
PROP_DIRTY.- Specified by:
isDirtyin interfaceorg.eclipse.ui.ISaveablePart
isSaveAsAllowed
public boolean isSaveAsAllowed()
- Description copied from interface:
org.eclipse.ui.ISaveablePart - Returns whether the "Save As" operation is supported by this part.
- Specified by:
isSaveAsAllowedin interfaceorg.eclipse.ui.ISaveablePart
createPartControl
public void createPartControl(org.eclipse.swt.widgets.Composite parent)
- Description copied from interface:
org.eclipse.ui.IWorkbenchPart - Creates the SWT controls for this workbench part.
Clients should not call this method (the workbench calls this method when it needs to, which may be never).
For implementors this is a multi-step process:
- Create one or more controls within the parent.
- Set the parent layout as needed.
- Register any global actions with the
IActionService. - Register any popup menus with the
IActionService. - Register a selection provider with the
ISelectionService(optional).
- Specified by:
createPartControlin interfaceorg.eclipse.ui.IWorkbenchPart
setFocus
public void setFocus()
- Description copied from interface:
org.eclipse.ui.IWorkbenchPart - Asks this part to take focus within the workbench.
Clients should not call this method (the workbench calls this method at appropriate times). To have the workbench activate a part, use
IWorkbenchPage.activate(IWorkbenchPart) instead.- Specified by:
setFocusin interfaceorg.eclipse.ui.IWorkbenchPart
isSaveOnCloseNeeded
public boolean isSaveOnCloseNeeded()
- Description copied from interface:
org.eclipse.ui.ISaveablePart - Returns whether the contents of this part should be saved when the part
is closed.
- Specified by:
isSaveOnCloseNeededin interfaceorg.eclipse.ui.ISaveablePart
getContentProvider
public org.eclipse.jface.viewers.IStructuredContentProvider getContentProvider()
- Specified by:
getContentProviderin interfacecom.port80.swt.widgets.IGraphViewer
getLabelProvider
public org.eclipse.jface.viewers.ILabelProvider getLabelProvider()
- Specified by:
getLabelProviderin interfacecom.port80.swt.widgets.IGraphViewer
getLabelComparator
public java.util.Comparator getLabelComparator()
- Specified by:
getLabelComparatorin interfacecom.port80.swt.widgets.IGraphViewer
getControl
public org.eclipse.swt.widgets.Control getControl()
- Specified by:
getControlin interfacecom.port80.swt.widgets.IGraphViewer
refresh
public void refresh()
getCanvas
com.port80.swt.widgets.ScrolledCanvas getCanvas()
getImage
org.eclipse.swt.graphics.Image getImage()
setSelection
public void setSelection(org.eclipse.jface.viewers.ISelection selection)
- Description copied from interface:
org.eclipse.jface.viewers.ISelectionProvider - Sets the current selection for this selection provider.
- Specified by:
setSelectionin interfaceorg.eclipse.jface.viewers.ISelectionProvider
setSelection
public void setSelection(org.eclipse.jface.viewers.IStructuredSelection selection, boolean reveal)
- Specified by:
setSelectionin interfacecom.port80.swt.widgets.IGraphViewer
getSelection
public org.eclipse.jface.viewers.ISelection getSelection()
- Description copied from interface:
org.eclipse.jface.viewers.ISelectionProvider - Returns the current selection for this provider.
- Specified by:
getSelectionin interfaceorg.eclipse.jface.viewers.ISelectionProvider
addSelectionChangedListener
public void addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
- Description copied from interface:
org.eclipse.jface.viewers.ISelectionProvider - Adds a listener for selection changes in this selection provider.
Has no effect if an identical listener is already registered.
- Specified by:
addSelectionChangedListenerin interfaceorg.eclipse.jface.viewers.ISelectionProvider
removeSelectionChangedListener
public void removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
- Description copied from interface:
org.eclipse.jface.viewers.ISelectionProvider - Removes the given selection change listener from this selection provider.
Has no affect if an identical listener is not registered.
- Specified by:
removeSelectionChangedListenerin interfaceorg.eclipse.jface.viewers.ISelectionProvider
deHighlightSelection
private void deHighlightSelection()
highlightSelection
private void highlightSelection()
keyPressed
public void keyPressed(org.eclipse.swt.events.KeyEvent e)
- Description copied from interface:
org.eclipse.swt.events.KeyListener - Sent when a key is pressed on the system keyboard.
- Specified by:
keyPressedin interfaceorg.eclipse.swt.events.KeyListener
keyReleased
public void keyReleased(org.eclipse.swt.events.KeyEvent e)
- Description copied from interface:
org.eclipse.swt.events.KeyListener - Sent when a key is released on the system keyboard.
- Specified by:
keyReleasedin interfaceorg.eclipse.swt.events.KeyListener
loadGraph
private com.port80.graph.IGraph loadGraph(org.eclipse.ui.IEditorInput input)
createPopup
private org.eclipse.swt.widgets.Menu createPopup()
showPopup
void showPopup(org.eclipse.swt.events.MenuEvent e)
beginIncrementalFind
void beginIncrementalFind(boolean forward)
|
|||||||||
| Home >> All >> com >> port80 >> eclipse >> jdt >> graph >> [ views overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC