# AbstractStyle

Import: `import com.install4j.api.styles.AbstractStyle;`

```java
public abstract class AbstractStyle extends AbstractBean implements Style
```

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.

## Inherited from

- [AbstractBean](../beans/AbstractBean.md) — 22 methods
- [Style](Style.md) — 6 methods
- [VisualContainerBean](../beans/VisualContainerBean.md) — 3 methods
- [StyleContextReceiver](StyleContextReceiver.md) — 1 methods
- [ControlButtonContainer](ControlButtonContainer.md) — 4 methods

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`setContext(Context)`](#setcontext-context) | `void` |  |
| [`isStandalone()`](#isstandalone) | `boolean` |  |
| [`willActivate()`](#willactivate) | `void` |  |
| [`activated()`](#activated) | `void` |  |
| [`deactivated()`](#deactivated) | `void` |  |
| [`getContext()`](#getcontext) | `Context` | Returns the [`Context`](../context/Context.md) that the framework has associated with this style in [`AbstractStyle.setContext`](AbstractStyle.md#setcontext-context). |
| [`getStyleManager()`](#getstylemanager) | `StyleManager` | Returns the [`StyleManager`](StyleManager.md). |
| [`getAnchor()`](#getanchor) | `Anchor` | Returns a default value for the anchor of the screen style component. |

### setContext(Context)

```java
public void setContext(Context context)
```

### isStandalone()

```java
public boolean isStandalone()
```

### willActivate()

```java
public void willActivate()
```

### activated()

```java
public void activated()
```

### deactivated()

```java
public void deactivated()
```

### getContext()

```java
public Context getContext()
```

Returns the [`Context`](../context/Context.md) that the framework has associated with
this style in [`AbstractStyle.setContext`](AbstractStyle.md#setcontext-context).


**Returns:** the context.

### getStyleManager()

```java
public StyleManager getStyleManager()
```

Returns the [`StyleManager`](StyleManager.md). This is a convenience method and calls
`getContext().getWizardContext().getStyleManager()`.


**Returns:** the screen style manager

### getAnchor()

```java
public Anchor getAnchor()
```

Returns a default value for the anchor of the screen style component.


**Returns:** [`Anchor.NORTHWEST`](../beans/Anchor.md#northwest)

**See also:**

- [VisualContainerBean.getAnchor](../beans/VisualContainerBean.md#getanchor)

## Constructors

| Signature | Description |
|---|---|
| [`AbstractStyle()`](#abstractstyle) |  |

### AbstractStyle()

```java
public AbstractStyle()
```

