コード例 #1
0
 /** reset the renderer */
 protected void reset() {
   setBackground(ConflictColors.BGCOLOR.get());
   setForeground(ConflictColors.FGCOLOR.get());
   setBorder(null);
   setIcon(null);
   setToolTipText(null);
 }
コード例 #2
0
 protected void renderBackground(
     ListMergeModel<Node>.EntriesTableModel model,
     RelationMember member,
     int row,
     int col,
     boolean isSelected) {
   Color bgc = ConflictColors.BGCOLOR.get();
   if (col == 0) {
     if (model.getListMergeModel().isFrozen()) {
       bgc = ConflictColors.BGCOLOR_FROZEN.get();
     } else if (model.isParticipatingInCurrentComparePair()) {
       bgc = ConflictColors.BGCOLOR_PARTICIPATING_IN_COMPARISON.get();
     } else if (isSelected) {
       bgc = ConflictColors.BGCOLOR_SELECTED.get();
     }
   } else {
     if (model.getListMergeModel().isFrozen()) {
       bgc = ConflictColors.BGCOLOR_FROZEN.get();
     } else if (member == null) {
       bgc = ConflictColors.BGCOLOR_EMPTY_ROW.get();
     } else if (isSelected) {
       bgc = ConflictColors.BGCOLOR_SELECTED.get();
     } else {
       if (model.isParticipatingInCurrentComparePair()) {
         if (model.isSamePositionInOppositeList(row)) {
           bgc = ConflictColors.BGCOLOR_SAME_POSITION_IN_OPPOSITE.get();
         } else if (model.isIncludedInOppositeList(row)) {
           bgc = ConflictColors.BGCOLOR_IN_OPPOSITE.get();
         } else {
           bgc = ConflictColors.BGCOLOR_NOT_IN_OPPOSITE.get();
         }
       }
     }
   }
   setBackground(bgc);
 }