public void doLayout() {
   this.removeAll();
   HtmlLength[] rhl = this.rowHtmlLengths;
   HtmlLength[] chl = this.colHtmlLengths;
   Component[] fc = this.frameComponents;
   if (rhl != null && chl != null && fc != null) {
     Dimension size = this.getSize();
     Insets insets = this.getInsets();
     int width = size.width - insets.left - insets.right;
     int height = size.height - insets.left - insets.right;
     int[] colLengths = this.getAbsoluteLengths(chl, width);
     int[] rowLengths = this.getAbsoluteLengths(rhl, height);
     this.add(
         this.getSplitPane(
             this.htmlContext,
             colLengths,
             0,
             colLengths.length,
             rowLengths,
             0,
             rowLengths.length,
             fc));
   }
   super.doLayout();
 }
示例#2
0
 public void paint(Graphics g) {
   if (g instanceof Graphics2D) {
     Graphics2D g2 = (Graphics2D) g;
     g2.setRenderingHint(
         RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
     g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
   }
   super.paint(g);
 }
示例#3
0
  /* (non-Javadoc)
   * @see javax.swing.JComponent#paintComponent(java.awt.Graphics)
   */
  protected void paintComponent(Graphics arg0) {
    // long time1 = System.currentTimeMillis();
    try {
      super.paintComponent(arg0);
      if (this.isOpaque()) {
        Rectangle clipBounds = arg0.getClipBounds();
        arg0.setColor(this.getBackground());
        arg0.fillRect(clipBounds.x, clipBounds.y, clipBounds.width, clipBounds.height);
      }
      this.rblock.paint(arg0);

      // Paint FrameContext selection

      RenderablePoint start = this.startSelection;
      RenderablePoint end = this.endSelection;
      if (start != null && end != null && !start.equals(end)) {
        this.rblock.paintSelection(arg0, false, start, end);
      }
    } finally {
      // long time2 = System.currentTimeMillis();
      // System.out.println("NonScrollableHtmlPanel.paintComponent(): numRenderables=" +
      // numRenderables + ",time=" + (time2 - time1) + " ms.");
    }
  }
示例#4
0
 public void invalidate() {
   super.invalidate();
   this.rblock.invalidate();
 }