Package snap.gfx
Class Borders.LineBorder
java.lang.Object
snap.props.PropObject
snap.gfx.Border
snap.gfx.Borders.LineBorder
- All Implemented Interfaces:
Cloneable
,PropChange.DoChange
,XMLArchiver.Archivable
- Direct Known Subclasses:
Borders.EdgeBorder
- Enclosing class:
- Borders
A subclass for line border.
-
Field Summary
Fields inherited from class snap.gfx.Border
Color_Prop, Insets_Prop, PaintAbove_Prop, Stroke_Prop
Fields inherited from class snap.props.PropObject
_pcs, EMPTY_OBJECT
-
Constructor Summary
ConstructorDescriptionCreates lineBorder.LineBorder
(Color aColor, double aWidth) Creates lineBorder.LineBorder
(Color aColor, Stroke aStroke) Creates lineBorder. -
Method Summary
Modifier and TypeMethodDescriptionprotected Borders.LineBorder
clone()
Override to return as LineBorder.copyForColor
(Color aColor) Returns copy of this border with new color.copyForStroke
(Stroke aStroke) Returns copy of this border with new stroke width.copyForStrokeWidth
(double aWidth) Returns copy of this border with new stroke width.protected Insets
Creates the insets.boolean
Standard equals implementation.fromXML
(XMLArchiver anArchiver, XMLElement anElement) XML Unarchival.getColor()
Returns color.Returns the stroke.double
getWidth()
Returns the width.void
Paint border.toString()
Standard toString implementation.toXML
(XMLArchiver anArchiver) XML Archival.Methods inherited from class snap.gfx.Border
blackBorder, copyFor, copyForInsets, createLineBorder, createLoweredBevelBorder, emptyBorder, getInsets, getName, getPropValue, initProps, isPaintAbove, of, setPropValue
Methods inherited from class snap.props.PropObject
addDeepChangeListener, addPropChangeListener, addPropChangeListener, firePropChange, firePropChange, firePropChange, getPropDefault, getPropForName, getPropParent, getPropSet, getPropsForArchival, getPropsForArchivalExtra, getPropsString, isPropDefault, processPropChange, removeDeepChangeListener, removePropChangeListener, removePropChangeListener, setPropsString, setPropValues, toStringProps
-
Constructor Details
-
LineBorder
public LineBorder()Creates lineBorder. -
LineBorder
Creates lineBorder. -
LineBorder
Creates lineBorder.
-
-
Method Details
-
getColor
Returns color. -
getWidth
public double getWidth()Returns the width. -
getStroke
Returns the stroke. -
createInsets
Creates the insets.- Overrides:
createInsets
in classBorder
-
paint
Paint border. -
copyForColor
Returns copy of this border with new color.- Overrides:
copyForColor
in classBorder
-
copyForStrokeWidth
Returns copy of this border with new stroke width.- Overrides:
copyForStrokeWidth
in classBorder
-
copyForStroke
Returns copy of this border with new stroke width.- Overrides:
copyForStroke
in classBorder
-
clone
Override to return as LineBorder. -
equals
Standard equals implementation. -
toXML
XML Archival.- Specified by:
toXML
in interfaceXMLArchiver.Archivable
- Overrides:
toXML
in classBorder
-
fromXML
XML Unarchival.- Specified by:
fromXML
in interfaceXMLArchiver.Archivable
- Overrides:
fromXML
in classBorder
-
toString
Standard toString implementation.- Overrides:
toString
in classPropObject
-