datechooser.view.appearance.swing
Class ButtonPainter

java.lang.Object
  extended by datechooser.view.appearance.swing.ButtonPainter
All Implemented Interfaces:
CellAttributes, Painter, SwingCellAttributes, java.io.Serializable, java.lang.Cloneable

public class ButtonPainter
extends java.lang.Object
implements Painter, SwingCellAttributes

Draws cells using JButton, Look & Feel support.
Рисовальщик ячеек-кнопок. Использует при рисовании класс JButton. Поддерживает Look & Feel.

Since:
1.0
Author:
Androsov Vadim
See Also:
Serialized Form

Constructor Summary
ButtonPainter()
           
 
Method Summary
 void assign(CellAppearance newAppearance)
          Assign one cell properties for another.
 java.lang.Object clone()
           
 javax.swing.border.Border getBorder()
           
 javax.swing.JButton getButton()
           
 java.awt.Component getComponent(java.awt.Component c)
           
 java.awt.Font getFont()
           
 java.awt.Color getTextColor()
           
 void paint(java.awt.Graphics2D g)
           
 void setButton(javax.swing.JButton button)
           
 void setEnabled(boolean enabled)
           
 void setFont(java.awt.Font font)
           
 void setPressed(boolean pressed)
           
 void setSize(int width, int height)
           
 void setText(java.lang.String text)
           
 void setTextColor(java.awt.Color color)
           
 void updateUI()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ButtonPainter

public ButtonPainter()
Method Detail

getButton

public javax.swing.JButton getButton()

setButton

public void setButton(javax.swing.JButton button)

setText

public void setText(java.lang.String text)
Specified by:
setText in interface Painter

setFont

public void setFont(java.awt.Font font)
Specified by:
setFont in interface CellAttributes

getFont

public java.awt.Font getFont()
Specified by:
getFont in interface CellAttributes

setTextColor

public void setTextColor(java.awt.Color color)
Specified by:
setTextColor in interface CellAttributes

updateUI

public void updateUI()
Specified by:
updateUI in interface Painter

setSize

public void setSize(int width,
                    int height)
Specified by:
setSize in interface Painter

paint

public void paint(java.awt.Graphics2D g)
Specified by:
paint in interface Painter

getBorder

public javax.swing.border.Border getBorder()
Specified by:
getBorder in interface Painter

setPressed

public void setPressed(boolean pressed)
Specified by:
setPressed in interface Painter

setEnabled

public void setEnabled(boolean enabled)
Specified by:
setEnabled in interface Painter

getTextColor

public java.awt.Color getTextColor()
Specified by:
getTextColor in interface CellAttributes

clone

public java.lang.Object clone()
Specified by:
clone in interface Painter
Overrides:
clone in class java.lang.Object

assign

public void assign(CellAppearance newAppearance)
Description copied from interface: CellAttributes
Assign one cell properties for another. Not used (reserved).
Зарезервирована если захочется сделать единые настройки для всех полей

Specified by:
assign in interface CellAttributes

getComponent

public java.awt.Component getComponent(java.awt.Component c)
Specified by:
getComponent in interface Painter