|
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.program.ProgramUtilities
public class ProgramUtilities
Provides utilities for program stuff.
Constructor Summary | |
---|---|
ProgramUtilities()
|
Method Summary | |
---|---|
static java.lang.String[] |
getActorNames(Program program)
extract the actor names from the actor field |
static int |
getAgeLimit(java.lang.String rating)
get the age limit for a given textual rating |
static java.awt.Color |
getColorForProgramImportance(java.awt.Color color,
byte importance)
Creates a color that uses the program importance for alpha value. |
static java.awt.Color |
getColorForProgramImportance(java.awt.Color color,
Program program)
Creates a color that uses the program importance for alpha value. |
static java.util.Iterator<Program> |
getJointProgramIteratorFor(Date date,
Channel channel)
Gets an iterator that contains all programs for the given date of the given channel and it's joint channel if there one or it's base channel if there one. |
static java.util.Comparator<Program> |
getProgramComparator()
comparator to sort programs by date, time and position in channel list |
static byte |
getProgramImportance(Program program)
Gets the program importance of the given program. |
static java.lang.String |
getTimeZoneCorrectedProgramId(java.lang.String progID)
Gets the time zone corrected program id of the given program id. |
static boolean |
isNotInTimeRange(int timeFrom,
int timeTo,
Program p)
A helper method to get if a program is not in a time range. |
static boolean |
isOnAir(Program p)
Helper method to check if a program runs. |
static java.util.ArrayList<java.lang.String>[] |
splitActors(Program program)
get the actors and roles of a program |
static java.lang.String[] |
splitPersons(java.lang.String field)
extract a list of person names out of the given string |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProgramUtilities()
Method Detail |
---|
public static boolean isOnAir(Program p)
p
- The program to check.
public static java.util.Comparator<Program> getProgramComparator()
public static boolean isNotInTimeRange(int timeFrom, int timeTo, Program p)
timeFrom
- The beginning of the time range to checktimeTo
- The ending of the time rangep
- The program to check
public static java.util.ArrayList<java.lang.String>[] splitActors(Program program)
program
- the program containing the actors
public static java.lang.String[] getActorNames(Program program)
program
- the program to work on
public static java.lang.String getTimeZoneCorrectedProgramId(java.lang.String progID)
progID
- The id to get the time zone corrected for.
public static java.lang.String[] splitPersons(java.lang.String field)
field
-
public static int getAgeLimit(java.lang.String rating)
rating
-
public static java.awt.Color getColorForProgramImportance(java.awt.Color color, Program program)
color
- The color to use for alpha value change.program
- The program to get the changed color for.
public static java.awt.Color getColorForProgramImportance(java.awt.Color color, byte importance)
color
- The color to use for alpha value change.importance
- The importance to get the changed color for.
public static byte getProgramImportance(Program program)
program
- The program to get the program importance for
public static java.util.Iterator<Program> getJointProgramIteratorFor(Date date, Channel channel)
date
- The date to get the iterator for.channel
- The channel to get the iterator for.
|
TV-Browser 3.3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |