wt.clients.util
Class CheckboxMultiList

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended bysymantec.itools.awt.MultiList
                  extended bywt.clients.util.CheckboxMultiList
All Implemented Interfaces:
Accessible, ImageObserver, ItemSelectable, MenuContainer, Serializable
Direct Known Subclasses:
ElectronicSignatureApplet.TemplateTable, ProcessEditor.TemplateTable, ProjectAdminApplet.TemplateTable, WfAssignedActivityTemplateParticipants.AssigneeMultiList, WfNotifierRecipients.RecipientMultiList

public class CheckboxMultiList
extends symantec.itools.awt.MultiList

See Also:
Serialized Form

Nested Class Summary
(package private)  class CheckboxMultiList.CheckboxCell
          A cell for the CheckboxMultiList.
(package private)  class CheckboxMultiList.CheckboxMouseListener
          Handles mouse events in the table.
 
Nested classes inherited from class symantec.itools.awt.MultiList
 
Nested classes inherited from class java.awt.Panel
Panel.AccessibleAWTPanel
 
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
private  boolean AllCheckBoxesDisabled
           
private  Vector checkboxesdisabled
           
(package private)  Image checked
           
private  Font dialog11
           
private  boolean editable
          Editable property, true if the user can check the check boxes, else false.
(package private)  Image unchecked
           
 
Fields inherited from class symantec.itools.awt.MultiList
actionCommand, actionListener, allowResizingOfColumns, allowSorting, BORDER, cachedHeight, cachedLastSplitter, cachedWidth, cellAscent, cellDescent, cellFont, cellHeight, cells, CENTER, clickedInHeadings, CLICKTHRESHOLD, clickTime, colorBg, colorFg, colorHBg, colorHFg, columnAlignments, columnClicked, columnCompareCellsRoutines, columnSizes, defaultColumnAlignment, defaultColumnSorter, dragColumn, errors, focusIndicatedVisually, focusListener, forceColumnSizeRecalc, forceFullRedraw, forceRedraw, hasFocus, headingBg, headingFg, headingFont, headingHeight, headings, headingVisible, highlightedRows, horizontalScrollbar, hScrollbarLineIncrement, isDragging, isSun1_1, isSuppressRedraw, itemListener, lastColumnClicked, LEFT, memoryClick, minColumnWidth, multiSelect, offscreenImage, offscreenImageGraphics, redrawWasSupressed, RESIZE_FUDGE_FACTOR, RIGHT, sbHPosition, sbHShow, sbVPosition, sbVShow, scrollbarHeight, selectedRow, splitters, topRow, verticalScrollbar, verticalScrollbarWidth, xDragLast
 
Fields inherited from class java.awt.Panel
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CheckboxMultiList()
          A multilist that supports checkboxes.
 
Method Summary
 void addCell(int r, int c, String s, Image i)
          Add a cell to the table.
 void addCheckboxCell(int r, int c, boolean e)
          Adds an checkbox cell to the table.
 void addCheckboxCell(int r, int c, String s, boolean e)
          Adds an checkbox cell to the table.
 void addImageCell(int r, int c, Image i)
          Adds an image cell to the table.
 void addTextCell(int r, int c, String s)
          Adds a text cell to the table.
protected  void draw3DBox(Rectangle r, boolean up)
          Draws a rectangle with 3-dimensional effect into the offscreen image.
 Vector getCheckBoxesDisabled()
          Get the rows where check boxes were disabled
private  int getColumn(int x)
          Returns the column index which corresponds with the specified x coordinate.
private  int getRow(int y)
          Returns the row index which corresponds with the specified y coordinate.
 boolean isCheckboxSelected(int r, int c)
          Returns true if the checkbox at row r, column c is checked.
 boolean isEditable()
           
(package private)  void loadImages()
           
 void paint(Graphics g)
          Paints the table.
 void redraw()
          Paints this component into an offscreen image for cleaner screen repaints.
 void setAllCheckBoxesDisabled(boolean flag)
          Set the flag to true if all the checkboxes should be set to false.
 void setCellFont(Font f)
          Sets the font of the cells.
 void setCheckboxSelected(int r, int c, boolean s)
          Set the checkbox selected or deselected at row r, column c.
 void setEditable(boolean editable)
           
 void sort()
          Sorts the multilist alphabetically by the first column.
 
Methods inherited from class symantec.itools.awt.MultiList
addActionListener, addCell, addCellImpl, addItemListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, adjustHeadings, calcHeadings, calculateHeadingHeight, calcVerticalScrollbarPosition, changeSelection, clear, createColumns, deselectAll, deselectRow, drawColumnHeading, drawHeading, drawRows, getCellBg, getCellFg, getCellFont, getCellImage, getCellText, getColumnAlignment, getColumnAlignments, getColumnSize, getColumnSizes, getColumnSizesFromSplitters, getColumnSorter, getDefaultColumnAlignment, getDefaultColumnSorter, getHeading, getHeadingBg, getHeadingFg, getHeadingFont, getHeadings, getListItems, getMinColumnWidth, getNumberOfCols, getNumberOfRows, getNumVisibleRows, getSelectedObjects, getSelectedRow, getSelectedRows, intArrayToStringArray, internalCreateColumns, isAllowResizingOfColumns, isAllowSorting, isFocusIndicatedVisually, isFocusTraversable, isHeadingVisible, isMultipleMode, minimumSize, paintSelection, preferredSize, rangeCheckAlignment, rangeCheckColumn, removeActionListener, removeItemListener, removeNotify, removePropertyChangeListener, removeRow, removeSelectionBorder, removeVetoableChangeListener, repaintFocus, resizeHeadings, selectAll, selectRow, setAllowResizingOfColumns, setAllowSorting, setCellBg, setCellColors, setCellFg, setColumnAlignment, setColumnAlignments, setColumns, setColumnSizes, setColumnSorter, setDefaultColumnAlignment, setDefaultColumnSorter, setFocusIndicatedVisually, setHeading, setHeading, setHeadingBg, setHeadingColors, setHeadingFg, setHeadingFont, setHeadings, setHeadingVisible, setLayout, setListItems, setMinColumnWidth, setMultipleMode, setNumberOfCols, setSelectedRow, setSupressRedraw, sourceActionEvent, sourceItemEvent, tokenizeStringArrayIfNeeded, triggerRedraw, update
 
Methods inherited from class java.awt.Panel
getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, paintComponents, paramString, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

checked

Image checked

unchecked

Image unchecked

dialog11

private Font dialog11

AllCheckBoxesDisabled

private boolean AllCheckBoxesDisabled

checkboxesdisabled

private Vector checkboxesdisabled

editable

private boolean editable
Editable property, true if the user can check the check boxes, else false.

Constructor Detail

CheckboxMultiList

public CheckboxMultiList()
A multilist that supports checkboxes.

Method Detail

setEditable

public void setEditable(boolean editable)

isEditable

public boolean isEditable()

setAllCheckBoxesDisabled

public void setAllCheckBoxesDisabled(boolean flag)
Set the flag to true if all the checkboxes should be set to false. When any checkbox is checked, all checked boxes will be un-checked and the Vector checkboxesdisabled will be populated with the rows that were un-checked.


getCheckBoxesDisabled

public Vector getCheckBoxesDisabled()
Get the rows where check boxes were disabled


getRow

private int getRow(int y)
Returns the row index which corresponds with the specified y coordinate.

Parameters:
y - The y coordinate.

getColumn

private int getColumn(int x)
Returns the column index which corresponds with the specified x coordinate.

Parameters:
x - The x coordinate.

setCheckboxSelected

public void setCheckboxSelected(int r,
                                int c,
                                boolean s)
Set the checkbox selected or deselected at row r, column c.

Parameters:
r - The row.
c - The column.
s - The selected state.

isCheckboxSelected

public boolean isCheckboxSelected(int r,
                                  int c)
Returns true if the checkbox at row r, column c is checked.

Parameters:
r - The row.
c - The column.

addTextCell

public void addTextCell(int r,
                        int c,
                        String s)
Adds a text cell to the table.

Parameters:
r - The row.
c - The column.
s - The text.

addImageCell

public void addImageCell(int r,
                         int c,
                         Image i)
Adds an image cell to the table.

Parameters:
r - The row.
c - The column.
i - The Image.

addCheckboxCell

public void addCheckboxCell(int r,
                            int c,
                            boolean e)
Adds an checkbox cell to the table.

Parameters:
r - The row.
c - The column.
e - Checked flag.

addCell

public void addCell(int r,
                    int c,
                    String s,
                    Image i)
Add a cell to the table.

Parameters:
r - The row.
c - The column.
s - The cell text.
i - The cell Image.

addCheckboxCell

public void addCheckboxCell(int r,
                            int c,
                            String s,
                            boolean e)
Adds an checkbox cell to the table.

Parameters:
r - The row.
c - The column.
s - The cell text.
e - Checked flag.

loadImages

void loadImages()

setCellFont

public void setCellFont(Font f)
Sets the font of the cells.

Parameters:
f - The font.

sort

public void sort()
Sorts the multilist alphabetically by the first column.


paint

public void paint(Graphics g)
Paints the table. Fix repaint problems in IE

Parameters:
g - The graphics to paint to.

redraw

public void redraw()
Paints this component into an offscreen image for cleaner screen repaints. It is not typically called directly.

Supported API: false


draw3DBox

protected void draw3DBox(Rectangle r,
                         boolean up)
Draws a rectangle with 3-dimensional effect into the offscreen image.

Parameters:
r - the rectangle bounds
up - true to draw as if raised, false to draw as if lowered