Package overit.geocall.platform
Class ThemePackage
java.lang.Object
overit.geocall.platform.Package
overit.geocall.platform.ThemePackage
- All Implemented Interfaces:
Serializable
This class defines a theme package, i.e. a package containing the scss files used to define the application themes.
It is possible to define a theme package by creating a
ThemePackage extension by defining eventually the
position of the package.
Remember to annotate the class with the @Package annotation.
package overit.geocallapp.wfm.theme;
{@literal @}Package
public class WFMThemePackage extends ThemePackage {
// there's no need to define any constructor
}
Or you can define a theme package programmatically by creating a new instance of ThemePackage and registering
it by calling the Layer.setThemePackage(ThemePackage) method.
ThemePackage themePackage = new ThemePackage("overit/geocallapp/wfm/theme/");
layer.setThemePackage(themePackage);
The association between ThemePackage and Layer occurs automatically as long as the class that defines its implementation:
- is positioned within the domain defined by the Layer
- contains the annotation
@Package
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreate a new theme package.ThemePackage(String position) Create a new theme package by explicitly specifying the package position. -
Method Summary
Methods inherited from class overit.geocall.platform.Package
equals, getAlias, getName, getPosition, hashCode, invariant, setAlias, setPosition, validatePosition
-
Field Details
-
owner
-
-
Constructor Details
-
ThemePackage
protected ThemePackage()Create a new theme package. This constructor can be called from class extensions, instead ofThemePackage(String), because it is easier to use since the package containing the scss files is automatically calculated according to the subclass package. -
ThemePackage
Create a new theme package by explicitly specifying the package position. The paths directories must be separated with the/character, they must start without the/character and must end with.
The following example shows the definition of a new theme package, positioned underoverit.geocallapp.wfm.themeThemePackage themePackage = new ThemePackage("overit/geocallapp/wfm/theme/");- Parameters:
position- path that identifies the position of the package containing the scss files. Null value is not allowed.
-
-
Method Details
-
getOwner
- Returns:
- the layer that this package belongs to or null if the package has not yet been registered to any layer
-
setOwner
Set the layer that this package belongs to.- Parameters:
owner- the owner layer
-