|
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 java.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 |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
static int |
WIDTH_LEFT
The width of the left part (the time). |
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, WIDTH |
Constructor Summary | |
---|---|
ProgramPanel()
Creates a new instance of ProgramPanel. |
|
ProgramPanel(Program prog)
Creates a new instance of ProgramPanel. |
|
ProgramPanel(Program prog,
int axis,
ProgramPanelSettings settings)
Creates a new instance of ProgramPanel. |
|
ProgramPanel(ProgramPanelSettings settings)
Creates a new instance of ProgramPanel. |
|
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. |
java.awt.Color |
getTextColor()
Returns the Color of the Text |
int |
getTitleX()
get the X offset of the title in pixels |
java.lang.String |
getToolTipText(int x,
int y)
get the tooltip text for the local mouse coordinates x and y |
java.lang.String |
getToolTipText(java.awt.event.MouseEvent event)
|
void |
paint(boolean mouse,
boolean isSelected,
java.awt.Graphics g)
Paints the ProgramPanel |
void |
paintComponent(java.awt.Graphics g)
Paints the component. |
boolean |
pictureStateChanged()
|
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 |
setMarkTime(int time)
|
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 |
setSize(java.awt.Dimension d)
|
void |
setSize(int width,
int height)
|
void |
setTextColor(java.awt.Color col)
Sets the Color of the Text |
void |
setWidth(int newWidth)
|
void |
stateChanged(javax.swing.event.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 javax.swing.JComponent |
---|
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static int WIDTH_LEFT
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.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 javax.swing.JComponent
public void setProgram(Program program)
program
- The program to show in this panel.public boolean pictureStateChanged()
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(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
g
- The graphics context to paint to.public void addNotify()
registers the panel as ChangeListener at the program.
addNotify
in class javax.swing.JComponent
public void removeNotify()
removes the panel as ChangeListener from the program.
removeNotify
in class javax.swing.JComponent
public Program getProgram()
public void addPluginContextMenuMouseListener(ContextMenuIf caller)
caller
- The ContextMenuIf to exclude from the context menu. If
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(javax.swing.event.ChangeEvent evt)
repaints the panel.
stateChanged
in interface javax.swing.event.ChangeListener
evt
- The event describing the change.public void setTextColor(java.awt.Color col)
col
- Color of the Textpublic java.awt.Color getTextColor()
public void paint(boolean mouse, boolean isSelected, java.awt.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 PluginStateListener
public void pluginDeactivated(PluginProxy plugin)
pluginDeactivated
in interface PluginStateListener
public void pluginLoaded(PluginProxy plugin)
pluginLoaded
in interface PluginStateListener
public void pluginUnloaded(PluginProxy plugin)
pluginUnloaded
in interface PluginStateListener
public java.lang.String getToolTipText(int x, int y)
x
- y
-
public int getTitleX()
public java.lang.String getToolTipText(java.awt.event.MouseEvent event)
getToolTipText
in class javax.swing.JComponent
public void setSize(java.awt.Dimension d)
setSize
in class java.awt.Component
public void setSize(int width, int height)
setSize
in class java.awt.Component
public void setWidth(int newWidth)
public void setMarkTime(int time)
|
TV-Browser 3.3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |