Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.mitre.cvw
Class DetailList  view DetailList download DetailList.java

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended byorg.mitre.cvw.DetailList
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.dnd.DropTargetListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, ObjectValues, java.util.Observer, java.io.Serializable

public class DetailList
extends javax.swing.JPanel
implements ObjectValues, java.util.Observer, java.awt.dnd.DropTargetListener

This is the gui widget which displays the contents of the room and all folders.

Version:
1.2

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
(package private)  MultiListData contents
           
(package private)  int curMenu
           
(package private)  int currentSort
           
(package private)  javax.swing.JLabel docServIcon
           
(package private)  java.lang.String dropOrTake
           
(package private)  javax.swing.JLabel headingLabel
           
(package private)  javax.swing.JPanel headingPanel
           
private  int[] initialSize
           
(package private)  MultiList listPanel
           
(package private)  ObjectMenu menu
           
(package private)  int menuHeight
           
(package private)  java.awt.Point menuPt
           
static int NO_MENU
           
(package private)  javax.swing.JLabel sizeLabel
           
private  java.lang.String[] titles
           
(package private)  int total
           
(package private)  int[] types
           
 
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.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface org.mitre.cvw.ObjectValues
BALLOT, CHECKEDOUTDOC, CHECKOUT, CURRONLINEUSER, CURRUSER, DISCONNECTED, DOC, DOC_SC, DOCBUSY, DOCCHECKIN, DOCCOPY, DOCCREATE, DOCCREATEBACKGROUND, DOCCREATEDATE, DOCCREATOR, DOCCREATORONLY, DOCDELETE, DOCDESC, DOCEDITORS, DOCEXPORT, DOCINFO, DOCMIMETYPE, DOCOPEN, DOCSETDESC, DOCSTATUS, DOCTYPE, DOCUMENT, DROP, FLOOR, FOLDER, FOLDER_SC, FORM, FORMFOLDER, GETALLTYPES, GETCHECKEDDOCS, GETDOCTEXTS, GETDOCTEXTSCO, GETEXTDESC, GROUP, IMAGEMENU, NOTCHECKEDOUTDOC, NOTE, NOTE_SC, ONLINEUSER, PROXY, PROXYWIN, RECORDER, REMOTE, REMOTEUSER, REVERT, REVISION, ROOM, ROOMKEY, SETDOCATTRS, SETDOCNAME, STANDARD, TAKE, UNKNOWN, URL, URL_SC, USER, USERSTAT, WB, WHITEBOARD, WHITEBOARD_SC
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
(package private) DetailList(CVWObject[] cvwObj, java.lang.String dOT, java.lang.String title2)
          Constructor
 
Method Summary
 void clearContents()
          Clears the contents ofthe room.
 void doLayouts()
          Refreshes the layouts of the different gui panels.
 void doSort(MultiListData detailArray, int field)
          Performs the sort, given an array of DetailObjects and a field.
 void dragEnter(java.awt.dnd.DropTargetDragEvent dtde)
          Called when the cursor hotspot enters a drop site which will accept the drag.
 void dragExit(java.awt.dnd.DropTargetEvent dte)
          Called when the cursor hotspot moves outside of a drop site which will accept the drag.
 void dragOver(java.awt.dnd.DropTargetDragEvent dtde)
          Called when the cursor hotspot moves inside of a drop site which will accept the drag.
 void drop(java.awt.dnd.DropTargetDropEvent dtde)
          Called when the drag operation has terminated with a drop.
 void dropActionChanged(java.awt.dnd.DropTargetDragEvent dtde)
          Called when the user modifies the drop gesture.
 CVWObject getDropLocation()
          Returns the container for this detail list.
 CVWObject getSelectedObject()
          Returns the CVWObject represented by the selected row.
 CVWObject getSelectedObject(int y)
          Returns the CVWObject represented by the selected row and y coordinate, returns null if y and selected row DO NOT match.
 void goToTop()
          Scrolls the detail list to the top.
protected  void initDetailList(CVWObject[] cvwObj)
          Initializes the list with the objects passed into the constructor
 boolean openSelectedObject(int row)
           
 void resetHilights(int hilight, int start, CVWObject selectobj)
          Resets the scroll position if something was selected, reselect it if it's no longer there don't select anything if nothing was selected, return us to the same row number
 void setDropTargetListener()
          Sets the drop target listener for this detail list to itself.
 void setSizeLabel(int size)
           
 void showDocServIcon(boolean b)
          Shows/Hides the doc server communication icon.
 void showMenu(int x, int y, int row)
          Makes the appropriate right mouse menu visible.
 boolean sortBy(int field)
          Sorts the array of CVWObjects by the field specified, but first sorts alphabetically by name, so that always by name.
 void sortContentsBy(int field)
          Sorts the current array of CVWObjects by the specified field, remembering which object is highlighted before the new sort, so as to high light the same object after the sort.
 void update(java.util.Observable ob, java.lang.Object arg)
          Notifies this detail list of when the right mouse selection finished painting so that the right mouse menu can be shown.
 void updateContents()
          Updates the contents of the list.
 void updateDetailList(CVWObject[] cvwObj)
          Updates the detail list with a new array of CVWObjects.
 void updateHeading(java.lang.String roomName)
          Updates the label of this detail list, can be a room name or folder name change.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, 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
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, 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, processMouseEvent, processMouseWheelEvent, 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, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

initialSize

private final int[] initialSize

titles

private final java.lang.String[] titles

NO_MENU

public static final int NO_MENU
See Also:
Constant Field Values

contents

MultiListData contents

total

int total

curMenu

int curMenu

menuHeight

int menuHeight

currentSort

int currentSort

listPanel

MultiList listPanel

types

int[] types

menu

ObjectMenu menu

dropOrTake

java.lang.String dropOrTake

headingPanel

javax.swing.JPanel headingPanel

headingLabel

javax.swing.JLabel headingLabel

sizeLabel

javax.swing.JLabel sizeLabel

docServIcon

javax.swing.JLabel docServIcon

menuPt

java.awt.Point menuPt
Constructor Detail

DetailList

DetailList(CVWObject[] cvwObj,
           java.lang.String dOT,
           java.lang.String title2)
Constructor

Method Detail

goToTop

public void goToTop()
Scrolls the detail list to the top.


initDetailList

protected void initDetailList(CVWObject[] cvwObj)
Initializes the list with the objects passed into the constructor


setSizeLabel

public void setSizeLabel(int size)

updateDetailList

public void updateDetailList(CVWObject[] cvwObj)
Updates the detail list with a new array of CVWObjects. Removes any previous contents the array might have.


sortContentsBy

public void sortContentsBy(int field)
Sorts the current array of CVWObjects by the specified field, remembering which object is highlighted before the new sort, so as to high light the same object after the sort.


sortBy

public boolean sortBy(int field)
Sorts the array of CVWObjects by the field specified, but first sorts alphabetically by name, so that always by name.


doSort

public void doSort(MultiListData detailArray,
                   int field)
Performs the sort, given an array of DetailObjects and a field.


resetHilights

public void resetHilights(int hilight,
                          int start,
                          CVWObject selectobj)
Resets the scroll position if something was selected, reselect it if it's no longer there don't select anything if nothing was selected, return us to the same row number


doLayouts

public void doLayouts()
Refreshes the layouts of the different gui panels.


update

public void update(java.util.Observable ob,
                   java.lang.Object arg)
Notifies this detail list of when the right mouse selection finished painting so that the right mouse menu can be shown. No longer used.

Specified by:
update in interface java.util.Observer

showMenu

public void showMenu(int x,
                     int y,
                     int row)
Makes the appropriate right mouse menu visible.


updateContents

public void updateContents()
Updates the contents of the list.


clearContents

public void clearContents()
Clears the contents ofthe room.


updateHeading

public void updateHeading(java.lang.String roomName)
Updates the label of this detail list, can be a room name or folder name change.


showDocServIcon

public void showDocServIcon(boolean b)
Shows/Hides the doc server communication icon.


openSelectedObject

public boolean openSelectedObject(int row)

getSelectedObject

public CVWObject getSelectedObject()
Returns the CVWObject represented by the selected row.


getSelectedObject

public CVWObject getSelectedObject(int y)
Returns the CVWObject represented by the selected row and y coordinate, returns null if y and selected row DO NOT match.


dragEnter

public void dragEnter(java.awt.dnd.DropTargetDragEvent dtde)
Description copied from interface: java.awt.dnd.DropTargetListener
Called when the cursor hotspot enters a drop site which will accept the drag.

Specified by:
dragEnter in interface java.awt.dnd.DropTargetListener

dropActionChanged

public void dropActionChanged(java.awt.dnd.DropTargetDragEvent dtde)
Description copied from interface: java.awt.dnd.DropTargetListener
Called when the user modifies the drop gesture. This is often the case when additional mouse or key events are received during the drag.

Specified by:
dropActionChanged in interface java.awt.dnd.DropTargetListener

dragExit

public void dragExit(java.awt.dnd.DropTargetEvent dte)
Description copied from interface: java.awt.dnd.DropTargetListener
Called when the cursor hotspot moves outside of a drop site which will accept the drag. This could also happen if the drop site is no longer active, or no longer accepts the drag.

Specified by:
dragExit in interface java.awt.dnd.DropTargetListener

dragOver

public void dragOver(java.awt.dnd.DropTargetDragEvent dtde)
Description copied from interface: java.awt.dnd.DropTargetListener
Called when the cursor hotspot moves inside of a drop site which will accept the drag.

Specified by:
dragOver in interface java.awt.dnd.DropTargetListener

drop

public void drop(java.awt.dnd.DropTargetDropEvent dtde)
Description copied from interface: java.awt.dnd.DropTargetListener
Called when the drag operation has terminated with a drop.

Specified by:
drop in interface java.awt.dnd.DropTargetListener

setDropTargetListener

public void setDropTargetListener()
Sets the drop target listener for this detail list to itself.


getDropLocation

public CVWObject getDropLocation()
Returns the container for this detail list. If the frame is CVWCoordinator then current room is assumed. If frame is a CVWFolderWindow, then the CVWFolder the window represents, which could be the current user.