org.ChinaVO.FITSManager.FListView
Class FDetailView

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 org.ChinaVO.FITSManager.FListView.FDetailView
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.CellEditorListener, javax.swing.event.ListSelectionListener, javax.swing.event.RowSorterListener, javax.swing.event.TableColumnModelListener, javax.swing.event.TableModelListener, javax.swing.Scrollable, FListViewPosibility

public class FDetailView
extends javax.swing.JTable
implements FListViewPosibility

FDetailView implements the viewDetail in FListView.
codes below is an example about how to initialize columns. {// ╣╣ďýlistviewÁ─columns
List<Object> name = new ArrayList<Object>();
List<Integer> align = new ArrayList<Integer>();
List<Integer> width = new ArrayList<Integer>();

name.add(gui.getStringValue("lang/tableColumn/fileName",
"File Name"));
align.add(SwingConstants.LEFT);
width.add(300);

name.add(gui.getStringValue("lang/tableColumn/fileSize",
"File Size"));
align.add(SwingConstants.RIGHT);
width.add(80);

name.add(gui.getStringValue("lang/tableColumn/fileType",
"File Type"));
align.add(SwingConstants.LEFT);
width.add(130);

name.add(gui.getStringValue("lang/tableColumn/lastModified",
"Last Modified"));
align.add(SwingConstants.LEFT);
width.add(150);

detailview.initColumns(name, align, width);

Version:
v1.0.0 2010-3-15¤┬╬š03:49:19
Author:
Fany
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JTable
javax.swing.JTable.DropLocation, javax.swing.JTable.PrintMode
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
 
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
FDetailView()
          Constructor.
 
Method Summary
 void addItem(FListViewItemCell ic)
          add a new item into FListView.
 void addListSelectionListener(javax.swing.event.ListSelectionListener l)
           
 void clearData()
          remove all items.
 void getAdvandedData(FListViewDataRequestInterface request)
           
 int getItemCount()
           
 int getSelectedIndex()
          Returns the smallest selected cell index; the selection when only a single item is selected in the list.
 int[] getSelectedIndices()
          Get selected items' indexes.
 void initColumns(java.util.List<java.lang.Object> name, java.util.List<java.lang.Integer> align, java.util.List<java.lang.Integer> width)
          Initialize table's columns.
 boolean isCellEditable(int row, int col)
           
 void removeColumn(javax.swing.table.TableColumn column)
           
 void removeItem(int index)
          remove a item by its index.
 void resetItemText(int index, java.lang.String text)
          Reset the text of item specify.
 void setValueAt(FListViewItemCell ic, int row, int column)
          Set value for the item.
 
Methods inherited from class javax.swing.JTable
addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, changeSelection, clearSelection, columnAdded, columnAtPoint, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged, convertColumnIndexToModel, convertColumnIndexToView, convertRowIndexToModel, convertRowIndexToView, createDefaultColumnsFromModel, createScrollPaneForTable, doLayout, editCellAt, editCellAt, editingCanceled, editingStopped, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getAutoResizeMode, getCellEditor, getCellEditor, getCellRect, getCellRenderer, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDefaultRenderer, getDragEnabled, getDropLocation, getDropMode, getEditingColumn, getEditingRow, getEditorComponent, getFillsViewportHeight, getGridColor, getIntercellSpacing, getModel, getPreferredScrollableViewportSize, getPrintable, getRowCount, getRowHeight, getRowHeight, getRowMargin, getRowSelectionAllowed, getRowSorter, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getToolTipText, getUI, getUIClassID, getUpdateSelectionOnSort, getValueAt, isCellSelected, isColumnSelected, isEditing, isRowSelected, moveColumn, prepareEditor, prepareRenderer, print, print, print, print, print, 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, setRowMargin, 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
 
Methods inherited from interface org.ChinaVO.FITSManager.FListView.FListViewPosibility
addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, clearSelection
 

Constructor Detail

FDetailView

public FDetailView()
Constructor.

Method Detail

isCellEditable

public boolean isCellEditable(int row,
                              int col)
Overrides:
isCellEditable in class javax.swing.JTable

initColumns

public void initColumns(java.util.List<java.lang.Object> name,
                        java.util.List<java.lang.Integer> align,
                        java.util.List<java.lang.Integer> width)
Initialize table's columns.

Parameters:
name - columns' names.
align - columns' align style.
width - columns' width.

removeColumn

public void removeColumn(javax.swing.table.TableColumn column)
Overrides:
removeColumn in class javax.swing.JTable

getSelectedIndex

public int getSelectedIndex()
Description copied from interface: FListViewPosibility
Returns the smallest selected cell index; the selection when only a single item is selected in the list. When multiple items are selected, it is simply the smallest selected index. Returns -1 if there is no selection.

Specified by:
getSelectedIndex in interface FListViewPosibility
Returns:
the selected item's index

getSelectedIndices

public int[] getSelectedIndices()
Description copied from interface: FListViewPosibility
Get selected items' indexes.

Specified by:
getSelectedIndices in interface FListViewPosibility
Returns:
indexes

setValueAt

public void setValueAt(FListViewItemCell ic,
                       int row,
                       int column)
Description copied from interface: FListViewPosibility
Set value for the item.

Specified by:
setValueAt in interface FListViewPosibility
Parameters:
ic - a FListViewItemCell.
row - row index in viewDetail, or index in viewCommon.
column - column index in viewDetail, 0 in viewCommon(won't be used).

clearData

public void clearData()
Description copied from interface: FListViewPosibility
remove all items.

Specified by:
clearData in interface FListViewPosibility

addItem

public void addItem(FListViewItemCell ic)
Description copied from interface: FListViewPosibility
add a new item into FListView.

Specified by:
addItem in interface FListViewPosibility
Parameters:
ic - a FListViewItemCell.

removeItem

public void removeItem(int index)
Description copied from interface: FListViewPosibility
remove a item by its index.

Specified by:
removeItem in interface FListViewPosibility
Parameters:
index - the item's index.

getAdvandedData

public void getAdvandedData(FListViewDataRequestInterface request)
Specified by:
getAdvandedData in interface FListViewPosibility

resetItemText

public void resetItemText(int index,
                          java.lang.String text)
Description copied from interface: FListViewPosibility
Reset the text of item specify.

Specified by:
resetItemText in interface FListViewPosibility
Parameters:
index - index of the item.
text - new text

addListSelectionListener

public void addListSelectionListener(javax.swing.event.ListSelectionListener l)
Specified by:
addListSelectionListener in interface FListViewPosibility

getItemCount

public int getItemCount()
Specified by:
getItemCount in interface FListViewPosibility