Пример #1
0
 protected void warnNoTargetLayersForSourceLayer(Layer sourceLayer) {
   JOptionPane.showMessageDialog(
       Main.parent,
       tr(
           "<html>There are no layers the source layer<br>''{0}''<br>could be merged to.</html>",
           sourceLayer.getName()),
       tr("No target layers"),
       JOptionPane.WARNING_MESSAGE);
 }
 @Override
 public Component getListCellRendererComponent(
     JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
   Layer layer = (Layer) value;
   JLabel label =
       (JLabel)
           super.getListCellRendererComponent(
               list, layer.getName(), index, isSelected, cellHasFocus);
   Icon icon = layer.getIcon();
   label.setIcon(icon);
   label.setToolTipText(layer.getToolTipText());
   return label;
 }