|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JTable org.ChinaVO.FITSManager.FListView.FDetailView
public class FDetailView
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);
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 |
---|
public FDetailView()
Method Detail |
---|
public boolean isCellEditable(int row, int col)
isCellEditable
in class javax.swing.JTable
public void initColumns(java.util.List<java.lang.Object> name, java.util.List<java.lang.Integer> align, java.util.List<java.lang.Integer> width)
name
- columns' names.align
- columns' align style.width
- columns' width.public void removeColumn(javax.swing.table.TableColumn column)
removeColumn
in class javax.swing.JTable
public int getSelectedIndex()
FListViewPosibility
getSelectedIndex
in interface FListViewPosibility
public int[] getSelectedIndices()
FListViewPosibility
getSelectedIndices
in interface FListViewPosibility
public void setValueAt(FListViewItemCell ic, int row, int column)
FListViewPosibility
setValueAt
in interface FListViewPosibility
ic
- a FListViewItemCell.row
- row index in viewDetail, or index in viewCommon.column
- column index in viewDetail, 0 in viewCommon(won't be used).public void clearData()
FListViewPosibility
clearData
in interface FListViewPosibility
public void addItem(FListViewItemCell ic)
FListViewPosibility
addItem
in interface FListViewPosibility
ic
- a FListViewItemCell.public void removeItem(int index)
FListViewPosibility
removeItem
in interface FListViewPosibility
index
- the item's index.public void getAdvandedData(FListViewDataRequestInterface request)
getAdvandedData
in interface FListViewPosibility
public void resetItemText(int index, java.lang.String text)
FListViewPosibility
resetItemText
in interface FListViewPosibility
index
- index of the item.text
- new textpublic void addListSelectionListener(javax.swing.event.ListSelectionListener l)
addListSelectionListener
in interface FListViewPosibility
public int getItemCount()
getItemCount
in interface FListViewPosibility
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |