Esempio n. 1
0
 @Override
 public Object getValueAt(int row, int column) {
   ImageryInfo info = layerInfo.getLayers().get(row);
   switch (column) {
     case 0:
       return info.getName();
     case 1:
       return info.getExtendedUrl();
     default:
       throw new ArrayIndexOutOfBoundsException();
   }
 }
Esempio n. 2
0
 @Override
 public Object getValueAt(int row, int column) {
   ImageryInfo info = layerInfo.getDefaultLayers().get(row);
   switch (column) {
     case 0:
       return info.getCountryCode();
     case 1:
       return info;
     case 2:
       return info.getExtendedUrl();
   }
   return null;
 }
Esempio n. 3
0
 @Override
 public Component getTableCellRendererComponent(
     JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
   JLabel label =
       (JLabel)
           super.getTableCellRendererComponent(
               table, value, isSelected, hasFocus, row, column);
   GuiHelper.setBackgroundReadable(label, UIManager.getColor("Table.background"));
   if (value != null) { // Fix #8159
     String t = value.toString();
     for (ImageryInfo l : layers) {
       if (l.getExtendedUrl().equals(t)) {
         GuiHelper.setBackgroundReadable(label, IMAGERY_BACKGROUND_COLOR.get());
         break;
       }
     }
     label.setToolTipText((String) value);
   }
   return label;
 }