com.sibvisions.rad.ui.swing.ext
Class JVxFontAwesomeIcon

java.lang.Object
  extended by javax.swing.ImageIcon
      extended by com.sibvisions.rad.ui.swing.ext.JVxFontAwesomeIcon
All Implemented Interfaces:
java.io.Serializable, javax.accessibility.Accessible, javax.swing.Icon

public class JVxFontAwesomeIcon
extends javax.swing.ImageIcon

The JVxFontAwesomeIcon is an ImageIcon implementation for FontAwesome font.

See Also:
http://fortawesome.github.io/Font-Awesome/cheatsheet/, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.ImageIcon
javax.swing.ImageIcon.AccessibleImageIcon
 
Field Summary
 
Fields inherited from class javax.swing.ImageIcon
component, tracker
 
Constructor Summary
JVxFontAwesomeIcon(FontAwesome pFont)
          Creates a new instance of JVxFontAwesomeIcon with default size of 16px.
JVxFontAwesomeIcon(java.lang.String pDefinition)
          Creates a new instance of JVxFontAwesomeIcon.
 
Method Summary
 java.awt.Color getColor()
          Gets the color.
 int getIconHeight()
          
 int getIconWidth()
          
 java.awt.Image getImage()
          
 int getSize()
          Gets the size.
 void paintIcon(java.awt.Component pComponent, java.awt.Graphics pGraphics, int pX, int pY)
          
 void setColor(java.awt.Color pColor)
          Sets the color.
 void setSize(int pSize)
          Sets the size.
 
Methods inherited from class javax.swing.ImageIcon
getAccessibleContext, getDescription, getImageLoadStatus, getImageObserver, loadImage, setDescription, setImage, setImageObserver, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JVxFontAwesomeIcon

public JVxFontAwesomeIcon(FontAwesome pFont)
Creates a new instance of JVxFontAwesomeIcon with default size of 16px.

Parameters:
pFont - the icon definition

JVxFontAwesomeIcon

public JVxFontAwesomeIcon(java.lang.String pDefinition)
Creates a new instance of JVxFontAwesomeIcon.

Parameters:
pDefinition - The icon definition (only the name or followed by a list of properties: server;size=20;color=0xFFAACC
Method Detail

paintIcon

public void paintIcon(java.awt.Component pComponent,
                      java.awt.Graphics pGraphics,
                      int pX,
                      int pY)

Specified by:
paintIcon in interface javax.swing.Icon
Overrides:
paintIcon in class javax.swing.ImageIcon

getIconWidth

public int getIconWidth()

Specified by:
getIconWidth in interface javax.swing.Icon
Overrides:
getIconWidth in class javax.swing.ImageIcon

getIconHeight

public int getIconHeight()

Specified by:
getIconHeight in interface javax.swing.Icon
Overrides:
getIconHeight in class javax.swing.ImageIcon

getImage

public java.awt.Image getImage()

Overrides:
getImage in class javax.swing.ImageIcon

setSize

public void setSize(int pSize)
Sets the size.

Parameters:
pSize - the size

getSize

public int getSize()
Gets the size.

Returns:
the size

setColor

public void setColor(java.awt.Color pColor)
Sets the color.

Parameters:
pColor - the color

getColor

public java.awt.Color getColor()
Gets the color.

Returns:
the color


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.