use of org.eclipse.e4.ui.css.core.dom.ExtendedDocumentCSS in project dbeaver by serge-rider.
the class ApplicationCSSManager method updateApplicationCSS.
static void updateApplicationCSS(Display display) {
CSSEngine engine = WidgetElement.getEngine(display);
if (engine == null) {
log.error("No CSSEngine");
return;
}
ExtendedDocumentCSS doc = (ExtendedDocumentCSS) engine.getDocumentCSS();
List<StyleSheet> sheets = new ArrayList<>();
StyleSheetList list = doc.getStyleSheets();
for (int i = 0; i < list.getLength(); i++) {
sheets.add(list.item(i));
}
try {
Reader reader = new StringReader(EXTRA_CSS);
sheets.add(engine.parseStyleSheet(reader));
doc.removeAllStyleSheets();
for (StyleSheet sheet : sheets) {
doc.addStyleSheet(sheet);
}
engine.reapply();
} catch (Exception e) {
log.error(e);
}
}
use of org.eclipse.e4.ui.css.core.dom.ExtendedDocumentCSS in project dbeaver by dbeaver.
the class ApplicationCSSManager method updateApplicationCSS.
static void updateApplicationCSS(Display display) {
CSSEngine engine = WidgetElement.getEngine(display);
if (engine == null) {
log.error("No CSSEngine");
return;
}
ExtendedDocumentCSS doc = (ExtendedDocumentCSS) engine.getDocumentCSS();
List<StyleSheet> sheets = new ArrayList<>();
StyleSheetList list = doc.getStyleSheets();
for (int i = 0; i < list.getLength(); i++) {
sheets.add(list.item(i));
}
try {
Reader reader = new StringReader(TABBED_FOLDER_STYLE);
sheets.add(engine.parseStyleSheet(reader));
doc.removeAllStyleSheets();
for (StyleSheet sheet : sheets) {
doc.addStyleSheet(sheet);
}
// engine.reapply();
} catch (Exception e) {
log.error(e);
}
}
use of org.eclipse.e4.ui.css.core.dom.ExtendedDocumentCSS in project dbeaver by dbeaver.
the class ApplicationCSSManager method updateApplicationCSS.
static void updateApplicationCSS(Display display) {
CSSEngine engine = WidgetElement.getEngine(display);
if (engine == null) {
log.error("No CSSEngine");
return;
}
ExtendedDocumentCSS doc = (ExtendedDocumentCSS) engine.getDocumentCSS();
List<StyleSheet> sheets = new ArrayList<>();
StyleSheetList list = doc.getStyleSheets();
for (int i = 0; i < list.getLength(); i++) {
sheets.add(list.item(i));
}
try {
Reader reader = new StringReader(EXTRA_CSS);
sheets.add(engine.parseStyleSheet(reader));
doc.removeAllStyleSheets();
for (StyleSheet sheet : sheets) {
doc.addStyleSheet(sheet);
}
engine.reapply();
} catch (Exception e) {
log.error(e);
}
}
use of org.eclipse.e4.ui.css.core.dom.ExtendedDocumentCSS in project dbeaver by serge-rider.
the class ApplicationCSSManager method updateApplicationCSS.
static void updateApplicationCSS(Display display) {
CSSEngine engine = WidgetElement.getEngine(display);
if (engine == null) {
log.error("No CSSEngine");
return;
}
ExtendedDocumentCSS doc = (ExtendedDocumentCSS) engine.getDocumentCSS();
List<StyleSheet> sheets = new ArrayList<>();
StyleSheetList list = doc.getStyleSheets();
for (int i = 0; i < list.getLength(); i++) {
sheets.add(list.item(i));
}
try {
Reader reader = new StringReader(TABBED_FOLDER_STYLE);
sheets.add(engine.parseStyleSheet(reader));
doc.removeAllStyleSheets();
for (StyleSheet sheet : sheets) {
doc.addStyleSheet(sheet);
}
// engine.reapply();
} catch (Exception e) {
log.error(e);
}
}
Aggregations