Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.borg.ui.calendar
Class Box

    java.lang.Object
      net.sf.borg.ui.calendar.Box

Direct Known Subclasses:
  ApptBox, ButtonBox, LabelBox, NoteBox

    public abstract class Box

extends Object

Interface for objects that appear as boxes on the day/week/month UIs

Nested Class Summary
`(package private) static interface` | `Box.Draggable` Interface implemented by Boxes that can be dragged

Field Summary
`protected Rectangle` | `bounds`
`protected Rectangle` | `clip`
`protected boolean` | `isSelected`

Constructor Summary
`Box(Rectangle bounds, Rectangle clip)` constructor.

Method Summary
`int` | `clicksToActivate()` how many clicks are required to activate this box - default is double-click
`void` | `delete()` delete the box
`abstract void` | `draw(Graphics2D g2, Component comp)` draw the box
`Rectangle` | `getBounds()` get bounds
`JPopupMenu` | `getMenu()` get the box popup menu
`abstract String` | `getText()` get the box text
`abstract String` | `getToolTipText()` gets the tool tip text for this box
`abstract void` | `onClick()` action called when the box is clicked
`void` | `setBounds(Rectangle bounds)` set bounds
`void` | `setSelected(boolean isSelected)` set selected

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### bounds

    protected Rectangle bounds

### clip

    protected Rectangle clip

### isSelected

    protected boolean isSelected

Constructor Detail

### Box

    public Box(Rectangle bounds,
               Rectangle clip)

  constructor.

  Parameters:
    `bounds` - box bounds
    `clip` - box clip

Method Detail

### delete

    public void delete()

  delete the box

### draw

    public abstract void draw(Graphics2D g2,
                              Component comp)

  draw the box

  Parameters:
    `g2` - the Graphics2D to draw in
    `comp` - that contains the Graphics2D

### onClick

    public abstract void onClick()

  action called when the box is clicked

### clicksToActivate

    public int clicksToActivate()

  how many clicks are required to activate this box - default is double-click

  Returns:
    clicks required to activate the box

### getBounds

    public Rectangle getBounds()

  get bounds

  Returns:
    bounds

### getMenu

    public JPopupMenu getMenu()

  get the box popup menu

  Returns:
    the popup menu

### getText

    public abstract String getText()

  get the box text

  Returns:
    the text

### setBounds

    public void setBounds(Rectangle bounds)

  set bounds

  Parameters:
    `bounds` - new bounds

### setSelected

    public void setSelected(boolean isSelected)

  set selected

  Parameters:
    `isSelected` - new selected value

### getToolTipText

    public abstract String getToolTipText()

  gets the tool tip text for this box

  Returns:
    the tool tip text

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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