@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();
   }
 }
 @Override
 public Component getTableCellRendererComponent(
     JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
   ImageryInfo info = (ImageryInfo) value;
   JLabel label =
       (JLabel)
           super.getTableCellRendererComponent(
               table, info == null ? null : info.getName(), isSelected, hasFocus, row, column);
   GuiHelper.setBackgroundReadable(label, UIManager.getColor("Table.background"));
   if (info != null) {
     label.setToolTipText(info.getToolTipText());
   }
   return label;
 }
Exemple #3
0
 public ImageryLayer(ImageryInfo info) {
   super(info.getName());
   this.info = info;
   if (info.getIcon() != null) {
     icon =
         new ImageProvider(info.getIcon())
             .setOptional(true)
             .setMaxHeight(ICON_SIZE)
             .setMaxWidth(ICON_SIZE)
             .get();
   }
   if (icon == null) {
     icon = ImageProvider.get("imagery_small");
   }
   this.sharpenLevel = PROP_SHARPEN_LEVEL.get();
   if (OffsetServer.PROP_SERVER_ENABLED.get()) {
     offsetServerThread = createoffsetServerThread();
     offsetServerThread.start();
   }
 }