Class DecoratedResizableIcon
- java.lang.Object
-
- org.pushingpixels.flamingo.api.common.icon.DecoratedResizableIcon
-
- All Implemented Interfaces:
javax.swing.Icon,org.pushingpixels.neon.api.AsynchronousLoading,org.pushingpixels.neon.api.icon.ResizableIcon
public class DecoratedResizableIcon extends java.lang.Object implements org.pushingpixels.neon.api.icon.ResizableIcon, org.pushingpixels.neon.api.AsynchronousLoadingImplementation ofResizableIconthat adds decorations to a main icon.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDecoratedResizableIcon.IconDecoratorIcon decorator interface.
-
Constructor Summary
Constructors Constructor Description DecoratedResizableIcon(org.pushingpixels.neon.api.icon.ResizableIcon delegate)Creates a new decorated icon with no decorators.DecoratedResizableIcon(org.pushingpixels.neon.api.icon.ResizableIcon delegate, DecoratedResizableIcon.IconDecorator... decorators)Creates a new decorated icon.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAsynchronousLoadListener(org.pushingpixels.neon.api.AsynchronousLoadListener l)voidaddIconDecorator(DecoratedResizableIcon.IconDecorator decorator)Adds the specified decorator to the end of the decorator sequence.static org.pushingpixels.neon.api.icon.ResizableIcon.Factoryfactory(org.pushingpixels.neon.api.icon.ResizableIcon.Factory original, DecoratedResizableIcon.IconDecorator... decorators)intgetIconHeight()intgetIconWidth()booleanisLoading()voidpaintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)voidremoveAsynchronousLoadListener(org.pushingpixels.neon.api.AsynchronousLoadListener l)voidremoveIconDecorator(DecoratedResizableIcon.IconDecorator decorator)Removes the specified decorator.voidsetDimension(java.awt.Dimension newDimension)
-
-
-
Constructor Detail
-
DecoratedResizableIcon
public DecoratedResizableIcon(org.pushingpixels.neon.api.icon.ResizableIcon delegate, DecoratedResizableIcon.IconDecorator... decorators)Creates a new decorated icon.- Parameters:
delegate- The main icon.decorators- Icon decorators.
-
DecoratedResizableIcon
public DecoratedResizableIcon(org.pushingpixels.neon.api.icon.ResizableIcon delegate)
Creates a new decorated icon with no decorators. Decorators can be added later withaddIconDecorator(IconDecorator).- Parameters:
delegate- Main icon.
-
-
Method Detail
-
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeightin interfacejavax.swing.Icon
-
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidthin interfacejavax.swing.Icon
-
paintIcon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)- Specified by:
paintIconin interfacejavax.swing.Icon
-
setDimension
public void setDimension(java.awt.Dimension newDimension)
- Specified by:
setDimensionin interfaceorg.pushingpixels.neon.api.icon.ResizableIcon
-
addIconDecorator
public void addIconDecorator(DecoratedResizableIcon.IconDecorator decorator)
Adds the specified decorator to the end of the decorator sequence. If the specified decorator already exists, it is not moved to the end of the sequence.- Parameters:
decorator- Decorator to add.
-
removeIconDecorator
public void removeIconDecorator(DecoratedResizableIcon.IconDecorator decorator)
Removes the specified decorator.- Parameters:
decorator- Decorator to remove.
-
addAsynchronousLoadListener
public void addAsynchronousLoadListener(org.pushingpixels.neon.api.AsynchronousLoadListener l)
- Specified by:
addAsynchronousLoadListenerin interfaceorg.pushingpixels.neon.api.AsynchronousLoading
-
removeAsynchronousLoadListener
public void removeAsynchronousLoadListener(org.pushingpixels.neon.api.AsynchronousLoadListener l)
- Specified by:
removeAsynchronousLoadListenerin interfaceorg.pushingpixels.neon.api.AsynchronousLoading
-
isLoading
public boolean isLoading()
- Specified by:
isLoadingin interfaceorg.pushingpixels.neon.api.AsynchronousLoading
-
factory
public static org.pushingpixels.neon.api.icon.ResizableIcon.Factory factory(org.pushingpixels.neon.api.icon.ResizableIcon.Factory original, DecoratedResizableIcon.IconDecorator... decorators)
-
-