com.extentech.ExtenXLS.ui
Class ExtenXLSTable

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JTable
                  extended by com.extentech.swingtools.DraggableTable
                      extended by com.extentech.ExtenXLS.ui.ExtenXLSTable
All Implemented Interfaces:
SheetTable, DragGestureListener, DragSourceListener, DropTargetListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, CellEditorListener, ListSelectionListener, RowSorterListener, TableColumnModelListener, TableModelListener, Scrollable
Direct Known Subclasses:
ExtenXLSRowTable

public class ExtenXLSTable
extends com.extentech.swingtools.DraggableTable
implements SheetTable

Provides a basic tabbed panel for WorkBooks

Version:
3.1
Author:
John McMahon -- ©2011Extentech Inc.
See Also:
java.swing.table.*, WorkBookHandle, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JTable
JTable.DropLocation, JTable.PrintMode
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Component
Component.BaselineResizeBehavior
 
Field Summary
static int COLSIZE_DIVISOR
           
 int lastcol
          do the mouseover row/col cursor
 int lastrow
          do the mouseover row/col cursor
 Hashtable raz
           
 ExtenXLSCellRenderer renda
           
static int ROW_HEADER_WIDTH
           
static int ROW_HEIGHT_DEFAULT
           
static int ROW_HEIGHT_DIVISOR
           
 
Fields inherited from class com.extentech.swingtools.DraggableTable
DEBUG, dragSource
 
Fields inherited from class javax.swing.JTable
AUTO_RESIZE_ALL_COLUMNS, AUTO_RESIZE_LAST_COLUMN, AUTO_RESIZE_NEXT_COLUMN, AUTO_RESIZE_OFF, AUTO_RESIZE_SUBSEQUENT_COLUMNS
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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
ExtenXLSTable()
           
ExtenXLSTable(int numRows, int numColumns)
           
ExtenXLSTable(WorkSheetTableModel dm)
           
ExtenXLSTable(WorkSheetTableModel dm, TableColumnModel cm)
           
ExtenXLSTable(WorkSheetTableModel dm, TableColumnModel cm, ListSelectionModel sm)
           
 
Method Summary
 void columnMarginChanged(ChangeEvent e)
           
 void dragOver(DropTargetDragEvent de)
           
 Rectangle getCellRect(int row, int column, boolean includeSpacing)
           
 int getColWidthInTableUnits(int w)
           
 int getColWidthInXLSUnits(int w)
           
 ExtenXLSCellRenderer getExtenXLSCellRenderer()
           
 int getRowHeight(int rn)
           
 int getRowHeightInTableUnits(int ht)
          Calculate row height or width with zoom
 int getRowHeightInXLSUnits(int ht)
           
 int getRowMargin()
           
 double getZoom()
           
 void initCharts()
          display charts
 void initColumnSizes()
           
 void initImages()
          display images
 void initPopups()
           
 void initUI()
           
 void setExtenXLSCellRenderer(ExtenXLSCellRenderer r)
           
 void setModel(WorkSheetTableModel tableModel)
           
 void setRowMargin(int i)
           
 void setZoom(int zoom)
           
 
Methods inherited from class com.extentech.swingtools.DraggableTable
dragDropEnd, dragEnter, dragEnter, dragExit, dragExit, dragGestureRecognized, dragOver, drop, dropActionChanged, dropActionChanged, getDragSource
 
Methods inherited from class javax.swing.JTable
addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, changeSelection, clearSelection, columnAdded, columnAtPoint, columnMoved, columnRemoved, columnSelectionChanged, convertColumnIndexToModel, convertColumnIndexToView, convertRowIndexToModel, convertRowIndexToView, createDefaultColumnsFromModel, createScrollPaneForTable, doLayout, editCellAt, editCellAt, editingCanceled, editingStopped, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getAutoResizeMode, getCellEditor, getCellEditor, getCellRenderer, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDefaultRenderer, getDragEnabled, getDropLocation, getDropMode, getEditingColumn, getEditingRow, getEditorComponent, getFillsViewportHeight, getGridColor, getIntercellSpacing, getModel, getPreferredScrollableViewportSize, getPrintable, getRowCount, getRowHeight, getRowSelectionAllowed, getRowSorter, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getToolTipText, getUI, getUIClassID, getUpdateSelectionOnSort, getValueAt, isCellEditable, isCellSelected, isColumnSelected, isEditing, isRowSelected, moveColumn, prepareEditor, prepareRenderer, print, print, print, print, print, removeColumn, removeColumnSelectionInterval, removeEditor, removeNotify, removeRowSelectionInterval, rowAtPoint, selectAll, setAutoCreateColumnsFromModel, setAutoCreateRowSorter, setAutoResizeMode, setCellEditor, setCellSelectionEnabled, setColumnModel, setColumnSelectionAllowed, setColumnSelectionInterval, setDefaultEditor, setDefaultRenderer, setDragEnabled, setDropMode, setEditingColumn, setEditingRow, setFillsViewportHeight, setGridColor, setIntercellSpacing, setModel, setPreferredScrollableViewportSize, setRowHeight, setRowHeight, setRowSelectionAllowed, setRowSelectionInterval, setRowSorter, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, setTableHeader, setUI, setUpdateSelectionOnSort, setValueAt, sizeColumnsToFit, sizeColumnsToFit, sorterChanged, tableChanged, updateUI, valueChanged
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

raz

public Hashtable raz

COLSIZE_DIVISOR

public static int COLSIZE_DIVISOR

ROW_HEIGHT_DIVISOR

public static int ROW_HEIGHT_DIVISOR

ROW_HEIGHT_DEFAULT

public static int ROW_HEIGHT_DEFAULT

lastrow

public int lastrow
do the mouseover row/col cursor


lastcol

public int lastcol
do the mouseover row/col cursor


renda

public ExtenXLSCellRenderer renda

ROW_HEADER_WIDTH

public static int ROW_HEADER_WIDTH
Constructor Detail

ExtenXLSTable

public ExtenXLSTable()

ExtenXLSTable

public ExtenXLSTable(int numRows,
                     int numColumns)

ExtenXLSTable

public ExtenXLSTable(WorkSheetTableModel dm)

ExtenXLSTable

public ExtenXLSTable(WorkSheetTableModel dm,
                     TableColumnModel cm)

ExtenXLSTable

public ExtenXLSTable(WorkSheetTableModel dm,
                     TableColumnModel cm,
                     ListSelectionModel sm)
Method Detail

dragOver

public void dragOver(DropTargetDragEvent de)
Specified by:
dragOver in interface DropTargetListener
Overrides:
dragOver in class com.extentech.swingtools.DraggableTable

setModel

public void setModel(WorkSheetTableModel tableModel)
Parameters:
tableModel -

getExtenXLSCellRenderer

public ExtenXLSCellRenderer getExtenXLSCellRenderer()
Specified by:
getExtenXLSCellRenderer in interface SheetTable

setExtenXLSCellRenderer

public void setExtenXLSCellRenderer(ExtenXLSCellRenderer r)

initUI

public void initUI()
Overrides:
initUI in class com.extentech.swingtools.DraggableTable

initCharts

public void initCharts()
display charts


initImages

public void initImages()
display images


initColumnSizes

public void initColumnSizes()

setRowMargin

public void setRowMargin(int i)
Overrides:
setRowMargin in class JTable

getRowMargin

public int getRowMargin()
Overrides:
getRowMargin in class JTable

getRowHeightInTableUnits

public int getRowHeightInTableUnits(int ht)
Calculate row height or width with zoom


getRowHeightInXLSUnits

public int getRowHeightInXLSUnits(int ht)

getColWidthInTableUnits

public int getColWidthInTableUnits(int w)

getColWidthInXLSUnits

public int getColWidthInXLSUnits(int w)

getRowHeight

public int getRowHeight(int rn)
Overrides:
getRowHeight in class JTable

getCellRect

public Rectangle getCellRect(int row,
                             int column,
                             boolean includeSpacing)
Overrides:
getCellRect in class JTable

getZoom

public double getZoom()
Returns:
Returns the zoom.

setZoom

public void setZoom(int zoom)
Parameters:
zoom - The zoom to set.

initPopups

public void initPopups()

columnMarginChanged

public void columnMarginChanged(ChangeEvent e)
Specified by:
columnMarginChanged in interface TableColumnModelListener
Overrides:
columnMarginChanged in class JTable


Copyright © 2011 Extentech Inc. All Rights Reserved.