|
TV-Browser 2.7.5 API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
util.ui.ProgramPanel
public class ProgramPanel
A ProgramPanel is a JComponent representing a single program.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static int |
X_AXIS
Deprecated. since 2.7 Use ProgramPanelSettings.X_AXIS instead |
static int |
Y_AXIS
Deprecated. since 2.7 Use ProgramPanelSettings.Y_AXIS instead |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS |
| Constructor Summary | |
|---|---|
ProgramPanel()
Creates a new instance of ProgramPanel. |
|
ProgramPanel(boolean showOnlyDateAndTitle)
Deprecated. Since 2.2.2 Use ProgramPanel(ProgramPanelSettings) instead. |
|
ProgramPanel(Program prog)
Creates a new instance of ProgramPanel. |
|
ProgramPanel(Program prog,
boolean showOnlyDateAndTitle)
Deprecated. Since 2.2.2 Use ProgramPanel(Program, ProgramPanelSettings) instead. |
|
ProgramPanel(Program prog,
int axis)
Deprecated. Since 2.7 Use ProgramPanel(Program, ProgramPanelSettings) instead. |
|
ProgramPanel(Program prog,
int axis,
boolean showOnlyDateAndTitle)
Deprecated. Since 2.2.2 Use ProgramPanel(Program, int, ProgramPanelSettings) instead. |
|
ProgramPanel(Program prog,
int axis,
ProgramPanelSettings settings)
Creates a new instance of ProgramPanel. |
|
ProgramPanel(ProgramPanelSettings settings)
Creates a new instance of ProgramPanel. |
|
ProgramPanel(ProgramPanelSettings settings,
int axis)
Deprecated. Since 2.7 Use ProgramPanel(ProgramPanelSettings) instead. |
|
ProgramPanel(Program prog,
ProgramPanelSettings settings)
Creates a new instance of ProgramPanel. |
|
| Method Summary | |
|---|---|
void |
addNotify()
Called when the panel is added to a container. |
void |
addPluginContextMenuMouseListener(ContextMenuIf caller)
Adds a MouseListener that shows the plugin context menu when the user does a right click on the program panel. |
void |
forceRepaint()
Repaints the complete panel. |
int |
getHeight()
Gets the height. |
int |
getMinimumHeight()
|
int |
getPreferredHeight()
Gets the preferred height. |
Program |
getProgram()
Gets the program object of this ProgramPanel. |
Color |
getTextColor()
Returns the Color of the Text |
void |
paint(boolean mouse,
boolean isSelected,
Graphics g)
Paints the ProgramPanel |
void |
paintComponent(Graphics g)
Paints the component. |
void |
pluginActivated(PluginProxy plugin)
|
void |
pluginDeactivated(PluginProxy plugin)
|
void |
pluginLoaded(PluginProxy plugin)
|
void |
pluginUnloaded(PluginProxy plugin)
|
void |
programHasChanged()
Should be called, when the program has changed. |
void |
removeNotify()
Called when the panel is added to a container. |
void |
setHeight(int height)
Sets the height of this panel |
void |
setMaximumHeight()
|
void |
setPaintExpiredProgramsPale(boolean value)
Sets if expired programs should be painted pale. |
void |
setProgram(Program program)
Sets the program this panel shows. |
void |
setProgram(Program program,
int maxHeight)
Sets the program this panel shows. |
void |
setProgramPanelSettings(ProgramPanelSettings settings)
Change the settings of this panel. |
void |
setTextColor(Color col)
Sets the Color of the Text |
void |
stateChanged(ChangeEvent evt)
Called when the state of the program has changed. |
static void |
updateColumnWidth()
(Re)Loads the column width settings. |
static int |
updateColumnWidth(int newOffset)
|
static void |
updateFonts()
Reloads the font settings and sets the dynamic font size to standard font size again |
static boolean |
updateFonts(int newOffset)
Reloads the font settings and sets a dynamic font size |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int X_AXIS
ProgramPanelSettings.X_AXIS instead
public static final int Y_AXIS
ProgramPanelSettings.Y_AXIS instead
| Constructor Detail |
|---|
public ProgramPanel()
public ProgramPanel(ProgramPanelSettings settings)
settings - The settings for this program panel.public ProgramPanel(Program prog)
prog - The program to show in this panel.
public ProgramPanel(Program prog,
ProgramPanelSettings settings)
prog - The program to show in this panel.settings - The settings for this program panel.
public ProgramPanel(Program prog,
int axis,
ProgramPanelSettings settings)
prog - The program to show in this panel.axis - Orientation of ProgressBar (X_AXIS/Y_AXIS)settings - The settings for this program panel.public ProgramPanel(boolean showOnlyDateAndTitle)
ProgramPanel(ProgramPanelSettings) instead.
showOnlyDateAndTitle - If this panel should only show date time and title.
public ProgramPanel(Program prog,
int axis)
ProgramPanel(Program, ProgramPanelSettings) instead.
prog - The program to show in this panel.axis - Orientation of ProgressBar (X_AXIS/Y_AXIS)
public ProgramPanel(Program prog,
boolean showOnlyDateAndTitle)
ProgramPanel(Program, ProgramPanelSettings) instead.
prog - The program to show in this panel.showOnlyDateAndTitle - If this panel should only show date time and title.
public ProgramPanel(Program prog,
int axis,
boolean showOnlyDateAndTitle)
ProgramPanel(Program, int, ProgramPanelSettings) instead.
prog - The program to show in this panel.axis - Orientation of ProgressBar (X_AXIS/Y_AXIS)showOnlyDateAndTitle - If this panel should only show date time and title.
public ProgramPanel(ProgramPanelSettings settings,
int axis)
ProgramPanel(ProgramPanelSettings) instead.
settings - The settings for this program panel.axis - The axis of the progress bar.| Method Detail |
|---|
public static boolean updateFonts(int newOffset)
newOffset - increase or decrease compared to standard font sizepublic static void updateFonts()
public void setProgramPanelSettings(ProgramPanelSettings settings)
settings - The settings of this panel.public void forceRepaint()
public static void updateColumnWidth()
public static int updateColumnWidth(int newOffset)
public int getPreferredHeight()
It's the height the panel has with a maximum of 3 information rows.
public void setHeight(int height)
height - public void setMaximumHeight()
public int getHeight()
getHeight in class JComponentpublic void setProgram(Program program)
program - The program to show in this panel.
public void setProgram(Program program,
int maxHeight)
program - The program to show in this panel.maxHeight - The maximum height the program should have (in pixels).public void paintComponent(Graphics g)
paintComponent in class JComponentg - The graphics context to paint to.public void addNotify()
registers the panel as ChangeListener at the program.
addNotify in class JComponentpublic void removeNotify()
removes the panel as ChangeListener from the program.
removeNotify in class JComponentpublic Program getProgram()
public void addPluginContextMenuMouseListener(ContextMenuIf caller)
caller - The ContextMenuIf to exclude from the context menu. When
null no ContextMenuIf is excluded.public void programHasChanged()
If you use this program panel directly (this is the case, when you have added it into a JPanel), you don't have to call this method. This is done automatically.
But if you use this panel just as renderer (e.g. for a list) you have to
register at the programs as ChangeListener and call this method when
ChangeListener.stateChanged(javax.swing.event.ChangeEvent) was
called.
Program.addChangeListener(ChangeListener)public void stateChanged(ChangeEvent evt)
repaints the panel.
stateChanged in interface ChangeListenerevt - The event describing the change.public void setTextColor(Color col)
col - Color of the Textpublic Color getTextColor()
public void paint(boolean mouse,
boolean isSelected,
Graphics g)
mouse - under a Mouse and needs highlight?isSelected - IsSelected program?g - Graphics-Objectpublic int getMinimumHeight()
public void setPaintExpiredProgramsPale(boolean value)
value - True if expired programs should be painted pale,
false otherwise.public void pluginActivated(PluginProxy plugin)
pluginActivated in interface PluginStateListenerpublic void pluginDeactivated(PluginProxy plugin)
pluginDeactivated in interface PluginStateListenerpublic void pluginLoaded(PluginProxy plugin)
pluginLoaded in interface PluginStateListenerpublic void pluginUnloaded(PluginProxy plugin)
pluginUnloaded in interface PluginStateListener
|
TV-Browser 2.7.5 API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||