Changeset 144 in josm for src/org/openstreetmap/josm/data


Ignore:
Timestamp:
2006-10-01T19:45:33+02:00 (19 years ago)
Author:
imi
Message:
  • added plugin system
  • added plugin: mappainter (thanks NickW!)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/data/osm/visitor/SimplePaintVisitor.java

    r100 r144  
    2727         * The environment to paint to.
    2828         */
    29         private final Graphics g;
     29        protected Graphics g;
    3030        /**
    3131         * MapView to get screen coordinates.
    3232         */
    33         private final NavigatableComponent nc;
    34         private static final double PHI = Math.toRadians(20);
     33        protected NavigatableComponent nc;
    3534
    36         /**
    37          * Construct the painter visitor.
    38          * @param g   The graphics to draw to.
    39          * @param mv  The view to get screen coordinates from.
    40          */
    41         public SimplePaintVisitor(Graphics g, NavigatableComponent mv) {
    42                 this.g = g;
    43                 this.nc = mv;
    44         }
     35        protected static final double PHI = Math.toRadians(20);
    4536
    4637        /**
     
    9788         * Draw a line with the given color.
    9889         */
    99         private void drawSegment(Segment ls, Color col) {
     90        protected void drawSegment(Segment ls, Color col) {
    10091                if (ls.incomplete)
    10192                        return;
     
    122113                return ColorHelper.html2color(colStr);
    123114        }
     115
     116
     117        public void setGraphics(Graphics g) {
     118        this.g = g;
     119    }
     120
     121        public void setNavigatableComponent(NavigatableComponent nc) {
     122        this.nc = nc;
     123    }
    124124}
Note: See TracChangeset for help on using the changeset viewer.