Changeset 12389 in josm


Ignore:
Timestamp:
2017-06-10T19:26:28+02:00 (2 years ago)
Author:
Don-vip
Message:

see #14929 - extract OSDLabel from FilterTableModel

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/FilterTableModel.java

    r12387 r12389  
    66import static org.openstreetmap.josm.tools.I18n.trn;
    77
    8 import java.awt.Color;
    9 import java.awt.Font;
    10 import java.awt.Graphics;
    118import java.awt.Graphics2D;
    129import java.util.ArrayList;
     
    1613import java.util.List;
    1714
    18 import javax.swing.BorderFactory;
    19 import javax.swing.JLabel;
    2015import javax.swing.JOptionPane;
    2116import javax.swing.table.AbstractTableModel;
     
    3126import org.openstreetmap.josm.data.osm.OsmPrimitive;
    3227import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     28import org.openstreetmap.josm.gui.widgets.OSDLabel;
    3329import org.openstreetmap.josm.tools.Utils;
    3430
     
    424420
    425421    /**
    426      * On screen display label
    427      */
    428     private static class OSDLabel extends JLabel {
    429         OSDLabel(String text) {
    430             super(text);
    431             setOpaque(true);
    432             setForeground(Color.black);
    433             setBackground(new Color(0, 0, 0, 0));
    434             setFont(getFont().deriveFont(Font.PLAIN));
    435             setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10));
    436         }
    437 
    438         @Override
    439         public void paintComponent(Graphics g) {
    440             g.setColor(new Color(255, 255, 255, 140));
    441             g.fillRoundRect(getX(), getY(), getWidth(), getHeight(), 10, 10);
    442             super.paintComponent(g);
    443         }
    444     }
    445 
    446     /**
    447422     * Draws a text on the map display that indicates that filters are active.
    448423     * @param g The graphics to draw that text on.
Note: See TracChangeset for help on using the changeset viewer.