util.ui
Class ChannelLabel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLabel
util.ui.ChannelLabel
- All Implemented Interfaces:
- ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants
- Direct Known Subclasses:
- ChannelLabel
public class ChannelLabel
- extends JLabel
A Label for Channels. It shows the Icon and/or the Channel-Name
- See Also:
- Serialized Form
|
Field Summary |
(package private) static Icon |
DEFAULT_ICON
default channel icon, already prepared for right size |
| Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
|
Constructor Summary |
ChannelLabel()
Creates the ChannelLabel |
ChannelLabel(boolean channelIconsVisible)
Creates the ChannelLabel |
ChannelLabel(boolean channelIconsVisible,
boolean textIsVisible)
Creates the ChanelLabel |
ChannelLabel(boolean channelIconsVisible,
boolean textIsVisible,
boolean showDefaultValues)
Creates the ChanelLabel |
ChannelLabel(boolean channelIconsVisible,
boolean textIsVisible,
boolean showDefaultValues,
boolean showCountry)
Creates the ChanelLabel |
ChannelLabel(Channel ch)
Creates the ChannelLabel |
ChannelLabel(Channel ch,
boolean channelIconsVisible)
Creates the ChannelLabel |
ChannelLabel(Channel ch,
boolean channelIconsVisible,
boolean textIsVisible)
Creates the ChannelLabel |
|
Method Summary |
static void |
clearIconCache()
Clear the icon cache. |
void |
setChannel(Channel channel)
Sets the Channel to display |
void |
setIcon(Icon ic)
do not call this method, use setChannel instead, which will
set an icon matching all the current settings for the selected
channel |
void |
setMinimumSize(Dimension dim)
Set the minimum-Size. |
void |
setShowCountry(boolean showCountry)
Should the country be added to the channel name ? |
void |
setShowService(boolean showService)
Should the service name be added to the channel name ? |
| Methods inherited from class javax.swing.JLabel |
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setHorizontalAlignment, setHorizontalTextPosition, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, 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, getPreferredSize, 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, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, 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, 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, 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 |
DEFAULT_ICON
static Icon DEFAULT_ICON
- default channel icon, already prepared for right size
ChannelLabel
public ChannelLabel()
- Creates the ChannelLabel
ChannelLabel
public ChannelLabel(boolean channelIconsVisible)
- Creates the ChannelLabel
- Parameters:
channelIconsVisible - Should the Icon be visible
ChannelLabel
public ChannelLabel(boolean channelIconsVisible,
boolean textIsVisible)
- Creates the ChanelLabel
- Parameters:
channelIconsVisible - Should the Icon be visibletextIsVisible - Should Text be visible ?
ChannelLabel
public ChannelLabel(boolean channelIconsVisible,
boolean textIsVisible,
boolean showDefaultValues)
- Creates the ChanelLabel
- Parameters:
channelIconsVisible - Should the Icon be visibletextIsVisible - Should Text be visible ?showDefaultValues - Show the default channel icon and name.
ChannelLabel
public ChannelLabel(boolean channelIconsVisible,
boolean textIsVisible,
boolean showDefaultValues,
boolean showCountry)
- Creates the ChanelLabel
- Parameters:
channelIconsVisible - Should the Icon be visibletextIsVisible - Should Text be visible ?showDefaultValues - Show the default channel icon and name.showCountry - Show infomation about the country- Since:
- 2.6
ChannelLabel
public ChannelLabel(Channel ch)
- Creates the ChannelLabel
- Parameters:
ch - Channel to display
ChannelLabel
public ChannelLabel(Channel ch,
boolean channelIconsVisible,
boolean textIsVisible)
- Creates the ChannelLabel
- Parameters:
ch - Channel to displaychannelIconsVisible - Should the Icon be visibletextIsVisible - Should Text be visible ?- Since:
- 2.2
ChannelLabel
public ChannelLabel(Channel ch,
boolean channelIconsVisible)
- Creates the ChannelLabel
- Parameters:
ch - Channel to displaychannelIconsVisible - Should the Icon be visible- Since:
- 2.2
setChannel
public void setChannel(Channel channel)
- Sets the Channel to display
- Parameters:
channel - Channel to display
setMinimumSize
public void setMinimumSize(Dimension dim)
- Set the minimum-Size.
Overridden to set the Size now
- Overrides:
setMinimumSize in class JComponent
- Parameters:
dim -
setIcon
public void setIcon(Icon ic)
- do not call this method, use setChannel instead, which will
set an icon matching all the current settings for the selected
channel
- Overrides:
setIcon in class JLabel
- Parameters:
ic - Icon
setShowCountry
public void setShowCountry(boolean showCountry)
- Should the country be added to the channel name ?
- Parameters:
showCountry - add country name to channel name ?- Since:
- 2.6
setShowService
public void setShowService(boolean showService)
- Should the service name be added to the channel name ?
- Parameters:
showService - add service name to channel name ?- Since:
- 2.6
clearIconCache
public static void clearIconCache()
- Clear the icon cache.
This may be useful after lots of channel labels have been
created (e.g. in the settings dialog).
- Since:
- 2.7
TV-Browser 2.7.5, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)