I
- Icon
typepublic abstract class AbstractIconSource<I extends Icon> extends Object implements IconSource<I>
IconSource
implementation containing basic Icon
information.
Implements Overwriting
instead of Mergeable
to avoid merging any IconSource
s ever.IconManager
,
ImageIconSource
,
SvgIconSource
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected List<IconAdjustment<I>> |
adjustments
IconAdjustment to be applied on loaded Icon for the final result. |
protected String |
id
Unique
Icon identifier. |
protected Resource |
resource
|
ID_PREFIX
Constructor and Description |
---|
AbstractIconSource(String id,
Resource resource)
Constructs new
AbstractIconSource . |
AbstractIconSource(String id,
Resource resource,
IconAdjustment<I>... adjustments)
Constructs new
AbstractIconSource . |
AbstractIconSource(String id,
Resource resource,
List<IconAdjustment<I>> adjustments)
Constructs new
AbstractIconSource . |
Modifier and Type | Method and Description |
---|---|
String |
getId() |
Resource |
getResource()
|
boolean |
isOverwrite() |
I |
loadIcon()
Returns
Icon described by this IconSource . |
protected abstract I |
loadIcon(Resource resource)
|
@NotNull @XStreamAsAttribute protected final String id
Icon
identifier.
Used to access icon through IconManager
.@Nullable protected List<IconAdjustment<I extends Icon>> adjustments
IconAdjustment
to be applied on loaded Icon
for the final result.public AbstractIconSource(@NotNull String id, @NotNull Resource resource)
AbstractIconSource
.public AbstractIconSource(@NotNull String id, @NotNull Resource resource, @NotNull IconAdjustment<I>... adjustments)
AbstractIconSource
.id
- unique Icon
identifierresource
- Resource
containing Icon
adjustments
- IconAdjustment
spublic AbstractIconSource(@NotNull String id, @NotNull Resource resource, @Nullable List<IconAdjustment<I>> adjustments)
AbstractIconSource
.id
- unique Icon
identifierresource
- Resource
containing Icon
adjustments
- List
of IconAdjustment
s@NotNull public String getId()
getId
in interface Identifiable
public boolean isOverwrite()
isOverwrite
in interface Overwriting
@NotNull public Resource getResource()
IconSource
getResource
in interface IconSource<I extends Icon>
Resource
containing Icon
@NotNull public I loadIcon()
IconSource
Icon
described by this IconSource
.loadIcon
in interface IconSource<I extends Icon>
Icon
described by this IconSource
Copyright © 2020. All rights reserved.