com.mucommander.ui.border
Class MutableLineBorder

java.lang.Object
  extended by javax.swing.border.AbstractBorder
      extended by javax.swing.border.LineBorder
          extended by com.mucommander.ui.border.MutableLineBorder
All Implemented Interfaces:
java.io.Serializable, javax.swing.border.Border

public class MutableLineBorder
extends javax.swing.border.LineBorder

Implementation of LineBorder that allows applications to change the color after it's been instanciated.

Author:
Nicolas Rinaudo
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.border.LineBorder
lineColor, roundedCorners, thickness
 
Constructor Summary
MutableLineBorder(java.awt.Color color)
          Creates a line border with the specified color and a thickness = 1.
MutableLineBorder(java.awt.Color color, int thickness)
          Creates a line border with the specified color and thickness.
MutableLineBorder(java.awt.Color color, int thickness, boolean roundedCorners)
          Creates a line border with the specified color, thickness, and corner shape.
 
Method Summary
 void setLineColor(java.awt.Color color)
          Sets this border's color.
 void setRoundedCorners(boolean roundedCorners)
          Sets this border's corner shape.
 void setThickness(int thickness)
          Sets this border's thickness.
 
Methods inherited from class javax.swing.border.LineBorder
createBlackLineBorder, createGrayLineBorder, getBorderInsets, getBorderInsets, getLineColor, getRoundedCorners, getThickness, isBorderOpaque, paintBorder
 
Methods inherited from class javax.swing.border.AbstractBorder
getBaseline, getBaselineResizeBehavior, getInteriorRectangle, getInteriorRectangle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MutableLineBorder

public MutableLineBorder(java.awt.Color color)
Creates a line border with the specified color and a thickness = 1.

Parameters:
color - the color of the border.

MutableLineBorder

public MutableLineBorder(java.awt.Color color,
                         int thickness)
Creates a line border with the specified color and thickness.

Parameters:
color - the color of the border
thickness - the thickness of the border

MutableLineBorder

public MutableLineBorder(java.awt.Color color,
                         int thickness,
                         boolean roundedCorners)
Creates a line border with the specified color, thickness, and corner shape.

Parameters:
color - the color of the border
thickness - the thickness of the border
roundedCorners - whether or not border corners should be round
Method Detail

setLineColor

public void setLineColor(java.awt.Color color)
Sets this border's color.

Parameters:
color - the color of the border.

setRoundedCorners

public void setRoundedCorners(boolean roundedCorners)
Sets this border's corner shape.

Parameters:
roundedCorners - whether or not border corners should be round

setThickness

public void setThickness(int thickness)
Sets this border's thickness.

Parameters:
thickness - the thickness of the border.


This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard