Quaqua 8.0 2011-10-02

ch.randelshofer.quaqua.border
Class CompositeVisualMarginBorder

java.lang.Object
  extended by ch.randelshofer.quaqua.border.CompositeVisualMarginBorder
All Implemented Interfaces:
VisualMargin, javax.swing.border.Border

public class CompositeVisualMarginBorder
extends java.lang.Object
implements javax.swing.border.Border, VisualMargin

CompositeVisualMarginBorder.

Version:
1.0 2011-07-29 Created.
Author:
Werner Randelshofer

Constructor Summary
CompositeVisualMarginBorder(javax.swing.border.Border actualBorder, java.awt.Insets visualMargin)
          Creates a new instance which draws actualBorder which has a visual margin of visualMargin.
CompositeVisualMarginBorder(javax.swing.border.Border actualBorder, java.awt.Insets visualMargin, boolean isTopFixed, boolean isLeftFixed, boolean isBottomFixed, boolean isRightFixed)
           
CompositeVisualMarginBorder(javax.swing.border.Border actualBorder, int top, int left, int bottom, int right)
          Creates a new instance which draws actualBorder which has a visual margin of top,left,bottom,right.
CompositeVisualMarginBorder(javax.swing.border.Border actualBorder, int top, int left, int bottom, int right, boolean isTopFixed, boolean isLeftFixed, boolean isBottomFixed, boolean isRightFixed)
           
 
Method Summary
 java.awt.Insets getBorderInsets(java.awt.Component c)
           
 java.awt.Insets getBorderInsets(java.awt.Component c, java.awt.Insets insets)
          Reinitializes the insets parameter with this Border's current Insets.
 java.awt.Insets getVisualMargin(java.awt.Component c)
           
protected  java.awt.Insets getVisualMargin(java.awt.Component c, java.awt.Insets insets)
          Reinitializes the insets parameter with this Border's current Insets.
 boolean isBorderOpaque()
           
 void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeVisualMarginBorder

public CompositeVisualMarginBorder(javax.swing.border.Border actualBorder,
                                   int top,
                                   int left,
                                   int bottom,
                                   int right)
Creates a new instance which draws actualBorder which has a visual margin of top,left,bottom,right.

Parameters:
actualBorder -
top -
left -
bottom -
right -

CompositeVisualMarginBorder

public CompositeVisualMarginBorder(javax.swing.border.Border actualBorder,
                                   int top,
                                   int left,
                                   int bottom,
                                   int right,
                                   boolean isTopFixed,
                                   boolean isLeftFixed,
                                   boolean isBottomFixed,
                                   boolean isRightFixed)

CompositeVisualMarginBorder

public CompositeVisualMarginBorder(javax.swing.border.Border actualBorder,
                                   java.awt.Insets visualMargin)
Creates a new instance which draws actualBorder which has a visual margin of visualMargin.

Parameters:
actualBorder -
visualMargin -

CompositeVisualMarginBorder

public CompositeVisualMarginBorder(javax.swing.border.Border actualBorder,
                                   java.awt.Insets visualMargin,
                                   boolean isTopFixed,
                                   boolean isLeftFixed,
                                   boolean isBottomFixed,
                                   boolean isRightFixed)
Method Detail

paintBorder

public void paintBorder(java.awt.Component c,
                        java.awt.Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Specified by:
paintBorder in interface javax.swing.border.Border

isBorderOpaque

public boolean isBorderOpaque()
Specified by:
isBorderOpaque in interface javax.swing.border.Border

getBorderInsets

public final java.awt.Insets getBorderInsets(java.awt.Component c)
Specified by:
getBorderInsets in interface javax.swing.border.Border

getBorderInsets

public java.awt.Insets getBorderInsets(java.awt.Component c,
                                       java.awt.Insets insets)
Reinitializes the insets parameter with this Border's current Insets.

Parameters:
c - the component for which this border insets value applies
insets - the object to be reinitialized
Returns:
the insets object

getVisualMargin

public final java.awt.Insets getVisualMargin(java.awt.Component c)
Specified by:
getVisualMargin in interface VisualMargin

getVisualMargin

protected java.awt.Insets getVisualMargin(java.awt.Component c,
                                          java.awt.Insets insets)
Reinitializes the insets parameter with this Border's current Insets.

Parameters:
c - the component for which this border insets value applies
insets - the object to be reinitialized
Returns:
the insets object

Copyright 2003-2007 (c) Werner Randelshofer.
All rights reserved.