Class CustomView
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.ViewPart
com.eco.bio7.collection.CustomView
- All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IPersistable, org.eclipse.ui.IViewPart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation
public class CustomView
extends org.eclipse.ui.part.ViewPart
This class provides some static methods for the creation of custom views
inside the Bio7 application.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.eclipse.ui.IViewPartprotected intprotected booleanFields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreatePartControl(org.eclipse.swt.widgets.Composite parent) org.eclipse.swt.widgets.CompositegetComposite(String id) Returns a SWT composite and creates a custom view with a tab.org.eclipse.swt.widgets.CompositegetComposite(String id, org.eclipse.swt.graphics.Image image) Returns a SWT composite and creates a custom view with a tab.protected org.eclipse.swt.widgets.Compositestatic org.eclipse.swt.widgets.DisplayReturns the display of the view.org.eclipse.draw2d.LightweightSystemReturns a Draw2d LightweightSystem and creates a custom view with a tab.org.eclipse.draw2d.LightweightSystemReturns a Draw2d LightweightSystem and creates a custom view with a tab.booleanReturns true if the view is displayed in fullscreen mode.booleanReturns true if the view can be displayed in fullscreen mode.protected voidsetAwtCurrent(Panel current) protected voidsetCustomViewParent(org.eclipse.swt.widgets.Composite parent2) voidsetFocus()voidsetFullscreen(boolean fullscreen) Displays the view in fullscreen mode or returns to the view.voidsetFullscreen(int monitor) Displays the view in fullscreen mode on the given monitor or moves the fullscreen mode to the monitor.voidsetFullscreenEnabled(boolean enabled) Enables or disables the fullscreen mode of this view (the tool bar action and the keys F2 to F5), e.g., for a view with a tool window (UI thread).voidCreates a given Panel tab inside a custom view.voidCreates a given Panel tab inside a custom view.voidCreates a given JPanel tab inside a custom view.voidCreates a given JPanel tab inside a custom view.voidsetSingleView(boolean singleView) Methods inherited from class org.eclipse.ui.part.ViewPart
checkSite, getViewSite, init, init, saveState, setContentDescription, setInitializationData, setPartNameMethods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, dispose, firePartPropertyChanged, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusyMethods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
-
Field Details
-
insertMark
protected int insertMark -
activated
protected org.eclipse.ui.IViewPart activated -
singleView
protected boolean singleView
-
-
Constructor Details
-
CustomView
public CustomView() -
CustomView
-
-
Method Details
-
createPartControl
public void createPartControl(org.eclipse.swt.widgets.Composite parent) - Specified by:
createPartControlin interfaceorg.eclipse.ui.IWorkbenchPart- Specified by:
createPartControlin classorg.eclipse.ui.part.WorkbenchPart
-
setFullscreenEnabled
public void setFullscreenEnabled(boolean enabled) Enables or disables the fullscreen mode of this view (the tool bar action and the keys F2 to F5), e.g., for a view with a tool window (UI thread). -
isFullscreenEnabled
public boolean isFullscreenEnabled()Returns true if the view can be displayed in fullscreen mode. -
setFocus
public void setFocus()- Specified by:
setFocusin interfaceorg.eclipse.ui.IWorkbenchPart- Specified by:
setFocusin classorg.eclipse.ui.part.WorkbenchPart
-
setPanel
-
setPanel
-
setPanel
-
setPanel
-
getComposite
Returns a SWT composite and creates a custom view with a tab.- Parameters:
id- the id and name of the tab.- Returns:
- a swt composite.
-
getComposite
public org.eclipse.swt.widgets.Composite getComposite(String id, org.eclipse.swt.graphics.Image image) Returns a SWT composite and creates a custom view with a tab.- Parameters:
id- the id and name of the tab.image- the image of the tab.- Returns:
- a swt composite.
-
getDraw2d
Returns a Draw2d LightweightSystem and creates a custom view with a tab.- Parameters:
id- the id and name of the tab.- Returns:
- a LightweightSystem component.
-
getDraw2d
public org.eclipse.draw2d.LightweightSystem getDraw2d(String id, org.eclipse.swt.graphics.Image image) Returns a Draw2d LightweightSystem and creates a custom view with a tab.- Parameters:
id- the id and name of the tab.image- the image of the tab.- Returns:
- a LightweightSystem component.
-
getDisplay
public static org.eclipse.swt.widgets.Display getDisplay()Returns the display of the view.- Returns:
- the display of the view.
-
setAwtCurrent
-
getCustomViewParent
protected org.eclipse.swt.widgets.Composite getCustomViewParent() -
setCustomViewParent
protected void setCustomViewParent(org.eclipse.swt.widgets.Composite parent2) -
setFullscreen
public void setFullscreen(boolean fullscreen) Displays the view in fullscreen mode or returns to the view. Several views can be displayed in fullscreen mode, one per monitor (another view on the monitor is replaced). The fullscreen mode can also be toggled with the F2 key and closed with the ESC key.- Parameters:
fullscreen- true to display the view in fullscreen mode.
-
setFullscreen
public void setFullscreen(int monitor) Displays the view in fullscreen mode on the given monitor or moves the fullscreen mode to the monitor. The monitors are numbered with the primary monitor first (0: primary, 1: secondary, 2: tertiary monitor, etc.). If the monitor is not available the view is displayed on the monitor of the view.- Parameters:
monitor- the index of the monitor.
-
isFullscreen
public boolean isFullscreen()Returns true if the view is displayed in fullscreen mode.- Returns:
- true if the view is displayed in fullscreen mode.
-
setSingleView
public void setSingleView(boolean singleView)
-