base
Class PoddyFrame

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by base.PoddyFrame
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants
Direct Known Subclasses:
SetupWin

public class PoddyFrame
extends JFrame

This is the base class for the main window of the main and setup application. It defines several methods that are used by the main and setup application. So the main implementation of these methods is done within the classes SetupWin and MainWin that inherit from this base class. Resulting from that implementations done here within this base class have to provide a general functionality that is valid for both.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Component
Component.BaselineResizeBehavior
 
Field Summary
 ResourceBundle _m
          the main window as created by MainWin or SetupWin, that inherits from PoddyFrame
static Color bgcolor
          color for error texts
 BufferedImage bgImage
           
 ConfigData config
          handles the external text resources
 CustomPanel customPanel
           
 int customSelected
          as long as this variable is true no new key event has to be sent
static Color disabledentry
          standard entries color, must be different than disabledentry
static Color errorcolor
          service entry, located at bottom of lists
static Color highlight
           
 ImageIcon iconAlpha
          standard background color
 ImageIcon iconEmpty
          standard background color
 ImageIcon iconLR
          standard background color
 ImageIcon iconNum
          standard background color
static int ID_CD_ARTIST_ALBUM_CANCEL_OPERATION
           
static int ID_CD_ARTIST_ALBUM_DELETE
           
static int ID_CD_ARTIST_ALBUM_EDIT
           
static int ID_CD_ARTIST_ALBUM_MOVE_TRACKS
           
static int ID_CD_ARTIST_ALBUM_MOVE_TRACKS_HERE
           
static int ID_CD_ARTIST_ALBUM_PLAY
           
static int ID_CD_ARTIST_ALBUM_SHUFFLE
           
static int ID_CD_ARTIST_ALBUM_TO_USB
           
static int ID_CD_ARTIST_ALBUM_TRACK
           
static int ID_TOP_CD
           
static int ID_TOP_MOVIES
           
static int ID_TOP_POWEROFF
           
static int ID_TOP_SERIES
           
static int ID_TOP_VCR
           
static int ID_TOP_VIDEOS
           
 ImageUtils iu
           
 base.PoddyFrame.ASymKey keyEventHandler
          this object contains the data out of the configuration file
 long lastKeyPress
           
static PoddyFrame MyWin
           
 long nextPoddydSyncTime
           
 boolean processingKeyEvent
           
static Color serviceentry
          color for a disabled entry, must be different than stdentry
 SQLLocalAccess SQL
           
 StationsList stationsList
          holds a custom panel that is displayed temporarily
static Color stdentry
          top managing entries color
 SystemAccess sysAccess
          stores the last time a key event was received
static Color topentry
          color for highlighting entries
static int USEFLAG_ALPHA
           
static int USEFLAG_DOWN
           
static int USEFLAG_LEFT
           
static int USEFLAG_NUM
           
static int USEFLAG_RETURN
           
static int USEFLAG_RIGHT
           
static int USEFLAG_UP
           
 BufferedImage useImage
           
 
Fields inherited from class javax.swing.JFrame
EXIT_ON_CLOSE
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
PoddyFrame()
          The standard constructor for the applications main window.
 
Method Summary
 void deleteCDFromDB(int cdidx)
          This method applies to the local CD database, it deletes a track from the SQL database.
 void doLocalSQLOperation(String query)
           
 DefaultListModel doLocalSQLQuery(int table, String query)
           
 boolean fetchGlobalCDInfo(CDInfo info)
           
 int getCDDBIdx(String artist, String album)
           
 int getDVDDBIdx(long crcid)
           
 String getLCDText(int num)
           
 String getPwdHash()
           
 void handleDownCmd()
          Method for handling the down-input from keyboard/remote control
 void handleKey(int num)
          Whenever the user enters a number (using keyboard or remote control) that number is handed over to this method for further processing
 void handleLeftCmd()
          Method for handling the left-input from keyboard/remote control
 void handleMenuCmd()
          Method for handling the menu-input from keyboard/remote control
 void handlePlayCmd()
          Method for handling the play-input from keyboard/remote control
 void handleRightCmd()
          Method for handling the right-input from keyboard/remote control
 void handleSetCmd()
          Method for handling the set-input from keyboard/remote control
 void handleStopCmd()
          Method for handling the stop-input from keyboard/remote control
 void handleUpCmd()
          Method for handling the up-input from keyboard/remote control
 void initUI()
           
 void saveRecording(RecordInfo info)
           
 void saveStations(StationsList list)
           
 void scrollToObjectASync(JComponent component)
           
 void setCDToDB(String artist, String album, String genre, String cat, int year, int tracks)
           
 void setCustomPanel(CustomPanel panel)
          When an object of type CustomPanel is created and has to be displayed instead of the standard view this method has to be used.
 void setDVDToDB(DVDInfo dvdInfo)
           
 void setLCDErrorText(String text)
          This method overwrites the text currently displayed at an (optionally) connected display to display an important message instead of it.
 void setLCDMessageText(String text)
          This method overwrites the text currently displayed at an (optionally) connected display to display an important message instead of it.
 void setLCDText(String text1, String text2)
          This method directly accesses the LCDController and lets it show a new text on the (optionally) connected display
 void setMenu(int menuID, int stack)
           
 void setPlayInfo(CDInfo cdInfo, TrackInfo trackInfo)
           
 void setStationsList(StationsList newList)
           
 void setTopPanelText(String text)
          The main title bar of the application diusplays useful information about what is managed/done by the application at the moment.
 void setTopPanelText(String text, String path)
          The main title bar of the application diusplays useful information about what is managed/done by the application at the moment.
 void setTrackToDB(int idx, String trackname)
          This method applies to the local CD database, it stores a track
 void storeGlobalCDInfo(CDInfo info)
           
 void turnOffBottomPanel()
           
 void updateCDDBs(String artist, String album, String track)
           
 void updateDVDDB(DVDInfo dvdInfo)
           
 
Methods inherited from class javax.swing.JFrame
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setTransferHandler, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

USEFLAG_UP

public static final int USEFLAG_UP
See Also:
Constant Field Values

USEFLAG_DOWN

public static final int USEFLAG_DOWN
See Also:
Constant Field Values

USEFLAG_LEFT

public static final int USEFLAG_LEFT
See Also:
Constant Field Values

USEFLAG_RIGHT

public static final int USEFLAG_RIGHT
See Also:
Constant Field Values

USEFLAG_RETURN

public static final int USEFLAG_RETURN
See Also:
Constant Field Values

USEFLAG_ALPHA

public static final int USEFLAG_ALPHA
See Also:
Constant Field Values

USEFLAG_NUM

public static final int USEFLAG_NUM
See Also:
Constant Field Values

ID_TOP_SERIES

public static final int ID_TOP_SERIES
See Also:
Constant Field Values

ID_TOP_MOVIES

public static final int ID_TOP_MOVIES
See Also:
Constant Field Values

ID_TOP_CD

public static final int ID_TOP_CD
See Also:
Constant Field Values

ID_TOP_VIDEOS

public static final int ID_TOP_VIDEOS
See Also:
Constant Field Values

ID_TOP_VCR

public static final int ID_TOP_VCR
See Also:
Constant Field Values

ID_TOP_POWEROFF

public static final int ID_TOP_POWEROFF
See Also:
Constant Field Values

ID_CD_ARTIST_ALBUM_SHUFFLE

public static final int ID_CD_ARTIST_ALBUM_SHUFFLE
See Also:
Constant Field Values

ID_CD_ARTIST_ALBUM_PLAY

public static final int ID_CD_ARTIST_ALBUM_PLAY
See Also:
Constant Field Values

ID_CD_ARTIST_ALBUM_TRACK

public static final int ID_CD_ARTIST_ALBUM_TRACK
See Also:
Constant Field Values

ID_CD_ARTIST_ALBUM_MOVE_TRACKS

public static final int ID_CD_ARTIST_ALBUM_MOVE_TRACKS
See Also:
Constant Field Values

ID_CD_ARTIST_ALBUM_DELETE

public static final int ID_CD_ARTIST_ALBUM_DELETE
See Also:
Constant Field Values

ID_CD_ARTIST_ALBUM_MOVE_TRACKS_HERE

public static final int ID_CD_ARTIST_ALBUM_MOVE_TRACKS_HERE
See Also:
Constant Field Values

ID_CD_ARTIST_ALBUM_CANCEL_OPERATION

public static final int ID_CD_ARTIST_ALBUM_CANCEL_OPERATION
See Also:
Constant Field Values

ID_CD_ARTIST_ALBUM_EDIT

public static final int ID_CD_ARTIST_ALBUM_EDIT
See Also:
Constant Field Values

ID_CD_ARTIST_ALBUM_TO_USB

public static final int ID_CD_ARTIST_ALBUM_TO_USB
See Also:
Constant Field Values

MyWin

public static PoddyFrame MyWin

_m

public ResourceBundle _m
the main window as created by MainWin or SetupWin, that inherits from PoddyFrame


config

public ConfigData config
handles the external text resources


keyEventHandler

public base.PoddyFrame.ASymKey keyEventHandler
this object contains the data out of the configuration file


lastKeyPress

public long lastKeyPress

sysAccess

public SystemAccess sysAccess
stores the last time a key event was received


processingKeyEvent

public boolean processingKeyEvent

customSelected

public int customSelected
as long as this variable is true no new key event has to be sent


customPanel

public CustomPanel customPanel

stationsList

public StationsList stationsList
holds a custom panel that is displayed temporarily


useImage

public BufferedImage useImage

bgImage

public BufferedImage bgImage

iu

public ImageUtils iu

highlight

public static final Color highlight

topentry

public static final Color topentry
color for highlighting entries


stdentry

public static final Color stdentry
top managing entries color


disabledentry

public static final Color disabledentry
standard entries color, must be different than disabledentry


serviceentry

public static final Color serviceentry
color for a disabled entry, must be different than stdentry


errorcolor

public static final Color errorcolor
service entry, located at bottom of lists


bgcolor

public static final Color bgcolor
color for error texts


iconAlpha

public ImageIcon iconAlpha
standard background color


iconNum

public ImageIcon iconNum
standard background color


iconLR

public ImageIcon iconLR
standard background color


iconEmpty

public ImageIcon iconEmpty
standard background color


SQL

public SQLLocalAccess SQL

nextPoddydSyncTime

public long nextPoddydSyncTime
Constructor Detail

PoddyFrame

public PoddyFrame()
The standard constructor for the applications main window. Here all resources are created, initialized and loaded that are required for the application

Method Detail

handleSetCmd

public void handleSetCmd()
Method for handling the set-input from keyboard/remote control


handleUpCmd

public void handleUpCmd()
Method for handling the up-input from keyboard/remote control


handleDownCmd

public void handleDownCmd()
Method for handling the down-input from keyboard/remote control


handleLeftCmd

public void handleLeftCmd()
Method for handling the left-input from keyboard/remote control


handleRightCmd

public void handleRightCmd()
Method for handling the right-input from keyboard/remote control


handleMenuCmd

public void handleMenuCmd()
Method for handling the menu-input from keyboard/remote control


handlePlayCmd

public void handlePlayCmd()
Method for handling the play-input from keyboard/remote control


handleStopCmd

public void handleStopCmd()
Method for handling the stop-input from keyboard/remote control


handleKey

public void handleKey(int num)
Whenever the user enters a number (using keyboard or remote control) that number is handed over to this method for further processing


setCustomPanel

public void setCustomPanel(CustomPanel panel)
When an object of type CustomPanel is created and has to be displayed instead of the standard view this method has to be used. Its implementation in MainWin disables the current panel and shows the custom panel. To switch back to normal view or to switch to a different custom panel removeCustomPanel() has to be executed first

Parameters:
panel - the object that inherits from CustomPanel that has to be set

setTopPanelText

public void setTopPanelText(String text)
The main title bar of the application diusplays useful information about what is managed/done by the application at the moment.

Parameters:
text - the new text that has to bne displayed within the top bar

setTopPanelText

public void setTopPanelText(String text,
                            String path)
The main title bar of the application diusplays useful information about what is managed/done by the application at the moment.

Parameters:
text - the new text that has to bne displayed within the top bar

storeGlobalCDInfo

public void storeGlobalCDInfo(CDInfo info)

fetchGlobalCDInfo

public boolean fetchGlobalCDInfo(CDInfo info)

updateCDDBs

public void updateCDDBs(String artist,
                        String album,
                        String track)

setTrackToDB

public void setTrackToDB(int idx,
                         String trackname)
This method applies to the local CD database, it stores a track


deleteCDFromDB

public void deleteCDFromDB(int cdidx)
This method applies to the local CD database, it deletes a track from the SQL database. Please note: currently the SmallSQL-DB does not support data compression. Because of that deleting a dataset from the DB does not release the related disk space. That means ceation and deletion of tracks has to be done very carefully and only if really necessary!


setCDToDB

public void setCDToDB(String artist,
                      String album,
                      String genre,
                      String cat,
                      int year,
                      int tracks)

setDVDToDB

public void setDVDToDB(DVDInfo dvdInfo)

updateDVDDB

public void updateDVDDB(DVDInfo dvdInfo)

getCDDBIdx

public int getCDDBIdx(String artist,
                      String album)

getDVDDBIdx

public int getDVDDBIdx(long crcid)

setPlayInfo

public void setPlayInfo(CDInfo cdInfo,
                        TrackInfo trackInfo)

initUI

public void initUI()

setMenu

public void setMenu(int menuID,
                    int stack)

setLCDText

public void setLCDText(String text1,
                       String text2)
This method directly accesses the LCDController and lets it show a new text on the (optionally) connected display

Parameters:
text1 - the first line of the new text to be set
text2 - the second line of the new text to be set

getLCDText

public String getLCDText(int num)

setLCDErrorText

public void setLCDErrorText(String text)
This method overwrites the text currently displayed at an (optionally) connected display to display an important message instead of it. The original texts are not deleted by this operation

Parameters:
text - the error text to be displayed

setLCDMessageText

public void setLCDMessageText(String text)
This method overwrites the text currently displayed at an (optionally) connected display to display an important message instead of it. The original texts are not deleted by this operation

Parameters:
text - the message to be displayed

doLocalSQLQuery

public DefaultListModel doLocalSQLQuery(int table,
                                        String query)

doLocalSQLOperation

public void doLocalSQLOperation(String query)

turnOffBottomPanel

public void turnOffBottomPanel()

setStationsList

public void setStationsList(StationsList newList)

saveStations

public void saveStations(StationsList list)

saveRecording

public void saveRecording(RecordInfo info)

getPwdHash

public String getPwdHash()

scrollToObjectASync

public void scrollToObjectASync(JComponent component)