java.lang.Object
- Direct Known Subclasses:
BevelBorderDesc
,CompoundBorderDesc
,EmptyBorderDesc
,EtchedBorderDesc
,LineBorderDesc
,TitledBorderDesc
public abstract class MarginDesc extends GenericDesc<Margin>
The base class for all
MarginDesc
inheritors. This abstract
layer is used to provide the general requirements on this class.
There will be only one MarginDesc
at a time on a
ComponentDesc
instance.
- Since:
- 1.0
- See Also:
ComponentDesc
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
MarginDesc()
Creates a newMarginDesc
-
Method Summary
Modifier and Type Method Description void
applyTo(java.awt.Component component)
Applies the stored options on the given component.abstract javax.swing.border.Border
create()
Tries to create theBorder
.abstract boolean
shouldPlaceBorder()
Methods inherited from class org.proto4j.swing.core.desc.GenericDesc
annotationType, get, getDefinedOptions, getOption, hasOption, keys, put, read, read
-
Constructor Details
-
MarginDesc
protected MarginDesc()Creates a newMarginDesc
-
-
Method Details
-
shouldPlaceBorder
public abstract boolean shouldPlaceBorder()- Returns:
true
if aBorder
should be created,false
otherwise
-
create
public abstract javax.swing.border.Border create()Tries to create theBorder
. This method should returnnull
on failure.- Returns:
- the new
Border
instance
-
applyTo
public void applyTo(java.awt.Component component)Applies the stored options on the given component.- Specified by:
applyTo
in classGenericDesc<Margin>
- Parameters:
component
- theComponent
reference
-