Class FontIconDefinition

java.lang.Object
com.iizix.prop.GProp<GProp<?>[]>
com.iizix.prop.PropCnr
com.iizix.prop.image.FontIconDefinition
All Implemented Interfaces:
EventListener, IGProp<GProp<?>[]>, IFontIconStyle, IImageTarget, IPropCnr, Cloneable
Direct Known Subclasses:
EditorFontIconDefinition

public class FontIconDefinition extends PropCnr implements IImageTarget, IFontIconStyle
The definition of a single font icon and how it represent itself in the various states, e.g. hover, focused, etc.
Author:
Christopher Mindus
  • Field Details

    • FLIP_HORIZONTALLY_RTL

      public static final String FLIP_HORIZONTALLY_RTL
      The content for RTL should be flipped.
      See Also:
    • CONTENT_RTL

      public static final String CONTENT_RTL
      The content for RTL alternate content.
      See Also:
    • CONTENT_SELECT

      public static final String CONTENT_SELECT
      The content for Select state alternate content.
      See Also:
    • CONTENT_RTL_SELECT

      public static final String CONTENT_RTL_SELECT
      The content for RTL and Select state alternate content.
      See Also:
  • Constructor Details

    • FontIconDefinition

      public FontIconDefinition()
      The single font icon definition constructor.
    • FontIconDefinition

      public FontIconDefinition(Atom atom)
      The single font icon definition constructor with a name.
      Parameters:
      atom - Name of the icon.
  • Method Details

    • onEventSelf

      public void onEventSelf(GEvent event)
      Overridden to check for cache clearing...
      Specified by:
      onEventSelf in interface IGProp<GProp<?>[]>
      Overrides:
      onEventSelf in class GProp<GProp<?>[]>
      Parameters:
      event - The property event.
    • clone

      public PropCnr clone() throws CloneNotSupportedException
      Clone of image forces creation of the source client image data before cloning.
      Overrides:
      clone in class PropCnr
      Throws:
      CloneNotSupportedException - If a subclass doesn't allow cloning, e.g. the client properties.
    • isImageTargetValid

      public boolean isImageTargetValid()
      Checks if this target is valid.
      Specified by:
      isImageTargetValid in interface IImageTarget
    • isHorizontallyFlippedRTL

      public boolean isHorizontallyFlippedRTL()
      Flag indicating the image should be flipped horizontally when RTL.
      Returns:
      The flip flag, default value is false, i.e. same icon for RTL or LTR.
    • getClientImageData

      public ClientImageData getClientImageData()
      Gets the Client image data.
      Specified by:
      getClientImageData in interface IImageTarget
    • getStatesCSS

      public String[] getStatesCSS()
      Gets the state CSS'es for Normal, RTL, Disable, Press, Select, Focus, Hover and Capture.
      Returns:
      A cached array with the state CSS'es, where an empty setting is assigned an empty string. Do not modify the array!
    • getKStringFontIcon

      public String getKStringFontIcon(ClientImageData cid, KStringHTMLImageTag source, IKStringInfoProvider provider)
      Appends the font icon definition to a KString tag.
      Parameters:
      cid - The client image data instance.
      source - The source KString tag.
      provider - The information provider.
      Returns:
      String to use.
    • append

      public void append(PropMgr propertyManager, SendTransaction trans)
      Appends the font icon data for the client to display in e.g. a button, menu item, etc.