模块 java.desktop

类 ListView

所有已实现的接口:
SwingConstants

public class ListView extends BlockView
显示 html 列表的视图实现
  • 构造方法详细信息

    • ListView

      public ListView(Element  elem)
      创建表示列表元素的新视图。
      参数:
      elem - 为其创建视图的元素
  • 方法详情

    • getAlignment

      public float getAlignment(int axis)
      计算所需的列表形状。
      重写:
      getAlignment 在类 BlockView
      参数:
      axis - 可以是 X_AXIS 或 Y_AXIS
      返回:
      所需的跨度
      参见:
    • paint

      public void paint(Graphics  g, Shape  allocation)
      使用给定的渲染表面和该表面上的区域进行渲染。
      重写:
      paint 在类 BlockView
      参数:
      g - 要使用的渲染表面
      allocation - 要渲染到的分配区域
      参见:
    • paintChild

      protected void paintChild(Graphics  g, Rectangle  alloc, int index)
      给其中一个子级画画;由 paint() 调用。默认情况下它就是这样做的,但是子类可以使用它来绘制与子类相关的东西。
      重写:
      paintChild 在类 BoxView
      参数:
      g - 图形上下文
      alloc - 将孩子渲染到的分配区域
      index - 孩子的索引