- java.lang.Object
-
- tvbrowser.core.filters.filtercomponents.SingleChannelFilterComponent
-
- All Implemented Interfaces:
FilterComponent
public class SingleChannelFilterComponent extends java.lang.Object implements FilterComponent
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface tvbrowser.core.filters.FilterComponent
FilterComponent.NameComparator, FilterComponent.TypeComparator
-
-
Constructor Summary
Constructors Constructor Description SingleChannelFilterComponent(Channel ch)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(Program program)
Checks a program if it is acceptable by the FilterComponent.boolean
containsChannel(Channel ch)
java.lang.String
getDescription()
Gets the description of a FilterComponent.java.lang.String
getLoadName()
java.lang.String
getName()
Gets the name of a FilterComponent.javax.swing.JPanel
getSettingsPanel()
Gets the settings panel for a FilterComponent.java.lang.String
getTypeDescription()
Gets the description of a FilterComponent type.int
getVersion()
Gets the version number of a FilterComponent.boolean
isBrokenCompletely()
boolean
isBrokenPartially()
boolean
isNameToUpdate()
boolean
isValidChannel()
void
read(java.io.ObjectInputStream in, int version)
Loads the settings of a FilterComponent from an ObjectInputStream.void
saveSettings()
Is called when the settings should be saved (i.e. the users pressed the OK button in the settings dialog)void
setDescription(java.lang.String desc)
Sets the description of a FilterComponent.void
setName(java.lang.String name)
Sets the name of a FilterComponent.void
updateName()
void
write(java.io.ObjectOutputStream out)
Saves the settings of a FilterComponent to an ObjectOutputStream.
-
-
-
Constructor Detail
-
SingleChannelFilterComponent
public SingleChannelFilterComponent(Channel ch)
-
-
Method Detail
-
getVersion
public int getVersion()
Description copied from interface:FilterComponent
Gets the version number of a FilterComponent.- Specified by:
getVersion
in interfaceFilterComponent
- Returns:
- The version number of a FilterComponent.
-
accept
public boolean accept(Program program)
Description copied from interface:FilterComponent
Checks a program if it is acceptable by the FilterComponent.- Specified by:
accept
in interfaceFilterComponent
- Parameters:
program
- The program to check.- Returns:
true
if the program is acceptable by the FilterComponent,false
otherwise.
-
read
public void read(java.io.ObjectInputStream in, int version) throws java.io.IOException, java.lang.ClassNotFoundException
Description copied from interface:FilterComponent
Loads the settings of a FilterComponent from an ObjectInputStream.- Specified by:
read
in interfaceFilterComponent
- Parameters:
in
- The stream to read from.version
- The version of the data.- Throws:
java.io.IOException
- Thrown if an IO operation went wrong.java.lang.ClassNotFoundException
- Thrown if a class could not be found.
-
write
public void write(java.io.ObjectOutputStream out) throws java.io.IOException
Description copied from interface:FilterComponent
Saves the settings of a FilterComponent to an ObjectOutputStream.- Specified by:
write
in interfaceFilterComponent
- Parameters:
out
- The stream to write to.- Throws:
java.io.IOException
- Thrown if an IO operation went wrong.
-
getSettingsPanel
public javax.swing.JPanel getSettingsPanel()
Description copied from interface:FilterComponent
Gets the settings panel for a FilterComponent.- Specified by:
getSettingsPanel
in interfaceFilterComponent
- Returns:
- The settings panel the FilterComponent.
-
saveSettings
public void saveSettings()
Description copied from interface:FilterComponent
Is called when the settings should be saved (i.e. the users pressed the OK button in the settings dialog)- Specified by:
saveSettings
in interfaceFilterComponent
-
getName
public java.lang.String getName()
Description copied from interface:FilterComponent
Gets the name of a FilterComponent.- Specified by:
getName
in interfaceFilterComponent
- Returns:
- The name of the FilterComponent.
-
getTypeDescription
public java.lang.String getTypeDescription()
Description copied from interface:FilterComponent
Gets the description of a FilterComponent type.- Specified by:
getTypeDescription
in interfaceFilterComponent
- Returns:
- The description of the FilterComponent type.
-
getDescription
public java.lang.String getDescription()
Description copied from interface:FilterComponent
Gets the description of a FilterComponent.- Specified by:
getDescription
in interfaceFilterComponent
- Returns:
- The description of the FilterComponent.
-
setName
public void setName(java.lang.String name)
Description copied from interface:FilterComponent
Sets the name of a FilterComponent.- Specified by:
setName
in interfaceFilterComponent
- Parameters:
name
- The new name of the FilterComponent.
-
setDescription
public void setDescription(java.lang.String desc)
Description copied from interface:FilterComponent
Sets the description of a FilterComponent.- Specified by:
setDescription
in interfaceFilterComponent
- Parameters:
desc
- The new description of the FilterComponent.
-
getLoadName
public java.lang.String getLoadName()
-
isNameToUpdate
public boolean isNameToUpdate()
-
updateName
public void updateName()
-
isValidChannel
public boolean isValidChannel()
-
containsChannel
public boolean containsChannel(Channel ch)
-
isBrokenPartially
public boolean isBrokenPartially()
-
isBrokenCompletely
public boolean isBrokenCompletely()
-
-