Search in sources :

Example 1 with IncompleteRenderer

use of org.jabref.gui.renderer.IncompleteRenderer in project jabref by JabRef.

the class MainTable method updateRenderers.

public static void updateRenderers() {
    MainTable.defRenderer = new GeneralRenderer(Globals.prefs.getColor(JabRefPreferences.TABLE_BACKGROUND), Globals.prefs.getColor(JabRefPreferences.TABLE_TEXT));
    Color sel = MainTable.defRenderer.getTableCellRendererComponent(new JTable(), "", true, false, 0, 0).getBackground();
    MainTable.reqRenderer = new GeneralRenderer(Globals.prefs.getColor(JabRefPreferences.TABLE_REQ_FIELD_BACKGROUND), Globals.prefs.getColor(JabRefPreferences.TABLE_TEXT));
    MainTable.optRenderer = new GeneralRenderer(Globals.prefs.getColor(JabRefPreferences.TABLE_OPT_FIELD_BACKGROUND), Globals.prefs.getColor(JabRefPreferences.TABLE_TEXT));
    MainTable.resolvedRenderer = new GeneralRenderer(Globals.prefs.getColor(JabRefPreferences.TABLE_RESOLVED_FIELD_BACKGROUND), Globals.prefs.getColor(JabRefPreferences.TABLE_TEXT));
    MainTable.incRenderer = new IncompleteRenderer();
    MainTable.compRenderer = new CompleteRenderer(Globals.prefs.getColor(JabRefPreferences.TABLE_BACKGROUND));
    MainTable.grayedOutNumberRenderer = new CompleteRenderer(Globals.prefs.getColor(JabRefPreferences.GRAYED_OUT_BACKGROUND));
    MainTable.veryGrayedOutNumberRenderer = new CompleteRenderer(Globals.prefs.getColor(JabRefPreferences.VERY_GRAYED_OUT_BACKGROUND));
    MainTable.grayedOutRenderer = new GeneralRenderer(Globals.prefs.getColor(JabRefPreferences.GRAYED_OUT_BACKGROUND), Globals.prefs.getColor(JabRefPreferences.GRAYED_OUT_TEXT), MainTable.mixColors(Globals.prefs.getColor(JabRefPreferences.GRAYED_OUT_BACKGROUND), sel));
    MainTable.veryGrayedOutRenderer = new GeneralRenderer(Globals.prefs.getColor(JabRefPreferences.VERY_GRAYED_OUT_BACKGROUND), Globals.prefs.getColor(JabRefPreferences.VERY_GRAYED_OUT_TEXT), MainTable.mixColors(Globals.prefs.getColor(JabRefPreferences.VERY_GRAYED_OUT_BACKGROUND), sel));
    MainTable.markedRenderers = new ArrayList<>(EntryMarker.MARK_COLOR_LEVELS);
    MainTable.markedNumberRenderers = new ArrayList<>(EntryMarker.MARK_COLOR_LEVELS);
    for (int i = 0; i < EntryMarker.MARK_COLOR_LEVELS; i++) {
        Color c = Globals.prefs.getColor(JabRefPreferences.MARKED_ENTRY_BACKGROUND + i);
        MainTable.markedRenderers.add(new GeneralRenderer(c, Globals.prefs.getColor(JabRefPreferences.TABLE_TEXT), MainTable.mixColors(Globals.prefs.getColor(JabRefPreferences.MARKED_ENTRY_BACKGROUND + i), sel)));
        MainTable.markedNumberRenderers.add(new CompleteRenderer(c));
    }
}
Also used : IncompleteRenderer(org.jabref.gui.renderer.IncompleteRenderer) Color(java.awt.Color) JTable(javax.swing.JTable) GeneralRenderer(org.jabref.gui.renderer.GeneralRenderer) CompleteRenderer(org.jabref.gui.renderer.CompleteRenderer) Point(java.awt.Point)

Aggregations

Color (java.awt.Color)1 Point (java.awt.Point)1 JTable (javax.swing.JTable)1 CompleteRenderer (org.jabref.gui.renderer.CompleteRenderer)1 GeneralRenderer (org.jabref.gui.renderer.GeneralRenderer)1 IncompleteRenderer (org.jabref.gui.renderer.IncompleteRenderer)1