Package com.solibri.smc.api.ui
Interface View
- All Known Subinterfaces:
CheckingResultsView
,CheckingView
,IssuesView
public interface View
A View defines a custom view that can be shown in the software.
- Since:
- 9.10.8
-
Method Summary
Modifier and TypeMethodDescriptiondefault Icon
getIcon()
Returns the icon for the view.default String
getLocalizedResource(String key)
This method returns the localized resource from the properties files for the specified key.default String
getName()
The internationalized name of the view.The toolbar of the view.The unique ID of the view.void
initializePanel(JPanel panel)
This method is used for initializing the contents inside the view.default boolean
This method should be implemented if a view needs to do exit cleanup when the application is closing.default void
onBasketSelectionChanged(Set<Component> oldSelection, Set<Component> newSelection)
Action to take when a the selection basket contents change.default void
Action to take when checking has finished.default void
Action to take when checking is about to start.default void
onComponentChosen(Component component)
Action to take when the user chooses a component from the UI.default void
onComponentsHidden(Collection<Component> components)
Action to take when the user zooms hides some components from the UI.default void
onComponentsZoomedTo(Collection<Component> components)
Action to take when the user zooms to some components from the UI.default void
Action to take when information takeoff has finished.default void
Action to take when information takeoff has been triggered.default void
Action to take when a previously opened model is closed.default void
onModelLoaded(Model model)
Action to take when a model is loaded to the software.default void
onModelModified(Model model)
Action to take when a model is changed in some way.default void
onRulesetAdded(Ruleset ruleset)
Action to take when a new ruleset is added to the model.default void
onRulesetRemoved(Ruleset ruleset)
Action to take when a new ruleset is removed from the model.default void
Action to take when the setting have been changed.default void
onSubModelAdded(Model model)
Action to take when a submodel is added from an IFC source.default void
onSubModelUpdated(Model model)
Action to take when a submodel is updated from an IFC source.
-
Method Details
-
getUniqueId
String getUniqueId()The unique ID of the view.- Returns:
- the ID of the view
- Since:
- 9.10.8
-
getName
The internationalized name of the view. The default implementation returns value based on properties files value with key "NAME". Returns the ID of the view if no property is found.- Returns:
- the name of the view
- Since:
- 9.10.8
-
getIcon
Returns the icon for the view. The default implementation tries to find icon from file called icon.png and uses that if it is found from the same package as the view. If icon.png does not exist, the properties file for the view is searched for property called ICON and the relative path given in that property is used.- Returns:
- the icon
- Since:
- 9.10.8
-
getLocalizedResource
This method returns the localized resource from the properties files for the specified key.- Parameters:
key
- the key for the localized resource- Returns:
- localized resource
- Since:
- 9.12.0
-
getToolBar
The toolbar of the view.- Returns:
- toolbar
- Since:
- 9.12.0
-
initializePanel
This method is used for initializing the contents inside the view. Everything in the view is contained inside a single JPanel. This method is called automatically when the view is being initialized.- Parameters:
panel
- the parent JPanel that holds the contents- Since:
- 9.10.8
-
onApplicationExit
default boolean onApplicationExit()This method should be implemented if a view needs to do exit cleanup when the application is closing. If true is returned when application is allowed to continue shutting down, whereas false should be returned if the shutdown should be canceled. The call to this method blocks the shutdown, so this can be used to display shutdown permission dialog to the user, if a view in a state that requires such. One example of a state like that would be the view having unsaved changes that the user might still want to add to the model.- Returns:
- true if the application is allowed to exit, false otherwise
- Since:
- 9.12.0
-
onModelLoaded
Action to take when a model is loaded to the software. The default implementation does nothing.- Parameters:
model
- the model that has been loaded- Since:
- 9.10.8
-
onSubModelUpdated
Action to take when a submodel is updated from an IFC source. The default implementation does nothing.- Parameters:
model
- the model that has been updated- Since:
- 9.12.0
-
onSubModelAdded
Action to take when a submodel is added from an IFC source. The default implementation does nothing.- Parameters:
model
- the model that has been added- Since:
- 9.12.0
-
onModelClosed
default void onModelClosed()Action to take when a previously opened model is closed. The default implementation does nothing.- Since:
- 9.12.0
-
onModelModified
Action to take when a model is changed in some way. The default implementation does nothing.- Parameters:
model
- the model that has been modified- Since:
- 9.12.0
-
onBasketSelectionChanged
Action to take when a the selection basket contents change. The default implementation does nothing.- Parameters:
oldSelection
- the components that were part of the old selectionnewSelection
- the components that are part of the new selection- Since:
- 9.10.8
-
onCheckingStarted
default void onCheckingStarted()Action to take when checking is about to start. The default implementation does nothing.- Since:
- 9.10.8
-
onCheckingEnded
default void onCheckingEnded()Action to take when checking has finished. The default implementation does nothing.- Since:
- 9.10.8
-
onComponentChosen
Action to take when the user chooses a component from the UI. The default implementation does nothing.- Parameters:
component
- the chosen component- Since:
- 9.10.8
-
onComponentsZoomedTo
Action to take when the user zooms to some components from the UI. The default implementation does nothing.- Parameters:
components
- the zoomed components- Since:
- 9.10.8
-
onComponentsHidden
Action to take when the user zooms hides some components from the UI. The default implementation does nothing.- Parameters:
components
- the hidden components- Since:
- 9.10.8
-
onSettingsChanged
default void onSettingsChanged()Action to take when the setting have been changed. This makes it possible to implement hotloading of new settings in to the view updating the view contents dynamically as settings change. Note that this method being called does not guarantee that any setting actually changed its value. It just means that save action on some setting was triggered.- Since:
- 9.10.8
-
onItoStarted
default void onItoStarted()Action to take when information takeoff has been triggered. This will be usually called before the calculation is done, but there is no guarantee of that, since the call is asynchronous.- Since:
- 9.10.8
-
onItoFinished
default void onItoFinished()Action to take when information takeoff has finished.- Since:
- 9.10.8
-
onRulesetAdded
Action to take when a new ruleset is added to the model.- Parameters:
ruleset
- the newly added ruleset- Since:
- 9.12.1
-
onRulesetRemoved
Action to take when a new ruleset is removed from the model.- Parameters:
ruleset
- the removed ruleset- Since:
- 9.12.1
-