|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Panel | +--Listor
This class is one big panel, that holds a "master row" at the top, with resizable labels, and then a bunch of data rows below it.
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
Listor(int numc,
int totalwidth)
|
Method Summary | |
void |
addValues(java.lang.String[] vals)
Add a new "data row" created around the string array passed in Note that the size of the array must exactly match the number of rows the Listor was created for. |
void |
clearHighlight(int rownum)
simply unsets the "highlight" bit on the given data row. |
void |
clearHighlights()
|
void |
clearValues()
This drops all the "rows", but PRESERVES the column header names and sizes. |
int |
getHighlightedIndex()
This will return the row number of the "first" row highlighted. |
java.lang.String[] |
getHighlightedRow()
Similar to getHighlightedIndex, except returns the actual String[] that the first highlighted row contains. |
java.awt.Dimension |
getMinimumSize()
|
java.awt.Dimension |
getPreferredSize()
|
protected void |
mouseClicked(java.awt.event.MouseEvent evt)
This is "public", but should not be used publically private gets called by internal objects for mouseclicks. |
void |
resetCursor()
Irritating workaround for race condition issue in parent container Panel. |
void |
setColName(int colnum,
java.lang.String name)
Set the name of a specific column. |
void |
setColWidth(int colnum,
int width)
Set the width of a specific column, different from the default. |
void |
setDataBG(java.awt.Color c)
Set default "data row" background color, and also update any existing data rows. |
void |
setMasterBG(java.awt.Color c)
Set "top row" background color |
void |
showUpdates()
If you change the values in a pre-existing row, by changing values in the String[] array you passed to addValues(), then you will need to call this, to show your updated values. |
Methods inherited from class java.awt.Panel |
addNotify |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getAlignmentX,
getAlignmentY,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getInsets,
getLayout,
getMaximumSize,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paint,
paintComponents,
paramString,
preferredSize,
print,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
removeNotify,
setCursor,
setFont,
setLayout,
update,
validate,
validateTree |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
firePropertyChange,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocation,
getLocationOnScreen,
getName,
getParent,
getPeer,
getSize,
getSize,
getToolkit,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
isDisplayable,
isDoubleBuffered,
isEnabled,
isFocusTraversable,
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,
processInputMethodEvent,
processKeyEvent,
processMouseEvent,
processMouseMotionEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setDropTarget,
setEnabled,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
show,
size,
toString,
transferFocus |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public Listor(int numc, int totalwidth)
numc
- number of columns you want every datarow to havetotalwidth
- full pixel width of the entire Listor objectMethod Detail |
public void showUpdates()
public java.awt.Dimension getPreferredSize()
public java.awt.Dimension getMinimumSize()
protected void mouseClicked(java.awt.event.MouseEvent evt)
public void resetCursor()
public void clearHighlights()
public void clearHighlight(int rownum)
public int getHighlightedIndex()
public java.lang.String[] getHighlightedRow()
public void clearValues()
public void addValues(java.lang.String[] vals)
vals
- contains data for each column in the row/linepublic void setMasterBG(java.awt.Color c)
public void setDataBG(java.awt.Color c)
public void setColName(int colnum, java.lang.String name)
public void setColWidth(int colnum, int width)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |