protected void paintTabs(Graphics g, Rectangle clip, Insets insets) {
		int        xOffset = getXOffset();
		TabSet     tabs = getTabSet();
		int        lastX = clip.x - 10;
		int        maxX = clip.x + clip.width + 10;
		int        maxY = getUnitsFontHeight() + TabHeight;
		double 	   zoom=1.0f;
		
		if (getTextPane() instanceof JXMLNotePane) {
			zoom=((JXMLNotePane) getTextPane()).getZoomFactor();
		}

		if (insets != null) {
			maxY += insets.top;
		}
		
		int nDPI=(int) Math.round(zoom*DPI);
		if ((nDPI%2)==1) { nDPI+=1; }
		
		if (tabs == null) {
			g.setColor(getSynthesizedTabColor());
			// Paragraph treats a null tabset as a tab at every 72 pixels.
			// Different implementations of View used to represent a
			// Paragraph may not due this.
			lastX = Math.max(xOffset, lastX / nDPI * nDPI + xOffset % nDPI);
			while (lastX <= maxX) {
				paintTab(g, clip, null, (float)lastX, maxY,
						TabStop.ALIGN_LEFT, TabStop.LEAD_NONE);
				lastX += DPI;
			}
		}
		else {
			TabStop     tab;
			TabStop	[]_tabs=new TabStop[tabs.getTabCount()];
			int i,N;
			for(i=0,N=tabs.getTabCount();i<N;i++) {
				TabStop st=tabs.getTab(i);
				_tabs[i]=new TabStop((int) Math.round(st.getPosition()*zoom),st.getAlignment(),st.getLeader());
			}
			TabSet ttabs=new TabSet(_tabs);

			g.setColor(getTabColor());
			do {
				tab = ttabs.getTabAfter((float)lastX + .01f);
				if (tab != null) {
					lastX = (int)tab.getPosition() + xOffset;
					if (lastX <= maxX) {
						paintTab(g, clip, tab, (float)lastX,
								maxY, tab.getAlignment(),
								tab.getLeader());
					}
					else {
						tab = null;
					}
				}
			} while (tab != null);
		}
	}