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 protectedMarginDesc()Creates a newMarginDesc - 
Method Summary
Modifier and Type Method Description voidapplyTo(java.awt.Component component)Applies the stored options on the given component.abstract javax.swing.border.Bordercreate()Tries to create theBorder.abstract booleanshouldPlaceBorder()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:
 trueif aBordershould be created,falseotherwise
 - 
create
public abstract javax.swing.border.Border create()Tries to create theBorder. This method should returnnullon failure.- Returns:
 - the new 
Borderinstance 
 - 
applyTo
public void applyTo(java.awt.Component component)Applies the stored options on the given component.- Specified by:
 applyToin classGenericDesc<Margin>- Parameters:
 component- theComponentreference
 
 -