Esempio n. 1
0
 /*
  * (non-Javadoc)
  * @see org.eclipse.jface.viewers.ITableColorProvider#getBackground(java.lang.Object, int)
  */
 public Color getBackground(Object element, int columnIndex) {
   String color = ClientResources.INFO_COLOR;
   if (columnIndex == 0) {
     Message msg = (Message) element;
     switch (msg.getLevel()) {
       case ERROR:
         color = ClientResources.ERROR_COLOR;
         break;
       case INFORMATION:
         color = ClientResources.INFO_COLOR;
         break;
       case WARNING:
         color = ClientResources.WARN_COLOR;
         break;
       default:
         color = ClientResources.INFO_COLOR;
     }
   }
   return Activator.getDefault().getColor(color);
 }
Esempio n. 2
0
 /*
  * (non-Javadoc)
  * @see org.eclipse.jface.viewers.ITableColorProvider#getForeground(java.lang.Object, int)
  */
 public Color getForeground(Object element, int columnIndex) {
   return Activator.getDefault().getColor(ClientResources.COMMON_TEXT_COLOR);
 }