All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.taligent.widget.ListboxView

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----COM.taligent.widget.ListboxView

public class ListboxView
extends Panel
This class encapsulates the drawing of the element rows in the MultiColumnListbox. It even does Components. Neat!

See Also:
MultiColumnListbox

Constructor Index

 o ListboxView()
Default constructor.
 o ListboxView(MultiColumnListbox)
Constructs a listbox view with the given parent.

Method Index

 o getPlace()
Returns the current place of the first row drawn.
 o getShowing()
Returns how many rows are showing in the view.
 o hasFocus()
Returns whether or not the listbox currently has focus.
 o paint(Graphics)
Paints the rows.
 o paintRow(Graphics, int)
Paints a row in the given graphics context but only if it is currently showing.
 o setFocus(boolean)
Sets whether or not the listbox currently has focus.
 o setPlace(int)
Sets the place of the first row to draw.
 o update(Graphics)
Overriding update so we don't clear the area by default and to provide double buffering for performance.

Constructors

 o ListboxView
 public ListboxView()
Default constructor.

 o ListboxView
 public ListboxView(MultiColumnListbox parent)
Constructs a listbox view with the given parent.

Parameters:
parent - The MultiColumnListbox instance.

Methods

 o setFocus
 protected void setFocus(boolean focus)
Sets whether or not the listbox currently has focus.

Parameters:
focus - True if has focus, false otherwise.
See Also:
hasFocus
 o hasFocus
 protected boolean hasFocus()
Returns whether or not the listbox currently has focus.

See Also:
setFocus
 o setPlace
 public ListboxView setPlace(int place)
Sets the place of the first row to draw.

Parameters:
place - The new place.
Returns:
Returns this so that multiple method calls can be chained together.
See Also:
getPlace
 o getPlace
 public int getPlace()
Returns the current place of the first row drawn.

See Also:
setPlace
 o getShowing
 public int getShowing()
Returns how many rows are showing in the view.

 o update
 public void update(Graphics g)
Overriding update so we don't clear the area by default and to provide double buffering for performance. This function should not be called by the programmer directly.

Parameters:
g - The graphics context.
Overrides:
update in class Component
 o paint
 public void paint(Graphics graphics)
Paints the rows.

Parameters:
g - The graphic context.
Overrides:
paint in class Container
 o paintRow
 protected void paintRow(Graphics g,
                         int index)
Paints a row in the given graphics context but only if it is currently showing.

Parameters:
g - The graphics context.
index - The index of the row to paint.

All Packages  Class Hierarchy  This Package  Previous  Next  Index