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.Pane
getComposite()
Obtains thePane
containing the view.javafx.scene.layout.Pane
getPaletteIndicator()
Obtains the palette indicatorPane
.void
init(boolean isCreateParents)
Initialises.boolean
isError(AdaptedErrorHandler.UncertainOperation operation)
void
loadComplete()
Indicates loading complete so may show errors.void
showError(java.lang.String message)
Shows the error.void
showError(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
-IViewer
for the editor.paletteViewer
-IViewer
for the palette.selectOnly
-SelectOnly
. May benull
.
-
-
Method Detail
-
init
public void init(boolean isCreateParents)
Initialises.- Parameters:
isCreateParents
- Flag indicate whether able to createAdaptedParent
instances.
-
getPaletteIndicator
public javafx.scene.layout.Pane getPaletteIndicator()
Obtains the palette indicatorPane
.- Returns:
- Palette indicator
Pane
.
-
getComposite
public javafx.scene.layout.Pane getComposite()
Obtains thePane
containing the view.- Returns:
Pane
containing 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:AdaptedErrorHandler
Shows the error.- Specified by:
showError
in interfaceAdaptedErrorHandler
- Parameters:
message
- Error message to show.
-
showError
public void showError(java.lang.Throwable error)
Description copied from interface:AdaptedErrorHandler
Shows the error.- Specified by:
showError
in interfaceAdaptedErrorHandler
- Parameters:
error
-Throwable
error to show.
-
isError
public boolean isError(AdaptedErrorHandler.UncertainOperation operation)
Description copied from interface:AdaptedErrorHandler
Runs anAdaptedErrorHandler.UncertainOperation
.UncertainOperation operation = () -> { ... }; if (handler.isError(operation) { return; // failure in operation }
- Specified by:
isError
in interfaceAdaptedErrorHandler
- Parameters:
operation
-AdaptedErrorHandler.UncertainOperation
.- Returns:
true
ifAdaptedErrorHandler.UncertainOperation
threw anException
. TheException
will displayed visually to the user.
-
-