Class AbstractStyle
java.lang.Object
com.install4j.api.beans.AbstractBean
com.install4j.api.styles.AbstractStyle
- All Implemented Interfaces:
Bean, VisualContainerBean, ControlButtonContainer, Style, StyleContextReceiver
- Direct Known Subclasses:
WrapperStyle
Abstract base class for styles.
All methods that have a reasonable default answer are overridden in the class.
This class saves the context that is set by the framework and provides a getter for it.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method is called by the framework just after a screen with this screen style has been activated.voidThis method is called by the framework just after a screen with this screen style has been deactivated.Returns a default value for the anchor of the screen style component.Returns theContextthat the framework has associated with this style insetContext(Context).Returns theStyleManager.booleanReturns if the screen style is intended to be applied to installer applications, screens and screen groups.voidsetContext(Context context) This method is called by the framework to set theContextjust after the screen style has been constructed.voidThis method is called by the framework just before a screen with this screen style is activated.Methods inherited from class AbstractBean
executeActionListAsync, executeActionListSync, getTextOverrideValue, replaceVariables, replaceVariables, replaceVariables, replaceVariables, replaceVariables, replaceVariables, replaceVariables, replaceVariables, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, rollbackActionListModifier and TypeMethodDescriptionstatic voidexecuteActionListAsync(ActionList actionList, Object... extraScriptParameters) Asynchronously execute an action list.static booleanexecuteActionListSync(ActionList actionList, Object... extraScriptParameters) Synchronously execute an action list.static <T> TgetTextOverrideValue(Bean bean, String propertyName, Class<T> resultType) Get the value for a property for which a text replacement has been configured in the IDE.static FilereplaceVariables(File file) Replace all installer variables and localization keys in a file name.static File[]replaceVariables(File[] files) Replace all installer variables and localization keys in a file array.static StringreplaceVariables(String value) Same asAbstractBean.replaceVariables(String, ReplacementMode, VariableErrorHandlingDescriptor), withReplacementMode.PLAINas the replacement mode andVariableErrorHandlingDescriptor.DEFAULTas the error handling descriptor.static String[]replaceVariables(String[] values) Same asAbstractBean.replaceVariables(String[], VariableErrorHandlingDescriptor), withVariableErrorHandlingDescriptor.DEFAULTas the error handling descriptor.static String[]replaceVariables(String[] values, VariableErrorHandlingDescriptor errorHandlingDescriptor) Replace all installer variables and localization keys in a string array.static StringreplaceVariables(String value, ReplacementMode replacementMode) Same asAbstractBean.replaceVariables(String, ReplacementMode, VariableErrorHandlingDescriptor), withVariableErrorHandlingDescriptor.DEFAULTas the error handling descriptor.static StringreplaceVariables(String value, ReplacementMode replacementMode, VariableErrorHandlingDescriptor errorHandlingDescriptor) Replace all installer variables and localization keys in a string.static StringreplaceVariables(String value, VariableErrorHandlingDescriptor errorHandlingDescriptor) Same asAbstractBean.replaceVariables(String, ReplacementMode, VariableErrorHandlingDescriptor), withReplacementMode.PLAINas the replacement mode.static <T> TreplaceWithTextOverride(Bean bean, String propertyName, T defaultValue, Class resultType) A convenience method forAbstractBean.getTextOverrideValue(Bean, String, Class)that returns a default value if no replacement has been configured.protected booleanreplaceWithTextOverride(String propertyName, boolean defaultValue) protected bytereplaceWithTextOverride(String propertyName, byte defaultValue) protected charreplaceWithTextOverride(String propertyName, char defaultValue) protected doublereplaceWithTextOverride(String propertyName, double defaultValue) protected floatreplaceWithTextOverride(String propertyName, float defaultValue) protected intreplaceWithTextOverride(String propertyName, int defaultValue) protected longreplaceWithTextOverride(String propertyName, long defaultValue) protected shortreplaceWithTextOverride(String propertyName, short defaultValue) protected <T> TreplaceWithTextOverride(String propertyName, T defaultValue, Class resultType) static voidrollbackActionList(ActionList actionList) Roll back an action list.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ControlButtonContainer
focusControlButton, setControlButtonEnabled, setControlButtonText, setControlButtonVisibleModifier and TypeMethodDescriptionvoidfocusControlButton(ControlButtonType controlButtonType) Called when a control button is focused.voidsetControlButtonEnabled(ControlButtonType controlButtonType, boolean enabled) Called when the enabled state of a control button is changed.voidsetControlButtonText(ControlButtonType controlButtonType, String text) Called when a control button text is changed.voidsetControlButtonVisible(ControlButtonType controlButtonType, boolean visible) Called when the visibility of a control button is changed.Methods inherited from interface Style
createComponentModifier and TypeMethodDescriptionCreate the UI component for the style.Methods inherited from interface StyleContextReceiver
setStyleContextModifier and TypeMethodDescriptionvoidsetStyleContext(StyleContext styleContext) Called by the framework when the current screen changes.Methods inherited from interface VisualContainerBean
isFillHorizontal, isFillVerticalModifier and TypeMethodDescriptionbooleanReturns whether the visual component wants to grow in the horizontal direction.booleanReturns whether the visual component wants to grow in the vertical direction.
-
Constructor Details
-
AbstractStyle
public AbstractStyle()
-
-
Method Details
-
setContext
Description copied from interface:StyleThis method is called by the framework to set theContextjust after the screen style has been constructed. This is either anInstallerContextor anUninstallerContext, depending on whether the screen style is used in an installer or an uninstaller.When nesting other styles, this is the earliest occasion that the screen style manager can be obtained by calling
context.getWizardContext().getStyleManager().- Specified by:
setContextin interfaceStyle- Parameters:
context- the context.
-
isStandalone
public boolean isStandalone()Description copied from interface:StyleReturns if the screen style is intended to be applied to installer applications, screens and screen groups. Only standalone styles are available in the corresponding screen style selectors and can be set as the default style. If this method returnsfalse, the screen style can only be nested into other styles.- Specified by:
isStandalonein interfaceStyle- Returns:
trueorfalse
-
willActivate
public void willActivate()Description copied from interface:StyleThis method is called by the framework just before a screen with this screen style is activated. This call has to be delegated to nested styles by usingStyleManager.willActivate(Style).- Specified by:
willActivatein interfaceStyle- See Also:
-
activated
public void activated()Description copied from interface:StyleThis method is called by the framework just after a screen with this screen style has been activated. This call has to be delegated to nested styles by usingStyleManager.activated(Style) -
deactivated
public void deactivated()Description copied from interface:StyleThis method is called by the framework just after a screen with this screen style has been deactivated. This call has to be delegated to nested styles by usingStyleManager.deactivated(Style)- Specified by:
deactivatedin interfaceStyle
-
getContext
Returns theContextthat the framework has associated with this style insetContext(Context).- Returns:
- the context.
-
getStyleManager
Returns theStyleManager. This is a convenience method and callsgetContext().getWizardContext().getStyleManager().- Returns:
- the screen style manager
-
getAnchor
Returns a default value for the anchor of the screen style component.- Specified by:
getAnchorin interfaceVisualContainerBean- Returns:
Anchor.NORTHWEST- See Also:
-