|
TV-Browser 3.3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object util.ui.persona.Persona
public final class Persona
A class to handle Personas for TV-Browser.
Field Summary | |
---|---|
static java.lang.String |
ACCENT_COLOR_KEY
The accent color key for the Persona properties |
static java.lang.String |
DESCRIPTION_KEY
The description key for the Persona properties |
static java.lang.String |
DETAIL_URL_KEY
The detail url key for the Persona properties |
static java.lang.String |
FOOTER_IMAGE_KEY
The footer image key for the Persona properties |
static java.lang.String |
HEADER_IMAGE_KEY
The header image key for the Persona properties |
static java.lang.String |
NAME_KEY
The name key for the Persona properties |
static java.lang.String |
SHADOW_COLOR_KEY
The shadow color key for the Persona properties |
static java.lang.String |
TEXT_COLOR_KEY
The text color key for the Persona properties |
static java.lang.String |
TVB_PERSONA
The key for the space holder for images in the global TV-Browser Persona directory |
static java.lang.String |
USER_PERSONA
The key for the space holder for images in the user Persona directory |
Method Summary | |
---|---|
void |
activatePersona(PersonaInfo info)
Activates the given Persona. |
void |
applyPersona()
Applies the current selected Persona. |
static javax.swing.JPanel |
createPersonaBackgroundPanel()
|
static javax.swing.JButton |
createPersonaButton(java.lang.String text)
Creates a button that uses the Pesona colors. |
static javax.swing.JButton |
createPersonaButton(java.lang.String text,
javax.swing.Icon icon)
Creates a button that uses the Pesona colors. |
javax.swing.JMenu |
createPersonaMenu()
Create a menu that uses the Persona for painting. |
java.awt.Color |
getAccentColor()
Gets the accent color. |
java.lang.String |
getDescription()
Get the description of the current Persona. |
java.lang.String |
getDetailURL()
Get the detail url of the current Persona. |
java.awt.image.BufferedImage |
getFooterImage()
Get the image for the footer. |
java.awt.image.BufferedImage |
getHeaderImage()
Get the image for the header. |
java.lang.String |
getId()
Gets the id of the currently viewed persona |
PersonaInfo[] |
getInstalledPersonas()
Get all installed Personas. |
static Persona |
getInstance()
Get the instance of this class. |
java.lang.String |
getName()
Get the name of the current Persona. |
static javax.swing.border.Border |
getPersonaButtonBorder()
Gets the border for a Persona button |
PersonaInfo |
getPersonaInfo(java.lang.String id)
|
java.awt.Color |
getShadowColor()
Gets the color for the text shadow. |
java.awt.Color |
getTextColor()
Gets the color for the text foreground. |
static java.io.File |
getUserPersonaDir()
|
void |
loadPersonas()
Loads all available Personas. |
static void |
paintButton(java.awt.Graphics g,
javax.swing.JButton b)
Paints the given button on the given Graphics with persona settings. |
void |
registerPersonaListener(PersonaListener listener)
Register the PersonaListener to listen to Persona changes. |
boolean |
removePersona(PersonaInfo info)
Removes the given Persona form the list. |
void |
removePersonaListerner(PersonaListener listener)
Remove the given listener. |
static java.awt.Color |
testPersonaForegroundAgainst(java.awt.Color c)
Test the given color against the Persona foreground color and returns a color that is readable on the given color. |
void |
updatePersona(java.lang.String id)
Update the persona |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NAME_KEY
public static final java.lang.String DESCRIPTION_KEY
public static final java.lang.String HEADER_IMAGE_KEY
public static final java.lang.String FOOTER_IMAGE_KEY
public static final java.lang.String TEXT_COLOR_KEY
public static final java.lang.String SHADOW_COLOR_KEY
public static final java.lang.String ACCENT_COLOR_KEY
public static final java.lang.String DETAIL_URL_KEY
public static final java.lang.String USER_PERSONA
public static final java.lang.String TVB_PERSONA
Method Detail |
---|
public void registerPersonaListener(PersonaListener listener)
listener
- The listener to register.public void removePersonaListerner(PersonaListener listener)
listener
- The listener to remove.public void applyPersona()
public void loadPersonas()
public static Persona getInstance()
public java.awt.image.BufferedImage getHeaderImage()
null
if there is none.public java.awt.image.BufferedImage getFooterImage()
null
if there is none.public java.awt.Color getTextColor()
public java.awt.Color getShadowColor()
public java.awt.Color getAccentColor()
public java.lang.String getName()
public java.lang.String getDescription()
public java.lang.String getDetailURL()
public javax.swing.JMenu createPersonaMenu()
public PersonaInfo[] getInstalledPersonas()
public void updatePersona(java.lang.String id)
id
- public java.lang.String getId()
public static java.io.File getUserPersonaDir()
public PersonaInfo getPersonaInfo(java.lang.String id)
id
- The id of the Persona to get.
public void activatePersona(PersonaInfo info)
info
- The Persona to activate.public boolean removePersona(PersonaInfo info)
info
- The Persona to remove.
true
if the Persona could be removed.public static void paintButton(java.awt.Graphics g, javax.swing.JButton b)
g
- The graphics to paint on.b
- The button to paint.public static java.awt.Color testPersonaForegroundAgainst(java.awt.Color c)
c
- The color to test.
public static javax.swing.JPanel createPersonaBackgroundPanel()
public static javax.swing.JButton createPersonaButton(java.lang.String text)
text
- Text of the button
public static javax.swing.JButton createPersonaButton(java.lang.String text, javax.swing.Icon icon)
text
- Text of the buttonicon
- The icon for the button
public static javax.swing.border.Border getPersonaButtonBorder()
|
TV-Browser 3.3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |