TV-Browser 2.7.5 API

tvraterplugin
Class TVRaterFilter

java.lang.Object
  extended by devplugin.PluginsFilterComponent
      extended by tvraterplugin.TVRaterFilter
All Implemented Interfaces:
FilterComponent

public class TVRaterFilter
extends PluginsFilterComponent

This FilterComponent gives the users the opportunity to filter for ratings of shows.


Nested Class Summary
 
Nested classes/interfaces inherited from interface tvbrowser.core.filters.FilterComponent
FilterComponent.NameComparator, FilterComponent.TypeComparator
 
Field Summary
(package private)  boolean _best
          Show programs that are better or worse than the _value
(package private)  int _value
          Accept-Value
 
Constructor Summary
TVRaterFilter()
           
 
Method Summary
 boolean accept(Program program)
          Accept Programs if rating fits
 JPanel getSettingsPanel()
          Gets the settings panel for this filter component.
 String getUserPresentableClassName()
          Returns the user presentable name of this class.
 int getVersion()
          Gets the version number of a FilterComponent.
 void read(ObjectInputStream in, int version)
          Load settings
 void saveSettings()
          Is called when the settings should be saved (aka the users pressed the OK-Button in the Settings Dialog)
 void write(ObjectOutputStream out)
          Store Settigns
 
Methods inherited from class devplugin.PluginsFilterComponent
getDescription, getName, setDescription, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_value

int _value
Accept-Value


_best

boolean _best
Show programs that are better or worse than the _value

Constructor Detail

TVRaterFilter

public TVRaterFilter()
Method Detail

getUserPresentableClassName

public String getUserPresentableClassName()
Description copied from class: PluginsFilterComponent
Returns the user presentable name of this class. Don't return null, return always a clear name that discribes this filter component for selection in the filter component dialog.

Specified by:
getUserPresentableClassName in class PluginsFilterComponent
Returns:
Name of the Filter

getVersion

public int getVersion()
Description copied from interface: FilterComponent
Gets the version number of a FilterComponent.

Returns:
Version

accept

public boolean accept(Program program)
Accept Programs if rating fits

Parameters:
program - check this program
Returns:
true, if rating fits

read

public void read(ObjectInputStream in,
                 int version)
          throws IOException,
                 ClassNotFoundException
Load settings

Parameters:
in - load settings from this stream
version - Version of the stream
Throws:
IOException - Problems reading the Data
ClassNotFoundException - Problems creating classes while reading

write

public void write(ObjectOutputStream out)
           throws IOException
Store Settigns

Parameters:
out - store settings here
Throws:
IOException - Exception while storing the data

getSettingsPanel

public JPanel getSettingsPanel()
Description copied from class: PluginsFilterComponent
Gets the settings panel for this filter component.

Specified by:
getSettingsPanel in interface FilterComponent
Overrides:
getSettingsPanel in class PluginsFilterComponent
Returns:
The settings panel for this filter component.

saveSettings

public void saveSettings()
Description copied from class: PluginsFilterComponent
Is called when the settings should be saved (aka the users pressed the OK-Button in the Settings Dialog)

Specified by:
saveSettings in interface FilterComponent
Overrides:
saveSettings in class PluginsFilterComponent

TV-Browser 2.7.5 API

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