|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbibliothek.gui.dock.util.AbstractUIScheme<Icon,DockIcon,DockIconBridge>
bibliothek.gui.dock.util.icon.AbstractIconScheme
bibliothek.gui.dock.util.icon.DefaultIconScheme
public class DefaultIconScheme
This default implementation of an UIScheme
for Icon
s reads an ini-file
which consists of "key=icon-path" pairs, and loads all the icons described in that
ini file when needed.
Nested Class Summary | |
---|---|
static class |
DefaultIconScheme.IconResource
A helper class describing a source for icons |
Constructor Summary | |
---|---|
DefaultIconScheme(DockController controller,
DefaultIconScheme.IconResource... resources)
Creates a new scheme loading icons from all the specified resources. |
|
DefaultIconScheme(String file,
ClassLoader loader,
DockController controller)
Creates a new scheme loading first the contents of the ini file file and
then the icons that are found by analyzing the content of file . |
|
DefaultIconScheme(String file,
DockController controller)
Creates a new scheme loading first the contents of the ini file file and
then the icons that are found by analyzing the content of file . |
Method Summary | |
---|---|
protected void |
changed(String id,
Icon icon)
Called if property accessed through a PropertyKey changed its value. |
DockIconBridge |
getBridge(Path name,
UIProperties<Icon,DockIcon,DockIconBridge> properties)
Creates the UIBridge that handles resources of type name . |
Icon |
getResource(String name,
UIProperties<Icon,DockIcon,DockIconBridge> properties)
Creates the resource with name name . |
protected void |
initHardcoded()
Called by the constructor of this class, initializes some hard coded icons. |
void |
setBridge(Path type,
DockIconBridge bridge)
Sets the DockIconBridge with type type . |
void |
setIcon(String name,
Icon icon)
Changes the icon with name name to icon . |
Methods inherited from class bibliothek.gui.dock.util.icon.AbstractIconScheme |
---|
install, link, uninstall, unlink |
Methods inherited from class bibliothek.gui.dock.util.AbstractUIScheme |
---|
addListener, fire, removeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultIconScheme(String file, DockController controller)
file
and
then the icons that are found by analyzing the content of file
.
file
- the file to readcontroller
- the DockController
in whose realm this scheme will be usedpublic DefaultIconScheme(String file, ClassLoader loader, DockController controller)
file
and
then the icons that are found by analyzing the content of file
.
file
- the file to readloader
- the ClassLoader
whose ClassLoader.getResource(String)
method
will be used to load any filescontroller
- the DockController
in whose realm this scheme will be usedpublic DefaultIconScheme(DockController controller, DefaultIconScheme.IconResource... resources)
controller
- the DockController
in whose realm this scheme will be usedresources
- a list of files with "key=path" lines telling key and path of the icons to load. If a key
appears more than once, then the last occurance of the key winsMethod Detail |
---|
protected void initHardcoded()
public DockIconBridge getBridge(Path name, UIProperties<Icon,DockIcon,DockIconBridge> properties)
UIScheme
UIBridge
that handles resources of type name
.
name
- the name of the bridgeproperties
- the map that will use the resource
null
if this scheme does not know name
public Icon getResource(String name, UIProperties<Icon,DockIcon,DockIconBridge> properties)
UIScheme
name
. This method may be called often
and should complete quickly.
name
- the name of some resourceproperties
- the map that will use the resource
null
if this scheme does not know name
public void setIcon(String name, Icon icon)
name
to icon
. Please note that if
name
was linked
, the newly
set value may be overriden again.
name
- the unique key of the iconicon
- the new icon, can be null
public void setBridge(Path type, DockIconBridge bridge)
DockIconBridge
with type type
.
type
- the unique identifier of the type that should be handled by the new bridgebridge
- the new bridge or null
protected void changed(String id, Icon icon)
AbstractIconScheme
PropertyKey
changed its value.
changed
in class AbstractIconScheme
id
- the identifier of the value that changedicon
- the new value, can be null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |