borland Packages  Class Hierarchy  jbcl.view Package  Index 

HeaderView component

java.lang.Object
   +----java.awt.Component
           +----java.awt.Container
                   +----com.sun.java.swing.JComponent
                           +----borland.jbcl.view.BeanPanel
                                   +----borland.jbcl.view.HeaderView

About the HeaderView component

Variables  Constructors  Properties  Methods  Event Listeners

Implements ItemPaintSite, VectorModelListener, ImageObserver, MenuContainer, Serializable, EventListener

The HeaderView component is a horizontal or vertical header useful as labels for rows and columns in grid controls. The header displays an item in each cell of the header. The items are contained in a model component.

The orientation property determines if the header is vertical or horizontal. Properties such as alignment, itemMargins, and itemSizes determine how the text appears with each cell.

If the moveable property is true, the user can reorder the cells of the header while the application is running. If liveResize is true, the user can also change resize the cells.


HeaderView variables

Variables implemented in borland.jbcl.view.BeanPanel

Variables implemented in com.sun.java.swing.JComponent

Variables implemented in java.awt.Component

HeaderView constructors

HeaderView properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in borland.jbcl.view.BeanPanel

Properties implemented in com.sun.java.swing.JComponent

Properties implemented in java.awt.Component

Properties implemented in java.awt.Container

Properties implemented in java.lang.Object

HeaderView methods

Methods implemented in this class

Methods implemented in borland.jbcl.view.BeanPanel

Methods implemented in com.sun.java.swing.JComponent

Methods implemented in java.awt.Component

Methods implemented in java.awt.Container

Methods implemented in java.lang.Object

HeaderView event listeners


HeaderView constructors

HeaderView()

  public HeaderView()
Constructs a horizontal header view component.

HeaderView(int)

  public HeaderView(int defaultOrientation)
Constructs a header view component with the specified orientation, which can be either Orientation.HORIZONTAL or Orientation.VERTICAL.


HeaderView properties

alignment

 public int getAlignment()
 public void setAlignment(int a)
Determines the alignment of the data items displayed header view. It must be one or some combination of the Aligment variables. The default value is Alignment.CENTER | Alignment.MIDDLE.

batchMode

 public boolean isBatchMode()
 public void setBatchMode(boolean batchMode)
Determines whether painting occurs. If batchMode is true, the paintComponent() method does not repaint the HeaderView when it is called. When batchMode is false, the default value, painting occurs each time paintComponent() is called.

itemMargins

 public Insets getItemMargins()
 public void setItemMargins(java.awt.Insets margins)
Determines the size of the margins that surround the data items displayed in the header view cells.

itemSizes

 public SizeVector getItemSizes()
 public void setItemSizes(borland.jbcl.view.SizeVector newSizes)
An array of widths of the header cells for a horizontal header.

liveResize

 public boolean isLiveResize()
 public void setLiveResize(boolean liveResize)
Determines whether the column and row sizes change onscreen as the columns and rows are being resized. If liveResize is true, the user can see the resizing as the dragging progresses. If liveResize is false, the resizing doesn't occur until the dragging stops.

model

 public VectorModel getModel()
 public void setModel(borland.jbcl.model.VectorModel vm)
Determines the model used to hold the data displayed in the header view.

moveable

 public boolean isMoveable()
 public void setMoveable(boolean moveable)
Determines whether the cells in the header can be reordered by dragging them to a new position. If moveable is true, the cells can be reordered.

orientation

 public int getOrientation()
 public void setOrientation(int orientation)
Specifies the orientation of the header. Can be borland.jbcl.util.Orientation.HORIZONTAL or borland.jbcl.util.Orientation.VERTICAL.

preferredSize

 public Dimension getPreferredSize()
The preferred size of the header in a layout.

resizable

 public boolean isResizable()
 public void setResizable(boolean resizable)
Determines whether the header can be resized by the user at run time. If resizable is true, the header can be resized. If resizable is false, the header cannot be resized.

showRollover

 public boolean isShowRollover()
 public void setShowRollover(boolean showRollover)
Determines whether a header cell is highlighted when the cursor is over it. If showRollover is true, the cell is highlighted.

siteComponent

 public Component getSiteComponent()
Determines the component that hosts the HeaderView.

thickness

 public int getThickness()
 public void setThickness(int thickness)
Determines the thickness in pixels of this header, which is the height for a horizontal header and the width for a vertical header. Setting thickness to 0 makes the header calculate the necessary height or width needed to display the data items.

transparent

 public boolean isTransparent()
Determines whether the header is visible. If transparent is true, the header is not visible.

viewManager

 public VectorViewManager getViewManager()
 public void setViewManager(borland.jbcl.model.VectorViewManager newViewManager)
Specifies the view manager for the header.


HeaderView methods

createDefaultModel()

  protected VectorModel createDefaultModel()

createDefaultViewManager()

  protected VectorViewManager createDefaultViewManager()

getItemBounds(int)

  public Rectangle getItemBounds(int item)
Returns the bounding rectangle for a given header item in pixels.

paintComponent(java.awt.Graphics)

  public void paintComponent(java.awt.Graphics g)
Paints or repaints the header view.

Parameters:

g
The Graphics object to paint on.

Overrides: borland.jbcl.view.BeanPanel.paintComponent(java.awt.Graphics)

processHeaderEvent(borland.jbcl.view.HeaderEvent)

  protected void processHeaderEvent(borland.jbcl.view.HeaderEvent e)
Sends a HeaderEvent to all listeners if there are any.

processMouseClicked(java.awt.event.MouseEvent)

  protected void processMouseClicked(java.awt.event.MouseEvent e)
Handles clicking of the mouse on the header.

Overrides: borland.jbcl.view.BeanPanel.processMouseClicked(MouseEvent)

processMouseDragged(java.awt.event.MouseEvent)

  protected void processMouseDragged(java.awt.event.MouseEvent e)
Handles dragging of the mouse on the header.

Overrides: borland.jbcl.view.BeanPanel.processMouseDragged(MouseEvent)

processMouseExited(java.awt.event.MouseEvent)

  protected void processMouseExited(java.awt.event.MouseEvent e)
Handles the mouse cursor moving off the header.

Overrides: borland.jbcl.view.BeanPanel.processMouseExited(java.awt.event.MouseEvent)

processMouseMoved(java.awt.event.MouseEvent)

  protected void processMouseMoved(java.awt.event.MouseEvent e)
Handles moving the mouse in the header.

Overrides: borland.jbcl.view.BeanPanel.processMouseMoved(MouseEvent)

processMousePressed(java.awt.event.MouseEvent)

  protected void processMousePressed(java.awt.event.MouseEvent e)
Handles clicking of the mouse button on the header.

Overrides: borland.jbcl.view.BeanPanel.processMousePressed(MouseEvent)

processMouseReleased(java.awt.event.MouseEvent)

  protected void processMouseReleased(java.awt.event.MouseEvent e)
Handles release of the mouse button, if the mouse was previously clicked in the header.

Overrides: borland.jbcl.view.BeanPanel.processMouseReleased(MouseEvent)

repaintItem(int)

  public void repaintItem(int index)
Repaints the specified item.

Parameters:

index
The position of the item in the header. An index value of 0 specifies the first item.

resetSize()

  protected void resetSize()
Resizes the header.

update(java.awt.Graphics)

  public void update(java.awt.Graphics g)
Repaints the header.

Overrides: java.awt.Component.update(Graphics)

updateUI()

  public void updateUI()

Overrides: com.sun.java.swing.JComponent.updateUI()


HeaderView event listeners

This component is a source for the following event sets. For information on the standard AWT event sets, see Standard Java events. For information on the JBCL event sets, see Events in JBCL.

action

 public synchronized void addActionListener(java.awt.event.ActionListener l)
 public synchronized void removeActionListener(java.awt.event.ActionListener l)

ancestor

 public void addAncestorListener(com.sun.java.swing.event.AncestorListener )
 public void removeAncestorListener(com.sun.java.swing.event.AncestorListener )

component

 public synchronized void addComponentListener(java.awt.event.ComponentListener )
 public synchronized void removeComponentListener(java.awt.event.ComponentListener )

container

 public synchronized void addContainerListener(java.awt.event.ContainerListener )
 public void removeContainerListener(java.awt.event.ContainerListener )

focus

 public synchronized void addFocusListener(java.awt.event.FocusListener )
 public synchronized void removeFocusListener(java.awt.event.FocusListener )

header

 public void addHeaderListener(borland.jbcl.view.HeaderListener listener)
 public void removeHeaderListener(borland.jbcl.view.HeaderListener listener)

key

 public synchronized void addKeyListener(java.awt.event.KeyListener )
 public synchronized void removeKeyListener(java.awt.event.KeyListener )

mouse

 public synchronized void addMouseListener(java.awt.event.MouseListener )
 public synchronized void removeMouseListener(java.awt.event.MouseListener )

mouseMotion

 public synchronized void addMouseMotionListener(java.awt.event.MouseMotionListener )
 public synchronized void removeMouseMotionListener(java.awt.event.MouseMotionListener )

propertyChange

 public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener )
 public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener )

vetoableChange

 public synchronized void addVetoableChangeListener(java.beans.VetoableChangeListener )
 public synchronized void removeVetoableChangeListener(java.beans.VetoableChangeListener )