예제 #1
0
 private AbstractLeftColumn getTextColumnByX(int x) {
   for (AbstractLeftColumn column : myLeftColumns) {
     int columnX = column.getX();
     if (columnX <= x && columnX + column.getWidth() > x) {
       return column;
     }
   }
   return null;
 }
예제 #2
0
 private void recalculateTextColumnWidth() {
   int initialOffset = getTextColumnOffset();
   int offset = initialOffset;
   for (AbstractLeftColumn column : myLeftColumns) {
     column.setX(offset);
     column.relayout();
     offset += column.getWidth();
   }
   myTextColumnWidth = Math.max(MIN_LEFT_TEXT_WIDTH, offset - initialOffset);
 }
예제 #3
0
 private void paintTextColumns(Graphics g, Rectangle clipBounds) {
   if (!hasIntersection(getTextColumnOffset(), myTextColumnWidth, clipBounds)) {
     return;
   }
   for (AbstractLeftColumn column : myLeftColumns) {
     if (clipBounds.x > column.getX() + column.getWidth()) {
       continue;
     }
     column.paint(g);
     //  COLORS: find out where it is and remove hardcoded color
     UIUtil.drawVDottedLine(
         (Graphics2D) g,
         myRightToLeft ? column.getX() : column.getX() + column.getWidth() - 1,
         (int) clipBounds.getMinY(),
         (int) clipBounds.getMaxY(),
         getBackground(),
         Color.GRAY);
   }
 }