public EditorRuler(mxGraphComponent graphComponent, int orientation)
	{
		this.orientation = orientation;
		this.graphComponent = graphComponent;
		updateIncrementAndUnits();

		graphComponent.getGraph().getView().addListener(
				mxEvent.SCALE, repaintHandler);
		graphComponent.getGraph().getView().addListener(
				mxEvent.TRANSLATE, repaintHandler);
		graphComponent.getGraph().getView().addListener(
				mxEvent.SCALE_AND_TRANSLATE, repaintHandler);

		graphComponent.getGraphControl().addMouseMotionListener(this);

		DropTarget dropTarget = graphComponent.getDropTarget();

		try
		{
			if (dropTarget != null)
			{
				dropTarget.addDropTargetListener(this);
			}
		}
		catch (TooManyListenersException tmle)
		{
			// should not happen... swing drop target is multicast
		}

		setBorder(BorderFactory.createLineBorder(Color.black));
	}