net.sf.doolin.gui.swing
Class CollaspableBorder

java.lang.Object
  extended by javax.swing.border.AbstractBorder
      extended by net.sf.doolin.gui.swing.CollaspableBorder
All Implemented Interfaces:
Serializable, Border

public class CollaspableBorder
extends AbstractBorder

Border that displays the collapsed state of a panel.

Author:
Damien Coraboeuf
See Also:
CollapsablePanel, Serialized Form

Constructor Summary
CollaspableBorder(Border initialBorder)
          Constructor
 
Method Summary
 Insets getBorderInsets(Component c)
           
 boolean isCollapsed()
          Checks if the border indicates a collapsed state
 void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
           
 void setCollapsed(boolean collapsed)
          Sets the collapsed state of the border
 
Methods inherited from class javax.swing.border.AbstractBorder
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollaspableBorder

public CollaspableBorder(Border initialBorder)
Constructor

Parameters:
initialBorder - Base border
Method Detail

isCollapsed

public boolean isCollapsed()
Checks if the border indicates a collapsed state

Returns:
Collapsed state

setCollapsed

public void setCollapsed(boolean collapsed)
Sets the collapsed state of the border

Parameters:
collapsed - Collapsed state

getBorderInsets

public Insets getBorderInsets(Component c)
Specified by:
getBorderInsets in interface Border
Overrides:
getBorderInsets in class AbstractBorder

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Specified by:
paintBorder in interface Border
Overrides:
paintBorder in class AbstractBorder


Copyright © 2011. All Rights Reserved.