public class DefaultGraphStyle extends java.lang.Object implements GraphStyle, javax.swing.event.ChangeListener
Modifier and Type | Field and Description |
---|---|
protected GraphPresenter |
presenter |
protected com.mxgraph.view.mxStylesheet |
stylesheet |
Constructor and Description |
---|
DefaultGraphStyle() |
Modifier and Type | Method and Description |
---|---|
com.mxgraph.view.mxStylesheet |
createStylesheet(GraphOwner owner,
de.ims.icarus.util.Options options)
Generates a
mxStylesheet to be used for the given
graph. |
protected GraphPresenter |
getPresenter() |
java.lang.String |
getStyle(GraphOwner owner,
java.lang.Object cell,
de.ims.icarus.util.Options options)
Generate a style string to be used for the given cell.
|
com.mxgraph.view.mxStylesheet |
getStylesheet() |
protected void |
initStylesheet() |
void |
install(java.lang.Object target) |
protected java.lang.String |
int2ColString(int value) |
protected void |
readDefaultEdgeStyle(java.util.Map<java.lang.String,java.lang.Object> style,
de.ims.icarus.config.ConfigRegistry.Handle handle) |
protected void |
readDefaultNodeStyle(java.util.Map<java.lang.String,java.lang.Object> style,
de.ims.icarus.config.ConfigRegistry.Handle handle) |
protected void |
readFontStyle(java.util.Map<java.lang.String,java.lang.Object> style,
de.ims.icarus.config.ConfigRegistry.Handle handle) |
protected void |
refreshStylesheet(de.ims.icarus.config.ConfigRegistry.Handle handle) |
void |
stateChanged(javax.swing.event.ChangeEvent e) |
void |
uninstall(java.lang.Object target) |
protected com.mxgraph.view.mxStylesheet stylesheet
protected GraphPresenter presenter
public void install(java.lang.Object target)
install
in interface de.ims.icarus.util.Installable
Installable.install(java.lang.Object)
public void uninstall(java.lang.Object target)
uninstall
in interface de.ims.icarus.util.Installable
Installable.uninstall(java.lang.Object)
protected GraphPresenter getPresenter()
public com.mxgraph.view.mxStylesheet createStylesheet(GraphOwner owner, de.ims.icarus.util.Options options)
GraphStyle
mxStylesheet
to be used for the given
graph. It is up to the GraphStyle
implementation
whether all possible styles should be defined in the returned
stylesheet. Typical implementations will define some general
base styles and do the "decoration" when asked to fetch the
style for a particular cell.createStylesheet
in interface GraphStyle
GraphStyle.createStylesheet(de.ims.icarus.plugins.jgraph.layout.GraphOwner, de.ims.icarus.util.Options)
public com.mxgraph.view.mxStylesheet getStylesheet()
protected void initStylesheet()
protected void refreshStylesheet(de.ims.icarus.config.ConfigRegistry.Handle handle)
protected java.lang.String int2ColString(int value)
protected void readDefaultNodeStyle(java.util.Map<java.lang.String,java.lang.Object> style, de.ims.icarus.config.ConfigRegistry.Handle handle)
protected void readDefaultEdgeStyle(java.util.Map<java.lang.String,java.lang.Object> style, de.ims.icarus.config.ConfigRegistry.Handle handle)
protected void readFontStyle(java.util.Map<java.lang.String,java.lang.Object> style, de.ims.icarus.config.ConfigRegistry.Handle handle)
public java.lang.String getStyle(GraphOwner owner, java.lang.Object cell, de.ims.icarus.util.Options options)
GraphStyle
Note that the GraphStyle
implementation itself is not
meant to set the style on a cell directly! It is merely a
source for style definitions and responsible for fetching
the right style.
getStyle
in interface GraphStyle
GraphStyle.getStyle(de.ims.icarus.plugins.jgraph.layout.GraphOwner, java.lang.Object, de.ims.icarus.util.Options)
public void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged
in interface javax.swing.event.ChangeListener
ChangeListener.stateChanged(javax.swing.event.ChangeEvent)