JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.table
Class CellArea

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--com.klg.jclass.table.CellArea
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

public class CellArea
extends JComponent

A CellArea is a transparent component that manages a specific scrollable or non-scrollable region within JCTable. There will typically be 1 to 9 Area objects in a JCTable -- depending on the existance of row labels, column labels, and frozen rows/columns. It also acts as the container for editors and components in cells.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static int CELL
           
protected  Dimension cell_size
           
static int COLUMNLABEL
           
protected  int end_column
           
protected  int end_row
           
static int FROZENCELL
           
static int FROZENCOLUMN
           
static int FROZENCOLUMNLABEL
           
static int FROZENROW
           
static int FROZENROWLABEL
           
static int ROWLABEL
           
protected  int standard_offset_x
           
protected  int standard_offset_y
           
protected  int start_column
           
protected  int start_row
           
protected  int type
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
protected CellArea(int type)
          Creates a new CellArea.
 
Method Summary
 boolean containsCell(int row, int column)
          Returns true if the given cell is contained in the area.
 com.klg.jclass.table.JCCellRange getCellRange()
          Returns the range of cells contained by the Area.
 Dimension getCellSize()
          Returns the total dimensions of the contained cells.
 int getEndColumn()
          Returns the end column for the range of cells contained in the area.
 int getEndRow()
          Returns the end row for the range of cells contained in the area.
 Dimension getMinimumSize()
          Returns the minimum size of the area.
 Dimension getPreferredSize()
          Returns the preferred size of the cell area.
 int getStandardOffsetX()
          Returns the x offset of the area bounds to standard layout.
 int getStandardOffsetY()
          Returns the y offset of the area bounds to standard layout.
 int getStartColumn()
          Returns the start column for the range of cells contained in the area.
 int getStartRow()
          Returns the start row for the range of cells contained in the area.
 int getType()
          Returns the type of area.
 String getTypeString()
          Returns a string representation of the Area type.
 boolean intersects(Rectangle r)
          Returns true if the bounds of the area intersects the given rectangle.
 boolean isFocusTraversable()
           
 boolean isHorizontalScrollable()
          Returns true if this Area scrolls horizontally.
 boolean isVerticalScrollable()
          Returns true if this Area scrolls vertically.
protected  void processKeyEvent(KeyEvent e)
           
protected  void processMouseEvent(MouseEvent e)
           
protected  void processMouseMotionEvent(MouseEvent e)
           
 void setCellRange(int start_row, int start_column, int end_row, int end_column)
          Sets the range of cells that the area manages.
 void setCellRange(com.klg.jclass.table.JCCellRange range)
          Sets the range of cells that the Area manages.
 void setCellSize(Dimension d)
          Sets the total dimensions of the contained cells for use in preferred size calculations.
 void setCellSize(int width, int height)
          Sets the total dimensions of the contained cells.
 void setStandardOffset(int x, int y)
          Sets the offset of the area bounds to standard layout.
 void setStandardOffsetX(int x)
          Sets the x offset of the area bounds to standard layout.
 void setStandardOffsetY(int y)
          Sets the y offset of the area bounds to standard layout.
 void setType(int type)
          Sets the type for the area.
 String toString()
          Returns a string representation of the Area.
protected  MouseEvent translateMouseEventToParent(MouseEvent e)
           
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CELL

public static final int CELL
See Also:
Constant Field Values

FROZENROW

public static final int FROZENROW
See Also:
Constant Field Values

COLUMNLABEL

public static final int COLUMNLABEL
See Also:
Constant Field Values

FROZENCOLUMN

public static final int FROZENCOLUMN
See Also:
Constant Field Values

FROZENCELL

public static final int FROZENCELL
See Also:
Constant Field Values

FROZENCOLUMNLABEL

public static final int FROZENCOLUMNLABEL
See Also:
Constant Field Values

ROWLABEL

public static final int ROWLABEL
See Also:
Constant Field Values

FROZENROWLABEL

public static final int FROZENROWLABEL
See Also:
Constant Field Values

standard_offset_x

protected int standard_offset_x

standard_offset_y

protected int standard_offset_y

cell_size

protected Dimension cell_size

start_row

protected int start_row

start_column

protected int start_column

end_row

protected int end_row

end_column

protected int end_column

type

protected int type
Constructor Detail

CellArea

protected CellArea(int type)
Creates a new CellArea.

Method Detail

processMouseEvent

protected void processMouseEvent(MouseEvent e)
Overrides:
processMouseEvent in class Component

processMouseMotionEvent

protected void processMouseMotionEvent(MouseEvent e)
Overrides:
processMouseMotionEvent in class JComponent

translateMouseEventToParent

protected MouseEvent translateMouseEventToParent(MouseEvent e)

processKeyEvent

protected void processKeyEvent(KeyEvent e)
Overrides:
processKeyEvent in class JComponent

getCellRange

public com.klg.jclass.table.JCCellRange getCellRange()
Returns the range of cells contained by the Area.

See Also:
setCellRange(com.klg.jclass.table.JCCellRange)

setCellRange

public void setCellRange(com.klg.jclass.table.JCCellRange range)
Sets the range of cells that the Area manages.


setCellRange

public void setCellRange(int start_row,
                         int start_column,
                         int end_row,
                         int end_column)
Sets the range of cells that the area manages.


getCellSize

public Dimension getCellSize()
Returns the total dimensions of the contained cells.


setCellSize

public void setCellSize(Dimension d)
Sets the total dimensions of the contained cells for use in preferred size calculations.


setCellSize

public void setCellSize(int width,
                        int height)
Sets the total dimensions of the contained cells.


containsCell

public boolean containsCell(int row,
                            int column)
Returns true if the given cell is contained in the area.


intersects

public boolean intersects(Rectangle r)
Returns true if the bounds of the area intersects the given rectangle.


getMinimumSize

public Dimension getMinimumSize()
Returns the minimum size of the area.

Overrides:
getMinimumSize in class JComponent

getPreferredSize

public Dimension getPreferredSize()
Returns the preferred size of the cell area. The preferred cell is the space required to display all cells mapped to the cell area.

Overrides:
getPreferredSize in class JComponent

getStandardOffsetX

public int getStandardOffsetX()
Returns the x offset of the area bounds to standard layout.


getStandardOffsetY

public int getStandardOffsetY()
Returns the y offset of the area bounds to standard layout.


setStandardOffset

public void setStandardOffset(int x,
                              int y)
Sets the offset of the area bounds to standard layout.


setStandardOffsetX

public void setStandardOffsetX(int x)
Sets the x offset of the area bounds to standard layout.


setStandardOffsetY

public void setStandardOffsetY(int y)
Sets the y offset of the area bounds to standard layout.


getType

public int getType()
Returns the type of area.

See Also:
setType(int)

setType

public void setType(int type)
Sets the type for the area. Valid types are Area.CELL, CellArea.FROZENROW, CellArea.COLUMNLABEL, CellArea.FROZENCOLUMN, CellArea.FROZENCELL, CellArea.FROZENCOLUMNLABEL, CellArea.ROWLABEL, CellArea.FROZENROWLABEL


getTypeString

public String getTypeString()
Returns a string representation of the Area type.


isHorizontalScrollable

public boolean isHorizontalScrollable()
Returns true if this Area scrolls horizontally.


isVerticalScrollable

public boolean isVerticalScrollable()
Returns true if this Area scrolls vertically.


getStartRow

public int getStartRow()
Returns the start row for the range of cells contained in the area.


getStartColumn

public int getStartColumn()
Returns the start column for the range of cells contained in the area.


getEndRow

public int getEndRow()
Returns the end row for the range of cells contained in the area.


getEndColumn

public int getEndColumn()
Returns the end column for the range of cells contained in the area.


isFocusTraversable

public boolean isFocusTraversable()
Overrides:
isFocusTraversable in class Component

toString

public String toString()
Returns a string representation of the Area.

Overrides:
toString in class Component

Copyright © 2004 Quest Software Inc..
All rights reserved.