use of org.eclipse.jface.resource.ColorRegistry in project dbeaver by dbeaver.
the class SQLScriptStatusDialog method endObjectProcessing.
@Override
public void endObjectProcessing(@NotNull T object, Exception error) {
UIUtils.packColumns(objectTree, false, null);
TreeItem treeItem = getTreeItem(object);
if (treeItem != null) {
treeItem.setText(1, error == null ? "Done" : error.getMessage());
if (error != null) {
ColorRegistry colorRegistry = UIUtils.getActiveWorkbenchWindow().getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
Color colorError = colorRegistry.get(QueryLogViewer.COLOR_REVERTED);
treeItem.setForeground(1, colorError);
}
}
}
use of org.eclipse.jface.resource.ColorRegistry in project dbeaver by serge-rider.
the class EntityFigure method setColors.
private void setColors() {
ColorRegistry colorRegistry = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
if (entity.isPrimary()) {
setBackgroundColor(colorRegistry.get(ERDConstants.COLOR_ERD_ENTITY_PRIMARY_BACKGROUND));
} else if (entity.getObject().getEntityType() == DBSEntityType.ASSOCIATION) {
setBackgroundColor(colorRegistry.get(ERDConstants.COLOR_ERD_ENTITY_ASSOCIATION_BACKGROUND));
} else {
setBackgroundColor(colorRegistry.get(ERDConstants.COLOR_ERD_ENTITY_REGULAR_BACKGROUND));
}
setForegroundColor(colorRegistry.get(ERDConstants.COLOR_ERD_ENTITY_NAME_FOREGROUND));
nameLabel.setForegroundColor(colorRegistry.get(ERDConstants.COLOR_ERD_ENTITY_NAME_FOREGROUND));
}
use of org.eclipse.jface.resource.ColorRegistry in project dbeaver by serge-rider.
the class EntityFigure method add.
@Override
public void add(IFigure figure, Object constraint, int index) {
if (figure instanceof AttributeItemFigure) {
ColorRegistry colorRegistry = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
figure.setForegroundColor(colorRegistry.get(ERDConstants.COLOR_ERD_ATTR_FOREGROUND));
figure.setBackgroundColor(colorRegistry.get(ERDConstants.COLOR_ERD_ATTR_BACKGROUND));
if (((AttributeItemFigure) figure).getAttribute().isInPrimaryKey()) {
keyFigure.add(figure, constraint, -1);
} else {
attributeFigure.add(figure, constraint, -1);
}
} else {
super.add(figure, constraint, index);
}
}
use of org.eclipse.jface.resource.ColorRegistry in project tdi-studio-se by Talend.
the class JSONToXPathLinker method initColors.
/**
* DOC amaumont Comment method "initColors".
*
* @param display
*/
private void initColors(Display display) {
RGB selectedLoopLinkRGB = new RGB(255, 131, 0);
RGB selectedRelativeLinkRGB = new RGB(110, 168, 255);
ColorRegistry colorRegistry = JFaceResources.getColorRegistry();
if (colorRegistry.get(selectedLoopLinkRGB.toString()) == null) {
colorRegistry.put(selectedLoopLinkRGB.toString(), selectedLoopLinkRGB);
}
if (colorRegistry.get(selectedRelativeLinkRGB.toString()) == null) {
colorRegistry.put(selectedRelativeLinkRGB.toString(), selectedRelativeLinkRGB);
}
selectedLoopLinkColor = colorRegistry.get(selectedLoopLinkRGB.toString());
selectedRelativeLinkColor = colorRegistry.get(selectedRelativeLinkRGB.toString());
}
use of org.eclipse.jface.resource.ColorRegistry in project dbeaver by dbeaver.
the class EntityFigure method setColors.
private void setColors() {
ColorRegistry colorRegistry = UIUtils.getColorRegistry();
if (entity.isPrimary()) {
setBackgroundColor(colorRegistry.get(ERDConstants.COLOR_ERD_ENTITY_PRIMARY_BACKGROUND));
} else if (entity.getObject().getEntityType() == DBSEntityType.ASSOCIATION) {
setBackgroundColor(colorRegistry.get(ERDConstants.COLOR_ERD_ENTITY_ASSOCIATION_BACKGROUND));
} else {
setBackgroundColor(colorRegistry.get(ERDConstants.COLOR_ERD_ENTITY_REGULAR_BACKGROUND));
}
setForegroundColor(colorRegistry.get(ERDConstants.COLOR_ERD_ENTITY_NAME_FOREGROUND));
nameLabel.setForegroundColor(colorRegistry.get(ERDConstants.COLOR_ERD_ENTITY_NAME_FOREGROUND));
}
Aggregations