Module org.bigdataviewer.core
Package bdv.ui.settings.style
Class AbstractStyleManager<M extends AbstractStyleManager<M,S>,S extends Style<S>>
- java.lang.Object
-
- bdv.ui.settings.style.AbstractStyleManager<M,S>
-
- All Implemented Interfaces:
StyleManager<M,S>
- Direct Known Subclasses:
AbstractKeymapManager
public abstract class AbstractStyleManager<M extends AbstractStyleManager<M,S>,S extends Style<S>> extends Object implements StyleManager<M,S>
-
-
Field Summary
Fields Modifier and Type Field Description protected List<S>builtinStylesprotected SselectedStyleprotected List<S>userStyles
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractStyleManager()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Sduplicate(S style)Returns a copy of the specifiedstyle, making sure that the copy receives a name not already present in this manager's list of styles.List<S>getBuiltinStyles()SgetSelectedStyle()List<S>getUserStyles()protected abstract List<S>loadBuiltinStyles()protected booleannameExists(String name)voidremove(S style)voidrename(S style, String newName)voidset(M other)voidsetSelectedStyle(S style)protected Optional<S>styleForName(String name)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface bdv.ui.settings.style.StyleManager
saveStyles
-
-
-
-
Method Detail
-
set
public void set(M other)
- Specified by:
setin interfaceStyleManager<M extends AbstractStyleManager<M,S>,S extends Style<S>>
-
getBuiltinStyles
public List<S> getBuiltinStyles()
- Specified by:
getBuiltinStylesin interfaceStyleManager<M extends AbstractStyleManager<M,S>,S extends Style<S>>
-
getUserStyles
public List<S> getUserStyles()
- Specified by:
getUserStylesin interfaceStyleManager<M extends AbstractStyleManager<M,S>,S extends Style<S>>
-
getSelectedStyle
public S getSelectedStyle()
- Specified by:
getSelectedStylein interfaceStyleManager<M extends AbstractStyleManager<M,S>,S extends Style<S>>
-
setSelectedStyle
public void setSelectedStyle(S style)
- Specified by:
setSelectedStylein interfaceStyleManager<M extends AbstractStyleManager<M,S>,S extends Style<S>>
-
remove
public void remove(S style)
- Specified by:
removein interfaceStyleManager<M extends AbstractStyleManager<M,S>,S extends Style<S>>
-
rename
public void rename(S style, String newName)
- Specified by:
renamein interfaceStyleManager<M extends AbstractStyleManager<M,S>,S extends Style<S>>
-
duplicate
public S duplicate(S style)
Returns a copy of the specifiedstyle, making sure that the copy receives a name not already present in this manager's list of styles.- Specified by:
duplicatein interfaceStyleManager<M extends AbstractStyleManager<M,S>,S extends Style<S>>- Parameters:
style- the style to copy.- Returns:
- a new style
-
nameExists
protected boolean nameExists(String name)
-
-