Package net.officefloor.gef.editor.style
Class AbstractStyleRegistry
- java.lang.Object
-
- net.officefloor.gef.editor.style.AbstractStyleRegistry
-
- All Implemented Interfaces:
StyleRegistry
- Direct Known Subclasses:
DefaultStyleRegistry,SystemStyleRegistry
public class AbstractStyleRegistry extends java.lang.Object implements StyleRegistry
AbstractStyleRegistry.- Author:
- Daniel Sagenschneider
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPROTOCOLURLprotocol.
-
Constructor Summary
Constructors Constructor Description AbstractStyleRegistry()Instantiate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description javafx.beans.property.ReadOnlyProperty<java.lang.String>getStylesheetContent(java.lang.String url)Obtains the style sheet content.protected java.net.URLgetUrl(java.lang.String configurationPath, int version)Obtains theURLfor the configuration path.static java.net.URLConnectionopenConnection(java.net.URL url)Creates theURLStreamHandler.javafx.beans.property.ReadOnlyProperty<java.net.URL>registerStyle(java.lang.String configurationPath, javafx.beans.property.ReadOnlyProperty<java.lang.String> stylesheetContent)=============== StyleRegistry =====================
-
-
-
Field Detail
-
PROTOCOL
public static final java.lang.String PROTOCOL
URLprotocol.- See Also:
- Constant Field Values
-
-
Method Detail
-
openConnection
public static java.net.URLConnection openConnection(java.net.URL url) throws java.io.IOExceptionCreates theURLStreamHandler.- Parameters:
url-URLto open.- Returns:
URLStreamHandler.- Throws:
java.io.IOException- If fails to open theURLConnection.
-
getStylesheetContent
public javafx.beans.property.ReadOnlyProperty<java.lang.String> getStylesheetContent(java.lang.String url)
Obtains the style sheet content.- Parameters:
url-URL.- Returns:
ReadOnlyPropertyto the content of the style sheet for theURL. May benullif editor no longer active.
-
getUrl
protected java.net.URL getUrl(java.lang.String configurationPath, int version)Obtains theURLfor the configuration path.- Parameters:
configurationPath- Configuration path.version- Version of the content for theURL.- Returns:
URLfor the configuration path.
-
registerStyle
public javafx.beans.property.ReadOnlyProperty<java.net.URL> registerStyle(java.lang.String configurationPath, javafx.beans.property.ReadOnlyProperty<java.lang.String> stylesheetContent)=============== StyleRegistry =====================- Specified by:
registerStylein interfaceStyleRegistry- Parameters:
configurationPath- Configuration path to the style.stylesheetContent- Style sheet content for theIVisualPartof the configuration item.- Returns:
ReadOnlyPropertyto theURLStringof the style.
-
-