net.sf.borg.ui.calendar
Class ButtonBox

java.lang.Object
  extended by net.sf.borg.ui.calendar.Box
      extended by net.sf.borg.ui.calendar.ButtonBox

public abstract class ButtonBox
extends Box

base class for a box that represents a clickable label on the calendar ui sub-classes must implement the onClick method. used for items such as the date and week buttons that let the user navigate to other views


Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.borg.ui.calendar.Box
Box.Draggable
 
Field Summary
 
Fields inherited from class net.sf.borg.ui.calendar.Box
bounds, clip, isSelected
 
Constructor Summary
ButtonBox(Date d, String text, Icon icon, Rectangle bounds, Rectangle clip)
          constructor
ButtonBox(Date d, String text, Icon icon, Rectangle bounds, Rectangle clip, Color b)
          constructor
 
Method Summary
 int clicksToActivate()
          how many clicks are required to activate this box - default is double-click
 void draw(Graphics2D g2, Component comp)
          draw the button box
 Date getDate()
          get the date
 String getText()
          get the box text
 String getToolTipText()
          gets the tool tip text for this box
 
Methods inherited from class net.sf.borg.ui.calendar.Box
delete, getBounds, getMenu, onClick, setBounds, setSelected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ButtonBox

public ButtonBox(Date d,
                 String text,
                 Icon icon,
                 Rectangle bounds,
                 Rectangle clip)
constructor

Parameters:
d - date
text - label text
icon - icon or null
bounds - bounds
clip - clip

ButtonBox

public ButtonBox(Date d,
                 String text,
                 Icon icon,
                 Rectangle bounds,
                 Rectangle clip,
                 Color b)
constructor

Parameters:
d - date
text - label text
icon - icon or null
bounds - bounds
clip - clip
b - background color
Method Detail

getDate

public Date getDate()
get the date

Returns:
the date

draw

public void draw(Graphics2D g2,
                 Component comp)
draw the button box

Specified by:
draw in class Box
Parameters:
g2 - the Graphics2D to draw in
comp - that contains the Graphics2D

getText

public String getText()
Description copied from class: Box
get the box text

Specified by:
getText in class Box
Returns:
the text

getToolTipText

public String getToolTipText()
Description copied from class: Box
gets the tool tip text for this box

Specified by:
getToolTipText in class Box
Returns:
the tool tip text

clicksToActivate

public int clicksToActivate()
Description copied from class: Box
how many clicks are required to activate this box - default is double-click

Overrides:
clicksToActivate in class Box
Returns:
clicks required to activate the box


Generated September 24 2010 by mbb using Apache Ant version 1.7.1 compiled on June 27 2008 and Java version 1.6.0_20 from Sun Microsystems Inc. on Linux i386 2.6.24-28-generic