question: @ Override public void drawDomainMarker ( Graphics2D g2 , CategoryPlot plot , CategoryAxis axis , CategoryMarker marker , Rectangle2D dataArea ) { Comparable category = marker . getKey ( ) ; CategoryDataset dataset = plot . getDataset ( plot . getIndexOf ( this ) ) ; int columnIndex = dataset . getColumnIndex ( category ) ; if ( columnIndex < 0 ) { return ; } final Composite savedComposite = g2 . getComposite ( ) ; g2 . setComposite ( AlphaComposite . getInstance ( AlphaComposite . SRC_OVER , marker . getAlpha ( ) ) ) ; PlotOrientation orientation = plot . getOrientation ( ) ; Rectangle2D bounds ; if ( marker . getDrawAsLine ( ) ) { double v = axis . getCategoryMiddle ( columnIndex , dataset . getColumnCount ( ) , dataArea , plot . getDomainAxisEdge ( ) ) ; Line2D line = null ; if ( orientation == PlotOrientation . HORIZONTAL ) { line = new Line2D . Double ( dataArea . getMinX ( ) , v , dataArea . getMaxX ( ) , v ) ; } else if ( orientation == PlotOrientation . VERTICAL ) { line = new Line2D . Double ( v , dataArea . getMinY ( ) , v , dataArea . getMaxY ( ) ) ; } else { throw new IllegalStateException ( ) ; } g2 . setPaint ( marker . getPaint ( ) ) ; g2 . setStroke ( marker . getStroke ( ) ) ; g2 . draw ( line ) ; bounds = line . getBounds2D ( ) ; } else { double v0 = axis . getCategoryStart ( columnIndex , dataset . getColumnCount ( ) , dataArea , plot . getDomainAxisEdge ( ) ) ; double v1 = axis . getCategoryEnd ( columnIndex , dataset . getColumnCount ( ) , dataArea , plot . getDomainAxisEdge ( ) ) ; Rectangle2D area = null ; if ( orientation == PlotOrientation . HORIZONTAL ) { area = new Rectangle2D . Double ( dataArea . getMinX ( ) , v0 , dataArea . getWidth ( ) , ( v1 - v0 ) ) ; } else if ( orientation == PlotOrientation . VERTICAL ) { area = new Rectangle2D . Double ( v0 , dataArea . getMinY ( ) , ( v1 - v0 ) , dataArea . getHeight ( ) ) ; } g2 . setPaint ( marker . getPaint ( ) ) ; g2 . fill ( area ) ; bounds = area ; } String label = marker . getLabel ( ) ; RectangleAnchor anchor = marker . getLabelAnchor ( ) ; if ( label != null ) { Font labelFont = marker . getLabelFont ( ) ; g2 . setFont ( labelFont ) ; g2 . setPaint ( marker . getLabelPaint ( ) ) ; Point2D coordinates = calculateDomainMarkerTextAnchorPoint ( g2 , orientation , dataArea , bounds , marker . getLabelOffset ( ) , marker . getLabelOffsetType ( ) , anchor ) ; TextUtilities . drawAlignedString ( label , g2 , ( float ) coordinates . getX ( ) , ( float ) coordinates . getY ( ) , marker . getLabelTextAnchor ( ) ) ; } g2 . setComposite ( savedComposite ) ; }
target:  Draws a marker for the domain axis.