站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

Border (Visual Library API) - NetBeans API Javadoc (Current Development Version)

org.netbeans.api.visual 2.2

org.netbeans.api.visual.border
Interface Border


public interface Border

The class is responsible for defining and rendering borders. Border size is defined by insets.

Borders can be opaque. If true, then the border has to care about painting all pixels in borders. If false, then the widget background is painted under borders too.

This can be used for non-rectagular shapes of borders e.g. returning true from isOpaque and drawing a filled rounded rectangle.


Method Summary
 Insets getInsets()
          Returns layout insets.
 boolean isOpaque()
          Returns whether the border is opaque.
 void paint(Graphics2D gr, Rectangle bounds)
          Paints the border to the Graphics2D instance within specific bounds.
 

Method Detail

getInsets

Insets getInsets()
Returns layout insets. Insets has to be the same during whole life-cycle of the border.

Returns:
the insets

paint

void paint(Graphics2D gr,
           Rectangle bounds)
Paints the border to the Graphics2D instance within specific bounds. Borders are always painted immediately after the widget background and before the widget painting itself.

Parameters:
gr - the Graphics2D instance
bounds - the boundary

isOpaque

boolean isOpaque()
Returns whether the border is opaque. The result of the method controls whether a widget background is painted under the border insets too.

Returns:
true, if background is painted under the border insets.

org.netbeans.api.visual 2.2

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.