org.jdesktop.swingx.painter.effects
Class NeonBorderEffect
- java.lang.Object
-
- org.jdesktop.swingx.painter.effects.AbstractAreaEffect
-
- org.jdesktop.swingx.painter.effects.NeonBorderEffect
-
- All Implemented Interfaces:
- AreaEffect
public class NeonBorderEffect extends AbstractAreaEffect
An effect which draws a multicolored border around a painter's shape. It will interpolate between two specified colors, creating a neon like effect.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classNeonBorderEffect.BorderPositionAn enum representing the position of the border: inside, outside, or centered on the border.
-
Constructor Summary
Constructors Constructor and Description NeonBorderEffect()Create a new NeonBorderEffectNeonBorderEffect(java.awt.Color edgeColor, java.awt.Color centerColor, int effectWidth)Creates a new instance of NeonBorderEffect
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description NeonBorderEffect.BorderPositiongetBorderPosition()java.awt.ColorgetCenterColor()java.awt.ColorgetEdgeColor()Gets the current edge color.voidsetBorderPosition(NeonBorderEffect.BorderPosition borderPosition)voidsetCenterColor(java.awt.Color centerColor)voidsetEdgeColor(java.awt.Color edgeColor)Set the edge color-
Methods inherited from class org.jdesktop.swingx.painter.effects.AbstractAreaEffect
addPropertyChangeListener, apply, getBrushColor, getBrushSteps, getEffectWidth, getOffset, isRenderInsideShape, isShapeMasked, isShouldFillShape, removePropertyChangeListener, setBrushColor, setBrushSteps, setEffectWidth, setOffset, setRenderInsideShape, setShapeMasked, setShouldFillShape
-
-
-
-
Constructor Detail
-
NeonBorderEffect
public NeonBorderEffect()
Create a new NeonBorderEffect
-
NeonBorderEffect
public NeonBorderEffect(java.awt.Color edgeColor, java.awt.Color centerColor, int effectWidth)Creates a new instance of NeonBorderEffect
-
-
Method Detail
-
getEdgeColor
public java.awt.Color getEdgeColor()
Gets the current edge color.- Returns:
- current edge color
-
setEdgeColor
public void setEdgeColor(java.awt.Color edgeColor)
Set the edge color- Parameters:
edgeColor-
-
getCenterColor
public java.awt.Color getCenterColor()
- Returns:
- color in the center of the effect
-
setCenterColor
public void setCenterColor(java.awt.Color centerColor)
- Parameters:
centerColor- color in the center of the effect.- See Also:
getCenterColor()
-
getBorderPosition
public NeonBorderEffect.BorderPosition getBorderPosition()
- Returns:
- position of the border relative to the edge of painter covered area.
- See Also:
NeonBorderEffect.BorderPosition
-
setBorderPosition
public void setBorderPosition(NeonBorderEffect.BorderPosition borderPosition)
- Parameters:
borderPosition- position of the border relative to the edge of painter covered area.- See Also:
getBorderPosition(),NeonBorderEffect.BorderPosition
-
-
DataMelt 3.0 © DataMelt by jWork.ORG