Class TabColorTransmitter
java.lang.Object
bibliothek.gui.dock.common.intern.ui.UITransmitter<Color,DockColor>
bibliothek.gui.dock.common.intern.color.ColorTransmitter
bibliothek.gui.dock.common.intern.color.TabColorTransmitter
- All Implemented Interfaces:
ColorBridge,UIBridge<Color,DockColor>
- Direct Known Subclasses:
BasicTabTransmitter,BubbleTabTransmitter,EclipseTabTransmitter,FlatTabTransmitter
A
ColorTransmitter used for TabColors.- Author:
- Benjamin Sigg
-
Constructor Summary
ConstructorsConstructorDescriptionTabColorTransmitter(ColorManager manager, String... keys) Creates a new transmitter. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ColorChanges a background color such that it can be used on aStackDockComponentprotected abstract ColorconvertFocused(Color source, String key) Changes a background color such that it can be used on aStackDockComponentprotected abstract ColorconvertSelected(Color source, String key) Changes a background color such that it can be used on aStackDockComponentprotected ColorSearches the coloridfordockable.protected ColorCalled when a value needs to be set whose key has been registered at thisUITransmitter.protected CDockablegetDockable(DockColor observer) Gets theCDockablewhich is associated withobserver.protected abstract booleanTells whetheridrepresents a color that is used on focused tabs.protected abstract booleanisForeground(String id) Tells whetheridrepresents a color that is used for the foreground.protected abstract booleanisSelected(String id) Tells whetheridrepresents a color that is used on selected tabs.protected voidCalled when a value in an observed map has changed.Methods inherited from class bibliothek.gui.dock.common.intern.color.ColorTransmitter
connect, disconnect, getFirstNonNullMethods inherited from class bibliothek.gui.dock.common.intern.ui.UITransmitter
add, remove, set, set, setControl
-
Constructor Details
-
TabColorTransmitter
Creates a new transmitter.- Parameters:
manager- the source of all colorskeys- the keys of the colors that are handled by this transmitter
-
-
Method Details
-
convert
Changes a background color such that it can be used on aStackDockComponent- Parameters:
source- the original colorkey- the key for which the color is needed- Returns:
- the new color
-
convertSelected
Changes a background color such that it can be used on aStackDockComponent- Parameters:
source- the original colorkey- the key for which the color is needed, can be one of the selected or focused kind- Returns:
- the new color
-
convertFocused
Changes a background color such that it can be used on aStackDockComponent- Parameters:
source- the original colorkey- the key for which the color is needed, can only be one of the focused kind- Returns:
- the new color
-
get
Description copied from class:UITransmitterCalled when a value needs to be set whose key has been registered at thisUITransmitter.- Specified by:
getin classUITransmitter<Color,DockColor> - Parameters:
color- the original valueid- the key of the valueobserver- the destination for the value- Returns:
- the value that should be set to
observer
-
isForeground
Tells whetheridrepresents a color that is used for the foreground.- Parameters:
id- some id- Returns:
trueif the color is used in the foreground
-
isSelected
Tells whetheridrepresents a color that is used on selected tabs.- Parameters:
id- some id- Returns:
trueif the color is used on selected tabs
-
isFocused
Tells whetheridrepresents a color that is used on focused tabs.- Parameters:
id- some id- Returns:
trueif the color is used on focused tabs
-
get
Searches the coloridfordockable.- Parameters:
color- the color to be returned if the search foridfails.id- the identifier of the color to searchdockable- the element for which the color will be used- Returns:
- some color
-
update
Description copied from class:UITransmitterCalled when a value in an observed map has changed.- Specified by:
updatein classUITransmitter<Color,DockColor> - Parameters:
dockable- the owner of the mapkey- the name of the changed valuecolor- the new value in the map, can benull
-
getDockable
Description copied from class:UITransmitterGets theCDockablewhich is associated withobserver.- Specified by:
getDockablein classUITransmitter<Color,DockColor> - Parameters:
observer- some observer- Returns:
- the associated dockable or
null
-