com.leafdigital.ui.api
Interface Pic

All Superinterfaces:
Widget

public interface Pic
extends Widget

Interface for images from theme. Images may be clickable or not. To make an image clickable, set the OnAction and optionally a hover image and tooltip.


Method Summary
 void setHover(java.lang.String name)
          Alternate property to use when the user hovers over the button.
 void setOnAction(java.lang.String callback)
          Sets the action method called when button is clicked.
 void setProperty(java.lang.String name)
          Set the image property name in the format category/name (PNG and JPG supported).
 void setThemeFile(Theme t, java.lang.String filename)
          Set an image directly from a theme without going through the theme property interface.
 void setTooltip(java.lang.String tip)
          Sets a tooltip that appears when you hover over the button.
 
Methods inherited from interface com.leafdigital.ui.api.Widget
getID, getOwner, informClosed, isVisible, setOwner, setVisible
 

Method Detail

setProperty

void setProperty(java.lang.String name)
Set the image property name in the format category/name (PNG and JPG supported). The image is loaded from the current theme.

Parameters:
name - Property name or null for no image

setThemeFile

void setThemeFile(Theme t,
                  java.lang.String filename)
Set an image directly from a theme without going through the theme property interface. (For special-case use only.)

Parameters:
t - Theme
filename - Name for iamge

setOnAction

@UICallback
void setOnAction(java.lang.String callback)
Sets the action method called when button is clicked.

Parameters:
callback - Name of method
Throws:
BugException - If method doesn't exist etc.

setTooltip

void setTooltip(java.lang.String tip)
Sets a tooltip that appears when you hover over the button.

Parameters:
tip - Text of tip or null for none

setHover

void setHover(java.lang.String name)
Alternate property to use when the user hovers over the button.

Parameters:
name - Property name or null for no image


Copyright © 2011 Samuel Marshall. All rights reserved.