Class UnoTypeBrowser
java.lang.Object
org.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.eclipse.jface.dialogs.TrayDialog
org.eclipse.jface.dialogs.StatusDialog
org.libreoffice.ide.eclipse.core.unotypebrowser.UnoTypeBrowser
- All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider,IFieldChangedListener,IInitListener
public class UnoTypeBrowser
extends org.eclipse.jface.dialogs.StatusDialog
implements IFieldChangedListener, IInitListener
A dialog to browse UNO types. This class doesn't launch the types query: this job is performed by the UNO type
provider to avoid very slow window rendering.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler -
Field Summary
Fields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSISFields inherited from class org.eclipse.jface.window.Window
CANCEL, OK, resizeHasOccurred -
Constructor Summary
ConstructorsConstructorDescriptionUnoTypeBrowser(org.eclipse.swt.widgets.Shell parentShell, int allowedTypes) Creates a new browser dialog. -
Method Summary
Modifier and TypeMethodDescriptionvoidactivateFields(boolean activate) Method to activate or unactivate the dialog fields.protected voidcreateButtonsForButtonBar(org.eclipse.swt.widgets.Composite pParent) protected org.eclipse.swt.widgets.ControlcreateDialogArea(org.eclipse.swt.widgets.Composite pParent) voidfieldChanged(FieldEvent event) Method called when the row has changed.voidMethod called when theUnoTypeProvideris initialized.protected voidvoidsetSelectedType(InternalUnoType pType) Set the type selected in the list.Methods inherited from class org.eclipse.jface.dialogs.StatusDialog
configureShell, create, createButtonBar, getStatus, setImage, setStatusLineAboveButtons, setTitle, updateButtonsEnableState, updateStatusMethods inherited from class org.eclipse.jface.dialogs.TrayDialog
closeTray, createHelpControl, getLayout, getTray, handleShellCloseEvent, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailableMethods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, createButton, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, isResizable, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenTextMethods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
-
Constructor Details
-
UnoTypeBrowser
public UnoTypeBrowser(org.eclipse.swt.widgets.Shell parentShell, int allowedTypes) Creates a new browser dialog. The browser, waits for the type provider to finish its work if it's not already over.- Parameters:
parentShell- the shell where to create the dialogallowedTypes- the bit-ORed allowed types
-
-
Method Details
-
createButtonsForButtonBar
protected void createButtonsForButtonBar(org.eclipse.swt.widgets.Composite pParent) - Overrides:
createButtonsForButtonBarin classorg.eclipse.jface.dialogs.StatusDialog
-
createDialogArea
protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite pParent) - Overrides:
createDialogAreain classorg.eclipse.jface.dialogs.Dialog
-
initialized
public void initialized()Method called when theUnoTypeProvideris initialized.- Specified by:
initializedin interfaceIInitListener
-
activateFields
public void activateFields(boolean activate) Method to activate or unactivate the dialog fields. This method should be used when long operations are performed.- Parameters:
activate-trueto activate all the fields,falseto set the fields as not active.
-
okPressed
protected void okPressed()- Overrides:
okPressedin classorg.eclipse.jface.dialogs.Dialog
-
fieldChanged
Method called when the row has changed.- Specified by:
fieldChangedin interfaceIFieldChangedListener- Parameters:
event- the field event thrown
-
getSelectedType
- Returns:
- the selected
InternalUnoType.
-
setSelectedType
Set the type selected in the list.- Parameters:
pType- the type which should be selected
-