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.String
PROTOCOL
URL
protocol.
-
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.URL
getUrl(java.lang.String configurationPath, int version)
Obtains theURL
for the configuration path.static java.net.URLConnection
openConnection(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
URL
protocol.- See Also:
- Constant Field Values
-
-
Method Detail
-
openConnection
public static java.net.URLConnection openConnection(java.net.URL url) throws java.io.IOException
Creates theURLStreamHandler
.- Parameters:
url
-URL
to 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:
ReadOnlyProperty
to the content of the style sheet for theURL
. May benull
if editor no longer active.
-
getUrl
protected java.net.URL getUrl(java.lang.String configurationPath, int version)
Obtains theURL
for the configuration path.- Parameters:
configurationPath
- Configuration path.version
- Version of the content for theURL
.- Returns:
URL
for 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:
registerStyle
in interfaceStyleRegistry
- Parameters:
configurationPath
- Configuration path to the style.stylesheetContent
- Style sheet content for theIVisualPart
of the configuration item.- Returns:
ReadOnlyProperty
to theURL
String
of the style.
-
-