Class ViewersComposite
- java.lang.Object
-
- net.officefloor.gef.editor.internal.views.ViewersComposite
-
- All Implemented Interfaces:
AdaptedErrorHandler
public class ViewersComposite extends java.lang.Object implements AdaptedErrorHandler
Composite of the viewers.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.officefloor.gef.editor.AdaptedErrorHandler
AdaptedErrorHandler.MessageOnlyException, AdaptedErrorHandler.UncertainOperation
-
-
Constructor Summary
Constructors Constructor Description ViewersComposite(org.eclipse.gef.mvc.fx.viewer.IViewer contentViewer, org.eclipse.gef.mvc.fx.viewer.IViewer paletteViewer, SelectOnly selectOnly)Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javafx.scene.layout.PanegetComposite()Obtains thePanecontaining the view.javafx.scene.layout.PanegetPaletteIndicator()Obtains the palette indicatorPane.voidinit(boolean isCreateParents)Initialises.booleanisError(AdaptedErrorHandler.UncertainOperation operation)voidloadComplete()Indicates loading complete so may show errors.voidshowError(java.lang.String message)Shows the error.voidshowError(java.lang.Throwable error)Shows the error.
-
-
-
Constructor Detail
-
ViewersComposite
public ViewersComposite(org.eclipse.gef.mvc.fx.viewer.IViewer contentViewer, org.eclipse.gef.mvc.fx.viewer.IViewer paletteViewer, SelectOnly selectOnly)Instantiate.- Parameters:
contentViewer-IViewerfor the editor.paletteViewer-IViewerfor the palette.selectOnly-SelectOnly. May benull.
-
-
Method Detail
-
init
public void init(boolean isCreateParents)
Initialises.- Parameters:
isCreateParents- Flag indicate whether able to createAdaptedParentinstances.
-
getPaletteIndicator
public javafx.scene.layout.Pane getPaletteIndicator()
Obtains the palette indicatorPane.- Returns:
- Palette indicator
Pane.
-
getComposite
public javafx.scene.layout.Pane getComposite()
Obtains thePanecontaining the view.- Returns:
Panecontaining the view.
-
loadComplete
public void loadComplete()
Indicates loading complete so may show errors.
-
showError
public void showError(java.lang.String message)
Description copied from interface:AdaptedErrorHandlerShows the error.- Specified by:
showErrorin interfaceAdaptedErrorHandler- Parameters:
message- Error message to show.
-
showError
public void showError(java.lang.Throwable error)
Description copied from interface:AdaptedErrorHandlerShows the error.- Specified by:
showErrorin interfaceAdaptedErrorHandler- Parameters:
error-Throwableerror to show.
-
isError
public boolean isError(AdaptedErrorHandler.UncertainOperation operation)
Description copied from interface:AdaptedErrorHandlerRuns anAdaptedErrorHandler.UncertainOperation.UncertainOperation operation = () -> { ... }; if (handler.isError(operation) { return; // failure in operation }- Specified by:
isErrorin interfaceAdaptedErrorHandler- Parameters:
operation-AdaptedErrorHandler.UncertainOperation.- Returns:
trueifAdaptedErrorHandler.UncertainOperationthrew anException. TheExceptionwill displayed visually to the user.
-
-