Styling zest graph nodes and connections
-
04-06-2021 - |
Domanda
I wish to change some visual properties of nodes and connections. How better can it be done? I found that visual information is applied in model factory that is returned from org.eclipse.zest.core.viewers.GraphViewer.getFactory()
. There are three factories and all are placed in internal package org.eclipse.zest.core.viewers.internal
.
Is it good approach to override org.eclipse.zest.core.viewers.GraphViewer.getFactory()
and return own factory that does all necessary styling actions?
Soluzione
There is interface org.eclipse.zest.core.viewers.ISelfStyleProvider
which solves my problem without hacking into zest internal structure!
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow