TV-Browser 2.7.5 API

tvbrowser.ui.programtable
Class ProgramTable

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by tvbrowser.ui.programtable.ProgramTable
All Implemented Interfaces:
DragGestureListener, DragSourceListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, PluginStateListener, ProgramTableModelListener

public class ProgramTable
extends JPanel
implements ProgramTableModelListener, DragGestureListener, DragSourceListener, PluginStateListener

Author:
bananeweizen
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
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
 
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
ProgramTable(ProgramTableModel model)
          Creates a new instance of ProgramTable.
 
Method Summary
 void addNotify()
           
 void deSelectItem()
          Deselect the selected program.
 void down()
          Go to the program under the current program.
 void dragDropEnd(DragSourceDropEvent dsde)
           
 void dragEnter(DragSourceDragEvent dsde)
           
 void dragExit(DragSourceEvent dse)
           
 void dragGestureRecognized(DragGestureEvent evt)
           
 void dragOver(DragSourceDragEvent dsde)
           
 void dropActionChanged(DragSourceDragEvent dsde)
           
 void forceRepaintAll()
           
 BackgroundPainter getBackgroundPainter()
           
 int getColumnWidth()
           
 ProgramTableModel getModel()
           
 Dimension getPreferredSize()
           
 Program getProgramAt(int x, int y)
           
 ProgramTableLayout getProgramTableLayout()
           
 int getTimeY(int minutesAfterMidnight)
           
 void left()
          Go to the left program of the current program.
 void paintComponent(Graphics grp)
           
 void pluginActivated(PluginProxy plugin)
           
 void pluginDeactivated(PluginProxy plugin)
           
 void pluginLoaded(PluginProxy plugin)
           
 void pluginUnloaded(PluginProxy plugin)
           
 void removeNotify()
           
 void right()
          Go to the right program of the current program.
 void runCallback()
          runs the Runnable callback that scrolls to the wanted place in the ProgramTable
 void scrollBy(int deltaX, int deltaY)
           
 void selectItemAt(int pointX, int pointY)
          Selects the program at the point(x,y)
 void selectProgram(Program program)
          Select (highlight) a program in the program table.
 void setColumnWidth(int columnWidth)
           
protected  void setModel(ProgramTableModel model)
           
 void setProgramTableLayout(ProgramTableLayout layout)
           
 void showPopoupFromKeyboard()
          Opens the PopupMenu for the selected program.
 void startDoubleClickPluginFromKeyboard()
          Starts the double click Plugin.
 void startLeftSingleClickPluginFromKeyboard()
          Starts the left single click Plugin.
 void startMiddleClickPluginFromKeyboard()
          Starts the middle click Plugin.
 void tableCellUpdated(int col, int row)
           
 void tableDataChanged(Runnable callback)
           
 void up()
          Go to the program on top of the current program.
 void updateBackground()
           
 void updateLayout()
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, 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
 
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, 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, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProgramTable

public ProgramTable(ProgramTableModel model)
Creates a new instance of ProgramTable.

Parameters:
model - program table model to use in the program table
Method Detail

setModel

protected void setModel(ProgramTableModel model)

getModel

public ProgramTableModel getModel()

getProgramTableLayout

public ProgramTableLayout getProgramTableLayout()

setProgramTableLayout

public void setProgramTableLayout(ProgramTableLayout layout)

setColumnWidth

public void setColumnWidth(int columnWidth)

getColumnWidth

public int getColumnWidth()

updateBackground

public void updateBackground()

getBackgroundPainter

public BackgroundPainter getBackgroundPainter()

paintComponent

public void paintComponent(Graphics grp)
Overrides:
paintComponent in class JComponent

getPreferredSize

public Dimension getPreferredSize()
Overrides:
getPreferredSize in class JComponent

getProgramAt

public Program getProgramAt(int x,
                            int y)

forceRepaintAll

public void forceRepaintAll()

updateLayout

public void updateLayout()

scrollBy

public void scrollBy(int deltaX,
                     int deltaY)

getTimeY

public int getTimeY(int minutesAfterMidnight)

runCallback

public void runCallback()
runs the Runnable callback that scrolls to the wanted place in the ProgramTable


tableDataChanged

public void tableDataChanged(Runnable callback)
Specified by:
tableDataChanged in interface ProgramTableModelListener

tableCellUpdated

public void tableCellUpdated(int col,
                             int row)
Specified by:
tableCellUpdated in interface ProgramTableModelListener

showPopoupFromKeyboard

public void showPopoupFromKeyboard()
Opens the PopupMenu for the selected program.


startMiddleClickPluginFromKeyboard

public void startMiddleClickPluginFromKeyboard()
Starts the middle click Plugin.


startLeftSingleClickPluginFromKeyboard

public void startLeftSingleClickPluginFromKeyboard()
Starts the left single click Plugin.


startDoubleClickPluginFromKeyboard

public void startDoubleClickPluginFromKeyboard()
Starts the double click Plugin.


right

public void right()
Go to the right program of the current program.


up

public void up()
Go to the program on top of the current program.


down

public void down()
Go to the program under the current program.


left

public void left()
Go to the left program of the current program.


deSelectItem

public void deSelectItem()
Deselect the selected program.


selectItemAt

public void selectItemAt(int pointX,
                         int pointY)
Selects the program at the point(x,y)

Parameters:
pointX - X position of the point
pointY - Y position of the point

dragGestureRecognized

public void dragGestureRecognized(DragGestureEvent evt)
Specified by:
dragGestureRecognized in interface DragGestureListener

dragEnter

public void dragEnter(DragSourceDragEvent dsde)
Specified by:
dragEnter in interface DragSourceListener

dragOver

public void dragOver(DragSourceDragEvent dsde)
Specified by:
dragOver in interface DragSourceListener

dropActionChanged

public void dropActionChanged(DragSourceDragEvent dsde)
Specified by:
dropActionChanged in interface DragSourceListener

dragExit

public void dragExit(DragSourceEvent dse)
Specified by:
dragExit in interface DragSourceListener

dragDropEnd

public void dragDropEnd(DragSourceDropEvent dsde)
Specified by:
dragDropEnd in interface DragSourceListener

selectProgram

public void selectProgram(Program program)
Select (highlight) a program in the program table. This will deselect any other programs.

Parameters:
program - the program to select
Since:
2.6

addNotify

public void addNotify()
Overrides:
addNotify in class JComponent

removeNotify

public void removeNotify()
Overrides:
removeNotify in class JComponent

pluginActivated

public void pluginActivated(PluginProxy plugin)
Specified by:
pluginActivated in interface PluginStateListener

pluginDeactivated

public void pluginDeactivated(PluginProxy plugin)
Specified by:
pluginDeactivated in interface PluginStateListener

pluginLoaded

public void pluginLoaded(PluginProxy plugin)
Specified by:
pluginLoaded in interface PluginStateListener

pluginUnloaded

public void pluginUnloaded(PluginProxy plugin)
Specified by:
pluginUnloaded in interface PluginStateListener

TV-Browser 2.7.5 API

TV-Browser 2.7.5, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)