Ignore:
Timestamp:
2009-11-14T19:38:46+01:00 (15 years ago)
Author:
jttt
Message:

Updated to new MapViewPaintable.paint arguments

Location:
applications/editors/josm/plugins/openstreetbugs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/openstreetbugs/build.xml

    r18503 r18595  
    2626                <attribute name="Plugin-Description" value="Imports issues from OpenStreetBugs"/>
    2727                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/OpenStreetBugs"/>
    28                 <attribute name="Plugin-Mainversion" value="2401"/>
     28                <attribute name="Plugin-Mainversion" value="2450"/>
    2929                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    3030            </manifest>
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbLayer.java

    r18482 r18595  
    3232import java.awt.Component;
    3333import java.awt.Dimension;
    34 import java.awt.Graphics;
     34import java.awt.Graphics2D;
    3535import java.awt.Image;
    3636import java.awt.Point;
     
    4848import org.openstreetmap.josm.Main;
    4949import org.openstreetmap.josm.actions.RenameLayerAction;
     50import org.openstreetmap.josm.data.Bounds;
    5051import org.openstreetmap.josm.data.SelectionChangedListener;
    5152import org.openstreetmap.josm.data.osm.DataSet;
     
    118119
    119120    @Override
    120     public void paint(Graphics g, MapView mv) {
     121    public void paint(Graphics2D g, MapView mv, Bounds bounds) {
    121122        Object[] nodes = data.getNodes().toArray();
    122123        // This loop renders all the bug icons
     
    178179
    179180            int tx = p.x + (width / 2) + 5;
    180             int ty = (int)(p.y - height / 2) -1;
     181            int ty = (p.y - height / 2) -1;
    181182            g.translate(tx, ty);
    182183
     
    189190            for(int x = 0; x < 2; x++) {
    190191                Dimension d = tooltip.getUI().getPreferredSize(tooltip);
    191                 d.width = Math.min(d.width, (int)(mv.getWidth()*2/3));
     192                d.width = Math.min(d.width, (mv.getWidth()*2/3));
    192193                tooltip.setSize(d);
    193194                tooltip.paint(g);
     
    231232        if(e.getButton() == MouseEvent.BUTTON1) {
    232233            if(Main.map.mapView.getActiveLayer() == this) {
    233                 Node n = (Node) getNearestNode(e.getPoint());
     234                Node n = getNearestNode(e.getPoint());
    234235                if(data.getNodes().contains(n)) {
    235236                    data.setSelected(n);
     
    250251        if(e.isPopupTrigger()) {
    251252            if(Main.map.mapView.getActiveLayer() == this) {
    252                 Node n = (Node) getNearestNode(e.getPoint());
     253                Node n = getNearestNode(e.getPoint());
    253254                OsbAction.setSelectedNode(n);
    254255                if(data.getNodes().contains(n)) {
Note: See TracChangeset for help on using the changeset viewer.