home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML Instance.sea / XML Instance / Required / plugins / HTMLWindow.jar / horst / BRView.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-03-18  |  1.4 KB  |  34 lines

  1. package horst;
  2.  
  3. import java.awt.FontMetrics;
  4. import java.awt.Rectangle;
  5. import java.awt.Toolkit;
  6.  
  7. public class BRView extends View {
  8.    public BRView(View parent, Element e, HTMLPane container) {
  9.       super(parent, e, container);
  10.    }
  11.  
  12.    public int getBreakHeight() {
  13.       FontMetrics fm = Toolkit.getDefaultToolkit().getFontMetrics(((View)this).getFont());
  14.       return fm != null ? fm.getHeight() : 0;
  15.    }
  16.  
  17.    protected int getPreferredSpan(int axis) {
  18.       return 0;
  19.    }
  20.  
  21.    public boolean isNewlineView() {
  22.       return false;
  23.    }
  24.  
  25.    public boolean isNextViewOnNewLine() {
  26.       return true;
  27.    }
  28.  
  29.    protected Rectangle layout(int x, int y, int width, LayoutInfo info) {
  30.       super.m_bounds = new Rectangle(x, y, 0, 0);
  31.       return super.m_bounds;
  32.    }
  33. }
  34.